-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
78 lines (74 loc) · 2.04 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/strict",
"plugin:eslint-comments/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "jsx-a11y", "github", "import"],
"rules": {
"@typescript-eslint/ban-ts-comment": "warn",
"curly": "error",
"no-console": [
"warn",
{
"allow": ["debug", "warn", "error"]
}
],
"quotes": [
"warn",
"single",
{
"avoidEscape": true
}
],
"prefer-template": "warn",
"eqeqeq": ["warn", "smart"],
"no-lonely-if": "warn",
"no-multi-assign": "warn",
"@typescript-eslint/no-shadow": "warn",
"no-useless-return": "warn",
"no-useless-rename": "warn",
"one-var-declaration-per-line": "warn",
"prefer-object-spread": "warn",
"no-unreachable-loop": "warn",
"no-template-curly-in-string": "warn",
"default-case-last": "warn",
"no-array-constructor": "warn",
"no-else-return": "warn",
"array-callback-return": "warn",
"@typescript-eslint/consistent-type-definitions": ["warn", "type"],
// based on https://github.com/github/eslint-plugin-github/blob/main/lib/configs/react.js
"github/a11y-no-generic-link-text": "error",
"import/first": "error",
"import/no-absolute-path": "error",
// disabled: slow linting
/*"import/no-cycle": "error",*/
"import/no-duplicates": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
"import/prefer-default-export": ["warn"]
},
"ignorePatterns": [".eslintrc.js"]
}