-
-
Notifications
You must be signed in to change notification settings - Fork 529
/
.eslintrc.js
62 lines (62 loc) · 1.74 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
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'eslint:recommended',
'airbnb-base'
],
globals: {
MODx: 'readonly',
Ext: 'readonly',
_: 'readonly'
},
ignorePatterns: [
'manager/assets/ext3/**/*.js',
'manager/assets/fileapi/**/*.js',
'manager/assets/lib/**/*.js',
'manager/assets/modext/modx.jsgrps-min.js',
'setup/assets/js/ext-core.js',
'setup/assets/js/ext-core-debug.js'
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest'
},
rules: {
'arrow-parens': ['error', 'as-needed'],
'comma-dangle': ['error', 'never'],
'consistent-return': 0,
curly: ['error', 'all'],
eqeqeq: ['error', 'smart'],
'func-names': ['warn', 'as-needed'],
indent: ['error', 4, {
VariableDeclarator: 'first',
SwitchCase: 1
}],
'max-len': ['warn', {
code: 140,
ignoreComments: true
}],
'no-continue': 'warn',
'no-new': 'warn',
'no-param-reassign': 'warn',
'no-plusplus': ['error', {
allowForLoopAfterthoughts: true
}],
'no-underscore-dangle': 'warn',
'no-unused-vars': ['error', { args: 'none' }],
'no-use-before-define': ['error', 'nofunc'],
'object-shorthand': ['error', 'consistent'],
'one-var': ['error', 'consecutive'],
'prefer-arrow-callback': 'warn',
'prefer-rest-params': 'warn',
'semi-spacing': ['warn', {
before: false,
after: true
}],
'semi-style': ['warn', 'last'],
'space-before-function-paren': ['error', 'never']
}
};