forked from mediamonks/muban
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
48 lines (47 loc) · 1.23 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
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
},
env: {
browser: true,
},
extends: ['airbnb-base', 'prettier'],
plugins: ['import', 'prettier'],
settings: {
// webpack integration
'import/resolver': {
webpack: {
config: 'build-tools/config/webpack/webpack.conf.base.js',
},
},
},
rules: {
'import/extensions': [
'error',
'always',
// hide known extensions that are resolved by webpack
{
js: 'never',
ts: 'never',
hbs: 'never',
},
],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'no-console': process.env.NODE_ENV === 'production' ? 1 : 0,
// prettier compatibility
'max-len': ['error', 100],
'prettier/prettier': [
'error',
{ singleQuote: true, trailingComma: 'all', printWidth: 100, tabWidth: 2 },
],
// only for use with getter-setters
'no-underscore-dangle': 0,
// to correctly work on windows with some tools that create windows line-endings
// this will be correct by git when committed
'linebreak-style': 0
},
};