-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
72 lines (72 loc) · 1.41 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
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
module.exports = {
plugins: ['prettier'],
extends: ['eslint:recommended', 'prettier', 'prettier/react'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 11,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
env: {
browser: true,
node: true,
jest: true
},
rules: {
'no-debugger': 2,
'no-alert': 2,
'no-await-in-loop': 0,
'no-return-assign': ['error', 'except-parens'],
'no-restricted-syntax': [
2,
'ForInStatement',
'LabeledStatement',
'WithStatement'
],
'no-unused-vars': [
0,
{
ignoreSiblings: true,
argsIgnorePattern: 'React|res|next|^_'
}
],
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-unused-expressions': [
2,
{
allowTaggedTemplates: true
}
],
'no-console': 1,
'comma-dangle': 2,
'jsx-quotes': [2, "prefer-double"],
// 'react/jsx-filename-extension': [1, { "extensions": [".js"] }],
// 'react/forbid-component-props': 0,
quotes: [
2,
'single',
{
avoidEscape: true,
allowTemplateLiterals: true
}
],
'prettier/prettier': [
'error',
{
semi: true,
bracketSpacing: true,
trailingComma: 'none',
jsxBracketSameLine: false,
singleQuote: true,
printWidth: 80
}
]
}
};