-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
43 lines (42 loc) · 1.12 KB
/
.eslintrc.js
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
const { configure, presets } = require('eslint-kit')
module.exports = configure({
mode: 'only-errors',
allowDebug: process.env.NODE_ENV !== 'production',
root: __dirname,
presets: [
presets.node(),
presets.prettier({
singleQuote: true,
trailingComma: 'none',
endOfLine: 'auto'
}),
presets.typescript(),
presets.react(),
presets.imports({
sort: {
newline: true
}
})
],
extend: {
root: true,
plugins: ['prefer-arrow'],
rules: {
'react/react-in-jsx-scope': 'off',
quotes: [2, 'single', { avoidEscape: true }],
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/member-delimiter-style': [
'error',
{ multiline: { delimiter: 'none' } }
],
'import/no-unresolved': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'import/extensions': 'off',
'react-hooks/exhaustive-deps': 'warn',
'react/no-array-index-key': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'dot-notation': 'off',
'prefer-arrow/prefer-arrow-functions': 'error'
}
}
})