forked from vitmalina/w2ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
68 lines (68 loc) · 2.04 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 = {
'env': {
'browser': true,
'es2021': true
},
// "extends": "eslint:recommended",
'parserOptions': {
'ecmaVersion': 12,
'sourceType': 'module'
},
plugins : [
'align-assignments',
],
'globals': {
'$': 'readonly',
'app': 'readonly',
'define': 'readonly',
'exports': 'readonly',
'jQuery': 'readonly',
'module': 'readonly',
'w2ui': 'readonly',
'w2obj': 'readonly',
'w2utils': 'readonly',
'w2popup': 'readonly',
'w2alert': 'readonly',
'w2confirm': 'readonly',
'w2prompt': 'readonly'
},
'rules': {
'indent': ['error', 4, {
'SwitchCase': 1,
'ignoredNodes': ['ConditionalExpression'],
'FunctionDeclaration': {'parameters': 'first'}
}],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'no-var': 'error',
'no-unused-vars': ['warn', { 'vars': 'local', 'args': 'none' }],
'no-extra-parens': 'off',
'dot-notation': 'warn',
'grouped-accessor-pairs': 'warn',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-extend-native': 'error',
'no-multi-spaces': [ 'error', {
ignoreEOLComments : true,
exceptions : {
VariableDeclarator : true,
AssignmentPattern : true,
AssignmentExpression : true
}
}],
// 'align-assignments/align-assignments': ['error', { requiresOnly: false } ],
// 'key-spacing' : [ 'error', {
// mode : 'strict',
// beforeColon : false,
// afterColon : true,
// align : 'colon'
// }],
'func-call-spacing': 'warn',
'func-name-matching': 'warn',
// "func-names": ["warn", "always"],
'no-inner-declarations': 'off',
'no-undef': 'error',
'no-unreachable': 'off'
}
}