forked from wenzhixin/bootstrap-table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
75 lines (75 loc) · 2.27 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
73
74
75
module.exports = {
'root': true,
'env': {
'browser': true,
'node': true
},
'parserOptions': {
'parser': 'babel-eslint',
'ecmaVersion': 2017,
'sourceType': 'module'
},
'extends': [
'eslint:recommended'
],
'rules': {
'indent': ['error',
2,
{
'SwitchCase': 1,
'MemberExpression': 1,
'ArrayExpression': 1,
'FunctionDeclaration': {'parameters': 'first'},
'CallExpression': {'arguments': 1},
'ImportDeclaration': 'first',
'ObjectExpression': 1
}
],
'linebreak-style': 'off',
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'semi-style': ['error', 'last'],
'semi-spacing': ['error', {'before': false, 'after': true}],
'camelcase': 'off',
'default-case': 'error',
'no-new-func': 'error',
'no-void': 'error',
'array-bracket-spacing': ['error', 'never'],
'no-tabs': 'error',
'one-var': ['error', 'never'],
'prefer-const': 'error',
'no-trailing-spaces': 'error',
'operator-assignment': ['error', 'always'],
'dot-location': ['error', 'property'],
'no-console': ['error', { allow: ['log', 'info', 'warn', 'error'] }],
'no-else-return': ['error', {allowElseIf: false}],
'no-case-declarations': 'off',
'no-unused-vars': 'off',
'no-multi-spaces': 'error',
'valid-jsdoc': 'warn',
'eqeqeq': 'error',
'guard-for-in': 'warn',
'no-multi-str': 'error',
'no-return-await': 'error',
'no-return-assign': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-use-before-define': 'warn',
'key-spacing': ['error', {'beforeColon': false, 'afterColon': true, 'mode': 'strict'}],
'keyword-spacing': ['error', {'before': true, 'after': true}],
'space-before-blocks': ['error', {'functions': 'always', 'keywords': 'always', 'classes': 'always'}],
'spaced-comment': ['error', 'always'],
'space-infix-ops': 'error',
'arrow-spacing': ['error', { 'before': true, 'after': true }],
'no-useless-constructor': 'warn',
'comma-dangle': ['error', 'never'],
'no-param-reassign': 'off',
'space-before-function-paren': ["error", "always"],
'no-prototype-builtins': 'off'
},
'globals': {
'$': true,
'jQuery': true,
'adsbygoogle': true
}
}