Skip to content

Commit

Permalink
Upgrade packages to latest possible versions
Browse files Browse the repository at this point in the history
Electron v12 introduced a breaking change, so we need to set contextIsolation to false for our app to continue to work.
Also update husky to fix husky-run command not found, as seen in typicode/husky/issues/854, and lint-staged not found, in typicode/husky/issues/618 and prettier config change https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21
  • Loading branch information
garyli2 committed Mar 9, 2021
1 parent abeb210 commit de2b7c1
Show file tree
Hide file tree
Showing 6 changed files with 3,602 additions and 3,441 deletions.
47 changes: 25 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
module.exports = {
extends: 'erb',
rules: {
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
settings: {
'import/resolver': {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve('./.erb/configs/webpack.config.eslint.js'),
},
plugins: ['@typescript-eslint'],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
rules: {
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
settings: {
'import/resolver': {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve(
'./.erb/configs/webpack.config.eslint.js'
),
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
},
};
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

#yarn lint-staged
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"start": "node -r @babel/register ./.erb/scripts/CheckPortInUse.js && cross-env yarn start:renderer",
"start:main": "cross-env NODE_ENV=development electron -r ./.erb/scripts/BabelRegister ./src/main.dev.ts",
"start:renderer": "cross-env NODE_ENV=development webpack serve --config ./.erb/configs/webpack.config.renderer.dev.babel.js",
"test": "jest"
"test": "jest",
"prepare": "husky install"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand Down Expand Up @@ -84,13 +85,13 @@
"@testing-library/react": "^11.2.2",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/history": "4.7.6",
"@types/history": "4.7.8",
"@types/jest": "^26.0.15",
"@types/node": "14.14.10",
"@types/react": "^16.9.44",
"@types/react-dom": "^16.9.9",
"@types/node": "14.14.32",
"@types/react": "^17.0.3",
"@types/react-dom": "^17.0.2",
"@types/react-router-dom": "^5.1.6",
"@types/react-test-renderer": "^16.9.3",
"@types/react-test-renderer": "^17.0.1",
"@types/webpack-env": "^1.15.2",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
Expand All @@ -101,25 +102,25 @@
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"browserslist-config-erb": "^0.0.1",
"chalk": "^4.1.0",
"concurrently": "^5.3.0",
"concurrently": "^6.0.0",
"core-js": "^3.6.5",
"cross-env": "^7.0.2",
"css-loader": "^5.0.1",
"css-minimizer-webpack-plugin": "^1.1.5",
"detect-port": "^1.3.0",
"electron": "^11.0.1",
"electron": "^12.0.0",
"electron-builder": "^22.3.6",
"electron-devtools-installer": "^3.1.1",
"electron-notarize": "^1.0.0",
"electron-rebuild": "^2.3.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.3",
"enzyme-to-json": "^3.5.0",
"eslint": "^7.5.0",
"eslint": "^7.21.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-config-erb": "^2.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-prettier": "^8.1.0",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-compat": "^3.8.0",
"eslint-plugin-import": "^2.22.0",
Expand All @@ -130,18 +131,18 @@
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.0.8",
"file-loader": "^6.0.0",
"husky": "^4.2.5",
"husky": "5",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.1.0",
"lint-staged": "^10.2.11",
"lint-staged": "^10.5.4",
"mini-css-extract-plugin": "^1.3.1",
"node-sass": "^5.0.0",
"opencollective-postinstall": "^2.0.3",
"prettier": "^2.0.5",
"react-refresh": "^0.9.0",
"react-test-renderer": "^17.0.1",
"rimraf": "^3.0.0",
"sass-loader": "^10.1.0",
"sass-loader": "^11.0.1",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.0.3",
"typescript": "^4.0.5",
Expand Down
1 change: 1 addition & 0 deletions src/main.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const createWindow = async () => {
icon: getAssetPath('icon.png'),
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});

Expand Down
Loading

0 comments on commit de2b7c1

Please sign in to comment.