Skip to content

Commit 0e4ed3f

Browse files
authored
add @typescript-eslint/parser and update eslint configs
1 parent 4b05e90 commit 0e4ed3f

File tree

3 files changed

+49
-11
lines changed

3 files changed

+49
-11
lines changed

.eslintrc.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,19 @@ module.exports = {
77
{
88
files: ['**/*.ts', '**/*.tsx'],
99
extends: [
10-
'airbnb-typescript',
10+
'airbnb-base',
11+
'airbnb-typescript/base',
1112
'airbnb/hooks',
1213
'plugin:@typescript-eslint/recommended',
14+
'plugin:import/recommended',
15+
'plugin:import/typescript',
1316
'prettier',
1417
],
1518
parserOptions: {
1619
tsconfigRootDir: __dirname,
1720
project: './tsconfig.json',
1821
},
1922
rules: {
20-
'import/order': [
21-
'error',
22-
{
23-
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
24-
'newlines-between': 'always',
25-
alphabetize: {
26-
order: 'asc',
27-
},
28-
},
29-
],
3023
'no-underscore-dangle': [
3124
'error',
3225
{

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@types/jest": "^27.0.0",
5454
"@types/node": "^16.0.0",
5555
"@typescript-eslint/eslint-plugin": "^5.0.0",
56+
"@typescript-eslint/parser": "^5.4.0",
5657
"eslint": "^8.0.0",
5758
"eslint-config-airbnb": "^19.0.0",
5859
"eslint-config-airbnb-typescript": "^16.0.0",

yarn.lock

+44
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,16 @@
10651065
eslint-scope "^5.1.1"
10661066
eslint-utils "^3.0.0"
10671067

1068+
"@typescript-eslint/parser@^5.4.0":
1069+
version "5.4.0"
1070+
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.4.0.tgz#3aa83ce349d66e39b84151f6d5464928044ca9e3"
1071+
integrity sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==
1072+
dependencies:
1073+
"@typescript-eslint/scope-manager" "5.4.0"
1074+
"@typescript-eslint/types" "5.4.0"
1075+
"@typescript-eslint/typescript-estree" "5.4.0"
1076+
debug "^4.3.2"
1077+
10681078
"@typescript-eslint/scope-manager@5.3.1":
10691079
version "5.3.1"
10701080
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz#3cfbfbcf5488fb2a9a6fbbe97963ee1e8d419269"
@@ -1073,11 +1083,24 @@
10731083
"@typescript-eslint/types" "5.3.1"
10741084
"@typescript-eslint/visitor-keys" "5.3.1"
10751085

1086+
"@typescript-eslint/scope-manager@5.4.0":
1087+
version "5.4.0"
1088+
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz#aaab08415f4a9cf32b870c7750ae8ba4607126a1"
1089+
integrity sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==
1090+
dependencies:
1091+
"@typescript-eslint/types" "5.4.0"
1092+
"@typescript-eslint/visitor-keys" "5.4.0"
1093+
10761094
"@typescript-eslint/types@5.3.1":
10771095
version "5.3.1"
10781096
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.3.1.tgz#afaa715b69ebfcfde3af8b0403bf27527912f9b7"
10791097
integrity sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==
10801098

1099+
"@typescript-eslint/types@5.4.0":
1100+
version "5.4.0"
1101+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.4.0.tgz#b1c130f4b381b77bec19696c6e3366f9781ce8f2"
1102+
integrity sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==
1103+
10811104
"@typescript-eslint/typescript-estree@5.3.1":
10821105
version "5.3.1"
10831106
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.3.1.tgz#50cc4bfb93dc31bc75e08ae52e29fcb786d606ec"
@@ -1091,6 +1114,19 @@
10911114
semver "^7.3.5"
10921115
tsutils "^3.21.0"
10931116

1117+
"@typescript-eslint/typescript-estree@5.4.0":
1118+
version "5.4.0"
1119+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz#fe524fb308973c68ebeb7428f3b64499a6ba5fc0"
1120+
integrity sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==
1121+
dependencies:
1122+
"@typescript-eslint/types" "5.4.0"
1123+
"@typescript-eslint/visitor-keys" "5.4.0"
1124+
debug "^4.3.2"
1125+
globby "^11.0.4"
1126+
is-glob "^4.0.3"
1127+
semver "^7.3.5"
1128+
tsutils "^3.21.0"
1129+
10941130
"@typescript-eslint/visitor-keys@5.3.1":
10951131
version "5.3.1"
10961132
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz#c2860ff22939352db4f3806f34b21d8ad00588ba"
@@ -1099,6 +1135,14 @@
10991135
"@typescript-eslint/types" "5.3.1"
11001136
eslint-visitor-keys "^3.0.0"
11011137

1138+
"@typescript-eslint/visitor-keys@5.4.0":
1139+
version "5.4.0"
1140+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz#09bc28efd3621f292fe88c86eef3bf4893364c8c"
1141+
integrity sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==
1142+
dependencies:
1143+
"@typescript-eslint/types" "5.4.0"
1144+
eslint-visitor-keys "^3.0.0"
1145+
11021146
abab@^2.0.3, abab@^2.0.5:
11031147
version "2.0.5"
11041148
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"

0 commit comments

Comments
 (0)