forked from dvgis/dc-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
40 lines (40 loc) · 946 Bytes
/
.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
module.exports = {
root: true,
env: {
node: true,
},
plugins: ['prettier'],
extends: ['plugin:prettier/recommended', 'plugin:react/recommended'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'global-require': 0,
//强制使用单引号
quotes: ['error', 'single'],
indent: 0,
'no-new': 0,
camelcase: 0,
'padded-blocks': 0,
'no-unused-vars': 0,
'no-trailing-spaces': 0,
'no-mixed-spaces-and-tabs': 0,
'space-before-function-paren': [0, 'always'],
'no-multiple-empty-lines': 0,
'react/prop-types': 0,
},
globals: {
React: false,
Fetch: false,
Hub: false,
echarts: false,
axios: false,
Cesium: false,
DC: false,
'%=': false,
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
parser: 'babel-eslint',
},
}