forked from Jines-z/rs-admin-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
67 lines (67 loc) · 2.32 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
module.exports = {
root: true,
parser: 'babel-eslint',
env: {
browser : true,
commonjs: true,
es6 : true
},
extends: [
'standard',
'plugin:react/recommended'
],
globals: {
JSBridge : true,
window : true,
document : true,
wx : true,
__ENV__ : true
},
parserOptions: {
sourceType : 'module',
ecmaVersion : 6,
ecmaFeatures: {
jsx: true
}
},
plugins: [
'standard'
],
settings: {
'import/resolver': {
'node': {
'extensions': [
'.js',
'.jsx'
]
}
},
'react': {
'version': '16.2.0'
}
},
rules: {
'indent' : ['error', 4, { 'SwitchCase': 1 }],
'eqeqeq' : 'off',
'camelcase' : 'off',
'no-extra-boolean-cast' : 'off',
'padded-blocks' : 'off',
'eol-last' : 'off',
'no-useless-escape' : 'off',
'no-useless-constructor' : 'off',
'semi' : ['error', "never"],
'arrow-parens' : ['error', 'as-needed'],
'no-multiple-empty-lines' : ['error', { 'max': 1 }],
'space-before-function-paren' : ['error', 'never'],
'no-trailing-spaces' : ['error', { 'skipBlankLines': true }],
'jsx-quotes' : ['error', 'prefer-single'],
'no-unreachable' : process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger' : process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-console' : process.env.NODE_ENV === 'production' ? 'error' : 'off',
'react/prop-types' : 'off',
"react/no-array-index-key" : 'off',
'react/jsx-closing-bracket-location': 'error',
"react/self-closing-comp" : ['error', {"component": true, "html": false}],
'react/jsx-tag-spacing' : ['error', {'beforeSelfClosing': 'always'}]
}
}