diff --git a/.eslintrc b/.eslintrc index 704e91b..d4ab65b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,7 +10,9 @@ "plugin:inferno/recommended", "eslint-config-happiness" ], - "globals": {}, + "globals": { + "location": true + }, "parser": "babel-eslint", "parserOptions": { "ecmaVersion": 6, @@ -47,6 +49,7 @@ "no-nested-ternary": "error", "no-new-func": "error", "no-new-wrappers": "error", + "no-restricted-globals": "off", "no-return-assign": "error", "no-return-await": "error", "no-self-compare": "error", diff --git a/src/App.js b/src/App.js index c62af96..eebd11b 100644 --- a/src/App.js +++ b/src/App.js @@ -1,4 +1,5 @@ import { BrowserRouter } from 'inferno-router'; +import QueryString from 'query-string'; import { Jumbotron } from './components/Bootstrap'; import { Button, Form, FormGroup, Input, Label } from './components/Bootstrap/Form'; @@ -6,29 +7,37 @@ import { Container, Row } from './components/Bootstrap/Grid'; const App = () => ( - - - -
-

Welcome to Inferno

-
-
- -

- To get started, edit src/App.js and save to reload. -

-
- -
- - - - - -
-
-
-
+
+ + + +
+

Welcome to Inferno

+
+
+ +

+ To get started, edit src/App.js and save to reload. +

+
+ +
+ + + + + +
+
+
+
+
+ +
{
+					JSON.stringify(QueryString.parse(window.location.search), undefined, 2)
+				}
+
+
); diff --git a/src/components/Bootstrap/Bootstrap.js b/src/components/Bootstrap/Bootstrap.js index 71dd3c9..d0498f0 100644 --- a/src/components/Bootstrap/Bootstrap.js +++ b/src/components/Bootstrap/Bootstrap.js @@ -2,4 +2,4 @@ import Jumbotron from 'inferno-bootstrap/dist/Jumbotron'; export { Jumbotron, -} +}; diff --git a/src/electron/starter.js b/src/electron/starter.js index 52b7f14..d8c7cd4 100644 --- a/src/electron/starter.js +++ b/src/electron/starter.js @@ -7,6 +7,9 @@ const BrowserWindow = electron.BrowserWindow; const path = require('path'); const url = require('url'); +// eslint-disable-next-line +global.eval = () => {}; + // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let mainWindow; @@ -14,8 +17,10 @@ let mainWindow; const createWindow = () => { // Create the browser window. mainWindow = new BrowserWindow({ - height: 600, - width: 800, + webPreferences: { + contextIsolation: true, + nodeIntegration: false, + }, }); // load the index.html of the app. @@ -26,7 +31,9 @@ const createWindow = () => { }); mainWindow.loadURL(startUrl); // Open the DevTools. - mainWindow.webContents.openDevTools(); + mainWindow.webContents.openDevTools({ + mode: 'bottom', + }); // Emitted when the window is closed. mainWindow.on('closed', () => {