-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
68 lines (68 loc) · 1.75 KB
/
.eslintrc
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
{
"env": {
"browser": true,
"es6": true
},
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react/jsx-runtime", "prettier"],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"react/no-typos": 2,
"react/no-direct-mutation-state": 2,
"react/no-redundant-should-component-update": 2,
"react/sort-comp": [
2,
{
"order": ["instance-variables", "static-methods", "lifecycle", "render", "everything-else"]
}
],
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": 1,
"react/no-unused-state": 1,
"react/self-closing-comp": 1,
"react/void-dom-elements-no-children": 2,
"react/jsx-uses-vars": 1,
"react/prop-types": 0,
"@typescript-eslint/no-unused-vars": 1,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"no-empty-pattern": 2,
"@typescript-eslint/no-empty-interface": [
"error",
{
"allowSingleExtends": true
}
],
"@typescript-eslint/explicit-function-return-type": 0,
"no-multi-spaces": 2,
"@typescript-eslint/explicit-module-boundary-types": "off",
"computed-property-spacing": [2, "never"],
"object-curly-spacing": [2, "always", {}],
"object-curly-newline": 0,
"object-property-newline": [0, { "allowAllPropertiesOnSameLine": true }],
"array-bracket-spacing": [2, "never"]
}
}