Skip to content

Commit c93ace5

Browse files
committed
Update .eslintrc
- Updated `.eslintrc` for a simplier config. - Added `.eslintignore` to prevent linting on unrelated files.
1 parent 2709500 commit c93ace5

File tree

2 files changed

+38
-56
lines changed

2 files changed

+38
-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
}

0 commit comments

Comments
 (0)