-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.yml
More file actions
178 lines (178 loc) · 4.68 KB
/
Copy path.eslintrc.yml
File metadata and controls
178 lines (178 loc) · 4.68 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
extends:
- eslint:recommended
- react-app
- plugin:react/recommended
- plugin:jsx-a11y/recommended
- prettier
- "prettier/@typescript-eslint"
plugins:
- "@typescript-eslint"
- jsx-a11y
- import
- react
- react-hooks
env:
jest: true
settings:
import/resolver:
node:
extensions:
- ".js"
- ".jsx"
- ".mjs"
- ".json"
- ".ts"
- ".tsx"
paths:
- src
rules:
# ================== Possible Errors ==================
no-await-in-loop: warn
no-console: warn
no-template-curly-in-string: warn
# ================== Best Practices ==================
array-callback-return: error
block-scoped-var: error
class-methods-use-this:
- error
- exceptMethods: ["render"]
consistent-return: error
default-case: warn
dot-notation: error
eqeqeq:
- error
- smart
guard-for-in: error
no-alert: warn
no-caller: error
no-div-regex: warn
no-else-return: warn
no-empty-function:
- warn
- allow:
- arrowFunctions
no-eval: error
no-extra-bind: error
no-extra-label: error
no-floating-decimal: error
no-implicit-coercion: error
no-implicit-globals: warn
no-implied-eval: error
no-loop-func: error
no-multi-str: warn
no-new: warn
no-new-func: warn
no-new-wrappers: error
no-octal-escape: warn
no-proto: warn
no-return-assign: error
no-return-await: error
no-self-compare: error
no-sequences: error
no-unmodified-loop-condition: warn
no-unused-expressions: warn
no-useless-call: warn
no-useless-concat: warn
no-useless-return: error
prefer-promise-reject-errors: warn
radix:
- warn
- as-needed
require-await: error
vars-on-top: error
wrap-iife:
- error
- inside
- functionPrototypeMethods: true
# ================== Variables ==================
no-label-var: error
no-shadow:
- warn
- hoist: functions
no-undef-init: error
no-use-before-define: error
# ================== Node ==================
callback-return: error
handle-callback-err: error
no-buffer-constructor: error
no-path-concat: error
no-process-exit: warn
no-sync: warn
# ================== Style ==================
consistent-this:
- error
- that
new-parens: error
no-array-constructor: error
no-bitwise: warn
no-lonely-if: warn
no-mixed-operators: warn
no-nested-ternary: error
no-new-object: error
no-unneeded-ternary: error
prefer-object-spread: warn
# ================== ES6 ==================
no-duplicate-imports: warn
no-useless-computed-key: error
no-useless-constructor: warn
no-useless-rename: error
no-var: error
object-shorthand:
- error
- always
- avoidQuotes: true
avoidExplicitReturnArrows: true
prefer-arrow-callback: error
prefer-const: error
prefer-destructuring:
- warn
- object: true
prefer-numeric-literals: error
prefer-rest-params: warn
prefer-spread: warn
prefer-template: error
symbol-description: warn
# ================== Import ==================
import/no-unresolved: error
import/named: error
import/no-self-import: error
import/namespace: error
import/no-cycle: error
import/no-useless-path-segments: error
import/export: error
import/no-named-as-default: error
import/no-named-as-default-member: error
import/no-deprecated: error
import/no-extraneous-dependencies:
- error
- devDependencies:
- "test/**" # tape, common npm pattern
- "tests/**" # also common npm pattern
- "**/__tests__/**" # jest pattern
- "**/__mocks__/**" # jest pattern
- "test.{js,jsx}" # repos with a single test file
- "test-*.{js,jsx}" # repos with multiple top-level test files
- "**/*{.,_}{test,spec}.{js,jsx}" # tests where the extension or filename suffix denotes that it is a test
- "**/jest.config.js" # jest config
- "**/jest.setup.js" # jest setup
- "**/webpack.config.js" # webpack config
- "**/webpack.config.*.js" # webpack config
- "**/gulpfile.js" # gulp config
- "**/gulpfile.*.js" # gulp config
optionalDependencies: false
import/no-mutable-exports: error
import/prefer-default-export: warn
import/no-unassigned-import: warn
# ================== React ==================
react/destructuring-assignment:
- error
- always
react/prop-types: off # using TS
# ================== React Hooks ==================
react-hooks/rules-of-hooks: error
react-hooks/exhaustive-deps: warn
# ================== Typescript ===================
"@typescript-eslint/indent": off
"@typescript-eslint/explicit-function-return-type": off
"@typescript-eslint/member-delimiter-style": off
"@typescript-eslint/prefer-interface": off