-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
62 lines (56 loc) · 1.41 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 = {
extends: [
'airbnb-base',
//'plugin:react/recommended'
'standard-react'
],
globals: {
// Nashorn
Java: false,
// Enonic XP
app: false,
log: false,
resolve: false,
__: false
}, // globals
rules: {
'arrow-parens': ['error', 'as-needed'],
'comma-dangle': ['error', {
arrays: 'never',
objects: 'never',
imports: 'never',
exports: 'never',
functions: 'never'
}],
'function-paren-newline': ['off'],
'import/extensions': ['off'],
'import/no-absolute-path': ['off'],
'import/no-extraneous-dependencies': ['off'],
'import/no-unresolved': ['warn', {
ignore: [ // Should be same as webpack externals:
'/lib/xp/.+'
]
}],
'import/prefer-default-export': ['off'],
'max-len': ['warn', 160, 2, {
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'object-curly-spacing': ['off'],
'spaced-comment': ['off']
}, // rules
settings: {
/*'import/core-modules': [
'/lib/xp/portal'
]*/
//'import/ignore': [] // import/no-unresolved has its own ignore
/*'import/resolver': { // Does not work with externals, and perhaps not babel.js
'webpack': {
config: './webpack.config.babel.js'
}
}*/
} // settings
} // module.exports