Skip to content

Commit c1edf8f

Browse files
authored
chore: upgrade all packages (#179)
* update node version * upgrade dependencies * update react rules * add import plugin * upgrade to eslint-config-prettier 8 * put back deps * deps * update node to 16
1 parent 700d27c commit c1edf8f

File tree

6 files changed

+589
-179
lines changed

6 files changed

+589
-179
lines changed

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.13.0
1+
16.1.0

lib/configs/node.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module.exports = {
66
},
77
extends: [
88
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
9-
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
109
'plugin:prettier/recommended' // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
1110
],
1211
rules: {

lib/configs/react-native.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module.exports = {
66
'plugin:import/warnings',
77
'plugin:import/typescript',
88
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
9-
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
109
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
1110
],
1211
parserOptions: {

lib/configs/react.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module.exports = {
22
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
3+
ignorePatterns: ['generated', 'node_modules/', 'types', 'cypress', 'scripts'],
34
extends: [
45
'react-app', // from create react app
56
'plugin:jsx-a11y/recommended',
67
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
7-
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
88
'plugin:prettier/recommended' // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
99
],
10-
plugins: ['jsx-a11y', 'react-hooks'],
10+
plugins: ['jsx-a11y', 'react-hooks', 'import'],
1111
parserOptions: {
1212
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
1313
sourceType: 'module', // Allows for the use of imports
@@ -17,13 +17,19 @@ module.exports = {
1717
},
1818
rules: {
1919
'@typescript-eslint/no-explicit-any': 'off',
20+
'@typescript-eslint/explicit-module-boundary-types': 'off',
2021
'react-hooks/rules-of-hooks': 'error',
2122
'react-hooks/exhaustive-deps': 'warn',
22-
// NOTE: once https://github.com/typescript-eslint/typescript-eslint/issues/149
23-
// is merged, we should be able to renable this
2423
'@typescript-eslint/explicit-function-return-type': 'off',
2524
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
2625
'jsx-a11y/no-onchange': 'off',
26+
'import/order': [
27+
'warn',
28+
{
29+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
30+
'newlines-between': 'always',
31+
},
32+
],
2733
'padding-line-between-statements': [
2834
'error',
2935
{ blankLine: 'always', prev: '*', next: 'return' },

package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@
1313
"test": "jest"
1414
},
1515
"dependencies": {
16-
"@react-native-community/eslint-config": "^1.0.0",
17-
"@typescript-eslint/eslint-plugin": "^2.5.0",
18-
"@typescript-eslint/parser": "^2.5.0",
19-
"babel-eslint": "^10.0.1",
20-
"eslint-config-prettier": "^6.5.0",
21-
"eslint-config-react-app": "^5.0.2",
22-
"eslint-plugin-import": "^2.19.1",
23-
"eslint-plugin-jsx-a11y": "^6.2.1",
24-
"eslint-plugin-prettier": "^3.1.1",
25-
"eslint-plugin-react": "^7.13.0",
26-
"eslint-plugin-react-hooks": "^2.2.0",
27-
"prettier": "^1.19.1"
16+
"@react-native-community/eslint-config": "^2.0.0",
17+
"@typescript-eslint/eslint-plugin": "^4.22.1",
18+
"@typescript-eslint/parser": "^4.22.1",
19+
"babel-eslint": "^10.0.0",
20+
"eslint-config-prettier": "^8.3.0",
21+
"eslint-config-react-app": "^6.0.0",
22+
"eslint-plugin-flowtype": "^5.2.0",
23+
"eslint-plugin-import": "^2.22.1",
24+
"eslint-plugin-jest": "^24.0.0",
25+
"eslint-plugin-jsx-a11y": "^6.4.1",
26+
"eslint-plugin-prettier": "^3.4.0",
27+
"eslint-plugin-react": "^7.23.2",
28+
"eslint-plugin-react-hooks": "^4.2.0",
29+
"prettier": "^2.2.1"
2830
},
2931
"devDependencies": {
3032
"@babel/core": "^7.4.5",

0 commit comments

Comments
 (0)