-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
89 lines (89 loc) · 2.66 KB
/
.eslintrc.cjs
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
79
80
81
82
83
84
85
86
87
88
89
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended"
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
ecmaFeatures: {
jsx: true
},
sourceType: "module",
warnOnUnsupportedTypeScriptVersion: false
},
plugins: [
"@typescript-eslint",
"react",
"import"
],
rules: {
"indent": [1, 4],
"@typescript-eslint/quotes": [
"warn",
"double",
{
"allowTemplateLiterals": true
}
],
"react/jsx-filename-extension": ["error", { extensions: [".js", ".jsx", ".ts", ".tsx"] }],
"class-methods-use-this": "off",
"no-param-reassign": "off",
"no-unused-expressions": "off",
"no-plusplus": 0,
"no-restricted-syntax": 0,
"consistent-return": 0,
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"import/no-unresolved": 1,
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
"@typescript-eslint/no-use-before-define": 0,
"no-use-before-define": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"no-shadow": "off",
"react/jsx-max-props-per-line": ["error", { "maximum": 1 }],
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-closing-bracket-location": [1, "tag-aligned"],
"react/jsx-closing-tag-location": "error",
"import/extensions": [
"error",
"ignorePackages",
{
"": "never",
js: "never",
jsx: "never",
ts: "never",
tsx: "never"
}
]
},
settings: {
react: {
version: "detect"
},
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
typescript: {},
node: {
paths: ["src"],
extensions: [".js", ".jsx", ".ts", ".tsx"],
moduleDirectory: ["node_modules", "src/"]
}
}
}
}