-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
121 lines (120 loc) · 4.16 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
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
111
112
113
114
115
116
117
118
119
120
121
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"extends": [
"airbnb",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json"
},
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"rules": {
"consistent-return": "off",
"jsx-a11y/anchor-is-valid": "off",
"indent": ["error", 4],
"max-len": ["error", 150],
"no-tabs": "off",
"react/jsx-filename-extension": "off",
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"semi": [2, "never"],
"comma-dangle": "off",
"arrow-body-style": 0,
"camelcase": "off",
"eqeqeq": "error",
"guard-for-in": "warn",
"lines-between-class-members": ["warn", "always"],
"no-console": "warn",
"no-debugger": "warn",
"no-param-reassign": "warn",
"no-plusplus": "warn",
"no-restricted-syntax": ["warn", "ForOfStatement"],
"no-unused-vars": "off",
"padding-line-between-statements": [
"warn",
{ "blankLine": "always", "prev": "block-like", "next": "*" },
{ "blankLine": "always", "prev": "multiline-expression", "next": "*" }
],
"prefer-const": "warn",
"sort-keys": "warn",
"react/display-name": "off",
"react/jsx-boolean-value": ["warn", "always"],
"react/jsx-no-target-blank": "off",
"react/jsx-uses-vars": "warn",
"react/no-access-state-in-setstate": "error",
"react/no-deprecated": "warn",
"react/no-did-mount-set-state": "warn",
"react/no-did-update-set-state": "warn",
"react/no-direct-mutation-state": "error",
"react/no-find-dom-node": "warn",
"react/no-this-in-sfc": "error",
"react/no-unescaped-entities": "warn",
"react/no-unused-prop-types": "warn",
"react/no-unused-state": "warn",
"react/no-will-update-set-state": "warn",
"react/prefer-stateless-function": "warn",
"react/require-default-props": "warn",
"react/sort-prop-types": "warn",
"react/style-prop-object": "warn",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "warn",
"@typescript-eslint/array-type": "warn",
"@typescript-eslint/camelcase": "warn",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/interface-name-prefix": ["warn", "always"],
"@typescript-eslint/consistent-type-assertions": [
"warn",
{
"assertionStyle": "as",
"objectLiteralTypeAssertions": "allow-as-parameter"
}
],
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/consistent-type-definitions": "off"
},
"overrides": [
{
"files": ["*.spec.tsx", "*.spec.ts"],
"rules": {
"sort-keys": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/consistent-type-assertions": "off"
}
},
{
"files": ["*.service.ts"],
"rules": {
"sort-keys": "off"
}
}
]
}