-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
70 lines (60 loc) · 1.98 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
module.exports = {
// https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
extends: 'airbnb-base',
globals: {
// Nashorn
Java: false,
// Enonic XP
app: false,
log: false,
resolve: false,
__: false,
// Mocha
//describe: false,
//it: false,
// Client-side js
//console: false,
document: false,
window: false,
// Jquery
$: false,
jQuery: false,
}, //globals
rules: { // https://eslint.org/docs/rules
'comma-dangle': ['error', {
arrays: 'ignore',
objects: 'never',
imports: 'never',
exports: 'never',
functions: 'ignore'
}],
'import/extensions': ['off'],
'import/prefer-default-export': ['off'],
'import/no-absolute-path': ['off'],
'import/no-extraneous-dependencies': ['off'],
'import/no-unresolved': ['off'],
indent: ['warn', 'tab'],
'max-len': ['error', 160, 2, {
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'no-cond-assign': ['error', 'except-parens'],
'no-multi-spaces': ['off'],
'no-tabs': ['off'],
'no-underscore-dangle': ['error', {
allow: [
'_id', // content-type property
'_path', // content-type property
'_selected' // option-set property
],
allowAfterThis: false,
allowAfterSuper: false,
enforceInMethodNames: false,
}],
'object-curly-spacing': ['off'],
'spaced-comment': ['off']
} // rules
} // module.exports