Skip to content

Commit 0b60b2b

Browse files
committed
update eslint/prettier ver
1 parent 28699d8 commit 0b60b2b

File tree

3 files changed

+605
-509
lines changed

3 files changed

+605
-509
lines changed

.eslintrc.js

Lines changed: 24 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
module.exports = {
22
'parser': '@typescript-eslint/parser',
33
'extends': [
4-
'airbnb',
5-
'plugin:prettier/recommended',
6-
'prettier/react',
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
7+
'plugin:react/recommended',
8+
'prettier',
79
],
810
'plugins': [
911
'@typescript-eslint',
12+
'jsx-a11y',
1013
],
1114
'parserOptions': {
1215
'sourceType': 'module',
@@ -16,61 +19,23 @@ module.exports = {
1619
'browser': true
1720
},
1821
'rules': {
19-
'no-nested-ternary': 0,
20-
'react/no-multi-comp': 0,
21-
'react/jsx-no-bind': 0,
22-
'react/jsx-filename-extension': [1, { 'extensions': ['.js', '.jsx', '.ts', '.tsx'] }],
23-
'jsx-a11y/no-static-element-interactions': 0,
24-
'class-methods-use-this': 0,
25-
'react/no-unused-prop-types': 1,
26-
'react/prop-types': 0,
27-
'import/no-extraneous-dependencies': ['error', {
28-
devDependencies: true,
29-
}],
30-
'import/no-unresolved': 0,
31-
'import/named': 0,
32-
33-
'jsx-a11y/label-has-for': 0,
34-
35-
'no-await-in-loop': 0,
36-
'no-restricted-syntax': [2,
37-
{
38-
'selector': 'ForInStatement',
39-
'message': 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.'
40-
},
41-
{
42-
'selector': 'LabeledStatement',
43-
'message': 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.'
44-
},
45-
{
46-
'selector': 'WithStatement',
47-
'message': '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.'
48-
}
49-
],
50-
'no-return-assign': [2, 'except-parens'],
51-
'import/no-cycle': 0,
52-
53-
// TODO: Fix or disable
54-
'react/require-default-props': 1,
55-
'react/destructuring-assignment': 0,
56-
'react/no-find-dom-node': 1,
57-
'react/no-array-index-key': 2,
58-
'react/button-has-type': 2,
59-
'jsx-a11y/click-events-have-key-events': 1,
60-
'jsx-a11y/no-noninteractive-tabindex': 2,
61-
'jsx-a11y/role-has-required-aria-props': 2,
62-
'jsx-a11y/anchor-is-valid': 1,
63-
'jsx-a11y/interactive-supports-focus': 2,
64-
'jsx-a11y/label-has-associated-control': [2, { assert: 'either' }],
65-
66-
// For TypeScript
67-
'camelcase': 0,
68-
'@typescript-eslint/camelcase': 2,
69-
'no-array-constructor': 0,
70-
'@typescript-eslint/no-array-constructor': 2,
71-
'no-unused-vars': 0,
72-
'@typescript-eslint/no-unused-vars': 2,
73-
74-
'@typescript-eslint/no-unnecessary-type-assertion': 2,
22+
// temp disabled - start
23+
'@typescript-eslint/no-explicit-any': 1,
24+
'@typescript-eslint/no-unsafe-assignment': 1,
25+
'@typescript-eslint/no-unsafe-argument': 1,
26+
'@typescript-eslint/no-unsafe-member-access': 1,
27+
'@typescript-eslint/no-unsafe-call': 1,
28+
'@typescript-eslint/no-unsafe-return': 1,
29+
'@typescript-eslint/ban-ts-comment': 1,
30+
'@typescript-eslint/ban-types': 1,
31+
'@typescript-eslint/restrict-template-expressions': 1,
32+
'@typescript-eslint/unbound-method': 1,
33+
'@typescript-eslint/no-non-null-assertion': 1,
34+
'@typescript-eslint/restrict-plus-operands': 1,
35+
'@typescript-eslint/no-empty-function': 1,
36+
'react/prop-types': 1,
37+
'react/display-name': 1,
38+
'react/no-deprecated': 1,
39+
// tmp disabled - end
7540
}
7641
};

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,26 @@
8383
"@types/react": "^17",
8484
"@types/react-dom": "^17",
8585
"@types/svg4everybody": "^2.1.1",
86-
"@typescript-eslint/eslint-plugin": "^1.5.0",
86+
"@typescript-eslint/eslint-plugin": "^5.20.0",
87+
"@typescript-eslint/parser": "^5.20.0",
8788
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
8889
"babel-eslint": "^10.0.1",
8990
"babel-jest": "^25.5.1",
9091
"babel-loader": "^8.1.0",
9192
"babel-plugin-espower": "^2.1.2",
9293
"enzyme": "^3.11.0",
93-
"eslint": "5.14.1",
94-
"eslint-config-airbnb": "17.1.0",
95-
"eslint-config-prettier": "^4.1.0",
96-
"eslint-plugin-import": "2.16.0",
97-
"eslint-plugin-jsx-a11y": "6.2.1",
98-
"eslint-plugin-prettier": "^3.0.1",
99-
"eslint-plugin-react": "7.12.4",
94+
"eslint": "^8.14.0",
95+
"eslint-config-airbnb": "^19.0.4",
96+
"eslint-config-prettier": "^8.5.0",
97+
"eslint-plugin-import": "^2.26.0",
98+
"eslint-plugin-jsx-a11y": "^6.5.1",
99+
"eslint-plugin-prettier": "^4.0.0",
100+
"eslint-plugin-react": "^7.29.4",
100101
"gh-pages": "^0.12.0",
101102
"jest": "^25.5.4",
102103
"npm-run-all": "^4.0.1",
103104
"power-assert": "^1.4.1",
104-
"prettier": "^1.16.4",
105+
"prettier": "^2.6.2",
105106
"react": "^17.0.2",
106107
"react-addons-test-utils": "^15.6.2",
107108
"react-dom": "^17.0.2",

0 commit comments

Comments
 (0)