-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
68 lines (68 loc) · 1.67 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
module.exports = {
extends: ['eslint:recommended', 'prettier', 'react-app'],
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
parser: 'babel-eslint',
env: {
browser: true,
jquery: true,
node: true,
mocha: true,
es6: true
},
globals: {
zhuge: true,
getModule: true,
log: true,
wx: true
},
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: false,
printWidth: 160,
tabWidth: 4,
jsxBracketSameLine: true
}
],
'jsx-a11y/alt-text': 0,
'jsx-a11y/anchor-is-valid': 0,
'jsx-a11y/href-no-hash': 0,
'no-console': 1,
'no-debugger': 1,
'no-unused-expressions': 1,
'no-case-declarations': 1,
'no-unused-vars': 1,
'max-len': ['error', { code: 160, tabWidth: 4, ignoreTemplateLiterals: true }],
'max-lines': [1, { skipComments: true }],
'prefer-arrow-callback': 1,
// semi: [2, 'always'],
strict: 0,
'default-case': 2,
// indent: [2, 4, { SwitchCase: 1 }],
'no-multi-spaces': [
1,
{
exceptions: {
VariableDeclarator: true,
FunctionExpression: true
}
}
],
'key-spacing': [
0,
{
align: 'value'
}
],
'no-underscore-dangle': 0
},
plugins: ['react', 'prettier']
}