-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
110 lines (110 loc) · 3.06 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"overrides": [
{
"files": ["**/*.ts?(x)", "**/*.js?(x)"],
"rules": {
"react/jsx-no-useless-fragment": [
"error",
{ "allowExpressions": true }
],
"no-nested-ternary": "error",
"no-unused-vars": "warn",
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
],
"semi": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/semi": "off",
"@typescript-eslint/space-before-function-paren": ["off", "never"],
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-var-requires": 0,
"react-hooks/exhaustive-deps": "warn",
"unicode-bom": 0,
"react/jsx-curly-brace-presence": [
"warn",
{ "props": "never", "children": "never" }
],
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/member-delimiter-style": [
"off",
{
"multiline": {
"delimiter": "semi",
"requireLast": false
},
"singleline": {
"delimiter": "semi",
"requireLast": false
},
"multilineDetection": "brackets"
}
],
"@typescript-eslint/no-this-alias": [
"error",
{
"allowDestructuring": true,
// Allow const { props, state } = this; false by default
"allowedNames": ["me"]
// Allow const me= this; [] by default
}
],
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/no-useless-constructor": "off",
"no-debugger": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": "warn",
"simple-import-sort/imports": "off",
"simple-import-sort/exports": "off",
"unused-imports/no-unused-imports": "warn",
"react/jsx-sort-props": [
"warn",
{
"shorthandLast": true,
"callbacksLast": true,
"multiline": "ignore",
"ignoreCase": true,
"noSortAlphabetically": false,
"reservedFirst": true,
"locale": "auto"
}
]
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"simple-import-sort",
"unused-imports",
"jest"
],
"settings": {
"react": {
"version": "detect"
}
}
}