Skip to content

Commit 05d561a

Browse files
committed
new eslint
1 parent b09788f commit 05d561a

File tree

3 files changed

+51
-42
lines changed

3 files changed

+51
-42
lines changed

.eslintrc

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
{
2-
"extends": "airbnb",
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"es6": true,
6+
"node": true,
7+
"jest": true
8+
},
9+
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:jsx-a11y/recommended"],
10+
"parserOptions": {
11+
"ecmaFeatures": {
12+
"experimentalObjectRestSpread": true,
13+
"jsx": true
14+
},
15+
"sourceType": "module"
16+
},
17+
"plugins": ["import", "react", "react-hooks"],
318
"rules": {
4-
"no-var": 0,
5-
"func-names": 0,
6-
"space-before-function-paren": 0,
7-
"comma-dangle": 0,
8-
"semi": ["error", "never"],
9-
"no-unexpected-multiline": 1,
10-
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
11-
"max-len": 0,
12-
"react/prop-types": 0,
13-
"arrow-body-style": 0,
14-
"no-use-before-define": ["error", { "functions": false, "classes": true }],
15-
"no-multi-spaces": ["error", { "exceptions": { "VariableDeclarator": true } }],
16-
"curly": 0,
17-
"no-nested-ternary": 0,
18-
"no-unused-vars": 2,
19-
"no-shadow": 0
19+
"import/no-unresolved": "error",
20+
"no-duplicate-imports": "error",
21+
"react/prop-types": "off",
22+
"react/display-name": "off",
23+
"react-hooks/rules-of-hooks": "error",
24+
"react-hooks/exhaustive-deps": "error",
25+
"no-console": ["error", { "allow": ["error"] }]
26+
},
27+
"settings": {
28+
"react": {
29+
"version": "detect"
30+
}
2031
}
2132
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"css-loader": "^3.2.0",
2626
"electron-packager": "^14.0.4",
2727
"eslint": "^6.1.0",
28-
"eslint-config-airbnb": "^18.0.1",
2928
"eslint-plugin-import": "^2.18.2",
3029
"eslint-plugin-jsx-a11y": "^6.2.3",
3130
"eslint-plugin-react": "^7.14.3",

yarn.lock

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,11 +2262,6 @@ [email protected]:
22622262
write-file-atomic "^2.0.0"
22632263
xdg-basedir "^3.0.0"
22642264

2265-
confusing-browser-globals@^1.0.7:
2266-
version "1.0.8"
2267-
resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.8.tgz#93ffec1f82a6e2bf2bc36769cc3a92fa20e502f3"
2268-
integrity sha512-lI7asCibVJ6Qd3FGU7mu4sfG4try4LX3+GVS+Gv8UlrEf2AeW57piecapnog2UHZSbcX/P/1UDWVaTsblowlZg==
2269-
22702265
console-browserify@^1.1.0:
22712266
version "1.1.0"
22722267
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
@@ -3048,24 +3043,6 @@ escodegen@^1.9.0:
30483043
optionalDependencies:
30493044
source-map "~0.6.1"
30503045

3051-
eslint-config-airbnb-base@^14.0.0:
3052-
version "14.0.0"
3053-
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.0.0.tgz#8a7bcb9643d13c55df4dd7444f138bf4efa61e17"
3054-
integrity sha512-2IDHobw97upExLmsebhtfoD3NAKhV4H0CJWP3Uprd/uk+cHuWYOczPVxQ8PxLFUAw7o3Th1RAU8u1DoUpr+cMA==
3055-
dependencies:
3056-
confusing-browser-globals "^1.0.7"
3057-
object.assign "^4.1.0"
3058-
object.entries "^1.1.0"
3059-
3060-
eslint-config-airbnb@^18.0.1:
3061-
version "18.0.1"
3062-
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.0.1.tgz#a3a74cc29b46413b6096965025381df8fb908559"
3063-
integrity sha512-hLb/ccvW4grVhvd6CT83bECacc+s4Z3/AEyWQdIT2KeTsG9dR7nx1gs7Iw4tDmGKozCNHFn4yZmRm3Tgy+XxyQ==
3064-
dependencies:
3065-
eslint-config-airbnb-base "^14.0.0"
3066-
object.assign "^4.1.0"
3067-
object.entries "^1.1.0"
3068-
30693046
eslint-import-resolver-node@^0.3.2:
30703047
version "0.3.2"
30713048
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"
@@ -6036,6 +6013,11 @@ neo-async@^2.6.0, neo-async@^2.6.1:
60366013
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
60376014
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
60386015

6016+
nice-try@^1.0.4:
6017+
version "1.0.5"
6018+
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
6019+
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
6020+
60396021
node-fetch@^1.0.1:
60406022
version "1.7.1"
60416023
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5"
@@ -6681,7 +6663,7 @@ path-is-absolute@^1.0.0:
66816663
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
66826664
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
66836665

6684-
path-key@^2.0.0:
6666+
path-key@^2.0.0, path-key@^2.0.1:
66856667
version "2.0.1"
66866668
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
66876669
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
@@ -7959,6 +7941,18 @@ shallow-clone@^3.0.0:
79597941
dependencies:
79607942
kind-of "^6.0.2"
79617943

7944+
shebang-command@^1.2.0:
7945+
version "1.2.0"
7946+
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
7947+
integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
7948+
dependencies:
7949+
shebang-regex "^1.0.0"
7950+
7951+
shebang-regex@^1.0.0:
7952+
version "1.0.0"
7953+
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
7954+
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
7955+
79627956
shelljs@^0.8.3:
79637957
version "0.8.3"
79647958
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
@@ -8004,6 +7998,11 @@ slice-ansi@^2.1.0:
80047998
astral-regex "^1.0.0"
80057999
is-fullwidth-code-point "^2.0.0"
80068000

8001+
slide@^1.1.5:
8002+
version "1.1.6"
8003+
resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
8004+
integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=
8005+
80078006
snapdragon-node@^2.0.1:
80088007
version "2.1.1"
80098008
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"

0 commit comments

Comments
 (0)