adding another plugin slowly adding to it
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
"plugin:import/electron",
|
||||
"plugin:import/typescript",
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended"
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:jsx-a11y"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"rules": {
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
"electron": "17.1.2",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-plugin-import": "^2.25.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.29.4",
|
||||
"eslint-plugin-react-hooks": "^4.5.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.0.1",
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import Channels, { Dimensions } from "./constants";
|
||||
import { contextBridge, ipcRenderer } from "electron";
|
||||
|
||||
import { STORE_ITEMS } from "./constants";
|
||||
import Channels, { Dimensions, STORE_ITEMS } from './constants';
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
|
||||
const electronAPI = {
|
||||
auth: {
|
||||
@@ -11,10 +9,10 @@ const electronAPI = {
|
||||
},
|
||||
store: {
|
||||
get(val: STORE_ITEMS) {
|
||||
return ipcRenderer.invoke("electron-store-get", val);
|
||||
return ipcRenderer.invoke('electron-store-get', val);
|
||||
},
|
||||
set(property: STORE_ITEMS, val: any) {
|
||||
ipcRenderer.send("electron-store-set", property, val);
|
||||
ipcRenderer.send('electron-store-set', property, val);
|
||||
},
|
||||
// Other method you want to add like has(), reset(), etc.
|
||||
},
|
||||
@@ -26,7 +24,7 @@ const electronAPI = {
|
||||
},
|
||||
|
||||
on(channel: Channels, func: any) {
|
||||
const validChannels = ["ipc-example"];
|
||||
const validChannels = ['ipc-example'];
|
||||
// if (validChannels.includes(channel)) {
|
||||
// // Deliberately strip event as it includes `sender`
|
||||
// ipcRenderer.on(channel, (event, ...args) => func(...args));
|
||||
@@ -45,6 +43,6 @@ const electronAPI = {
|
||||
},
|
||||
};
|
||||
|
||||
contextBridge.exposeInMainWorld("electronAPI", electronAPI);
|
||||
contextBridge.exposeInMainWorld('electronAPI', electronAPI);
|
||||
|
||||
export default electronAPI;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function SocketProvider() {
|
||||
return <div></div>;
|
||||
}
|
||||
@@ -3337,7 +3337,7 @@ eslint-plugin-import@^2.25.0:
|
||||
resolve "^1.20.0"
|
||||
tsconfig-paths "^3.12.0"
|
||||
|
||||
eslint-plugin-jsx-a11y@6.5.1:
|
||||
eslint-plugin-jsx-a11y@6.5.1, eslint-plugin-jsx-a11y@^6.5.1:
|
||||
version "6.5.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz#cdbf2df901040ca140b6ec14715c988889c2a6d8"
|
||||
integrity sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==
|
||||
|
||||
Reference in New Issue
Block a user