Skip to content

Commit a6f327a

Browse files
committed
Merge branch 'migration/eslint-airbnb-typescript' into develop
2 parents 55fa21b + c93ace5 commit a6f327a

File tree

4 files changed

+64
-56
lines changed

4 files changed

+64
-56
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
out
4+
public
5+
webpack.config.js

.eslintrc

Lines changed: 33 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,70 +4,47 @@
44
"browser": true,
55
"node": true
66
},
7+
"parserOptions": {
8+
"project": [
9+
"./tsconfig.json"
10+
]
11+
},
12+
"plugins": [
13+
"@typescript-eslint",
14+
"import"
15+
],
716
"extends": [
817
"airbnb",
9-
"airbnb/hooks"
18+
"airbnb/hooks",
19+
"airbnb-typescript",
20+
"plugin:@typescript-eslint/recommended",
21+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
1022
],
1123
"rules": {
12-
"import/no-extraneous-dependencies": [
13-
"error",
14-
{
15-
"devDependencies": [
16-
"**/webpack.*",
17-
"test/**/*"
18-
]
19-
}
20-
],
2124
"max-len": [
2225
"warn",
2326
{
24-
"ignoreUrls": true
27+
"code": 80,
28+
"tabWidth": 2,
29+
"ignoreComments": true
2530
}
2631
],
27-
"sort-imports": "warn"
28-
},
29-
"settings": {
30-
"import/resolver": {
31-
"node": {
32-
"extensions": [
33-
".js",
34-
".jsx",
35-
".ts",
36-
".tsx"
37-
]
38-
},
39-
"webpack": {
40-
"config": "./webpack.config.js"
41-
}
42-
}
43-
},
44-
"overrides": [
45-
{
46-
"files": [
47-
"**/*.ts",
48-
"**/*.tsx"
49-
],
50-
"parser": "@typescript-eslint/parser",
51-
"parserOptions": {
52-
"project": "./tsconfig.json"
53-
},
54-
"plugins": [
55-
"@typescript-eslint"
56-
],
57-
"extends": [
58-
"plugin:@typescript-eslint/eslint-recommended",
59-
"plugin:@typescript-eslint/recommended",
60-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
61-
],
62-
"rules": {
63-
// This rule is already covered by the TypeScript compiler.
64-
"import/default": "off",
65-
// This rule is already covered by the TypeScript compiler.
66-
"import/no-unresolved": "off",
67-
"no-use-before-define": "off",
68-
"@typescript-eslint/no-use-before-define": "warn",
69-
"react/jsx-filename-extension": "off"
32+
// Already covered by TypeScript compiler
33+
"import/default": "off",
34+
// Already covered by TypeScript compiler
35+
"import/no-unresolved": "off",
36+
"import/order": [
37+
"error",
38+
{
39+
"alphabetize": {"order": "asc"}
7040
}
71-
}
72-
]
41+
],
42+
"no-use-before-define": "off",
43+
"@typescript-eslint/require-await": "off",
44+
"@typescript-eslint/no-use-before-define": "warn",
45+
"@typescript-eslint/no-unused-vars": [
46+
"warn", { "argsIgnorePattern": "^_" }
47+
],
48+
"@typescript-eslint/lines-between-class-members": "off"
49+
}
7350
}

package-lock.json

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"electron-builder": "^23.1.0",
5555
"eslint": "^8.19.0",
5656
"eslint-config-airbnb": "^19.0.4",
57+
"eslint-config-airbnb-typescript": "^17.0.0",
5758
"eslint-import-resolver-webpack": "^0.13.2",
5859
"eslint-plugin-import": "^2.26.0",
5960
"eslint-plugin-jsx-a11y": "^6.6.0",

0 commit comments

Comments
 (0)