-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
109 lines (107 loc) · 3 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
module.exports = {
root: true,
'extends': [
'eslint-config-airbnb-base',
'eslint-config-airbnb-base/rules/strict',
],
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
ecmaFeatures: {
impliedStrict: true
}
},
'settings': {
'import/resolver': {
'webpack': {
'config': 'webpack.config.js',
}
}
},
env: {
browser: true,
es6: true,
amd: true,
commonjs: true
},
rules: {
'no-trailing-spaces': 'warn',
'padded-blocks' : 'warn',
'no-unused-vars': 'warn',
'no-plusplus': 'off',
// this option sets a specific tab width for your code
// http://eslint.org/docs/rules/indent
indent: ['warn', 4, {
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
// MemberExpression: null,
// CallExpression: {
// parameters: null,
// },
FunctionDeclaration: {
parameters: 1,
body: 1
},
FunctionExpression: {
parameters: 1,
body: 1
}
}],
'one-var': ['error', 'never'],
'valid-jsdoc': ['error', {
requireReturn: false,
requireParamDescription: false,
requireReturnDescription: false,
}],
// TODO reactivate this rule once a proper npm package is made
// a good configuration might be:
/*'import/no-extraneous-dependencies': ['error', {
devDependencies: ['test/**', 'tests/**', 'examples/**'],
}],*/
'import/no-extraneous-dependencies': 'off',
// TODO reactivate all the following rules
// maybe 'no-mixed-operators': ['error', { allowSamePrecedence: true }],
'no-mixed-operators': 'off',
'no-use-before-define': ['error', { 'functions': false }],
// should probably be
// 'no-underscore-dangle': ['error', { allowAfterThis: true, allowAfterSuper: true }],
'no-underscore-dangle': 'off',
'eqeqeq': 'off',
// what len ? Airbnb does 100. github wraps line above 80
'max-len': 'off',
'no-param-reassign': 'off',
'no-else-return': 'off',
'no-var': 'off',
'vars-on-top': 'off',
'no-shadow': 'off',
'no-restricted-properties': 'off',
'prefer-spread': 'off',
'prefer-destructuring': 'off',
'function-paren-newline': 'off',
'operator-linebreak': 'off',
'object-curly-newline': 'off',
'curly': ['error', 'all'],
'no-multiple-empty-lines': 'off',
'no-restricted-globals': 'off',
'implicit-arrow-linebreak': 'off',
'prefer-promise-reject-errors': 'off',
'no-multi-spaces': 'off',
'import/no-cycle': 'off',
'import/no-useless-path-segments': 'off',
'camelcase': 'off',
'switch-colon-spacing': 'off',
'lines-between-class-members': 'off',
'no-bitwise': 'off',
'no-restricted-syntax': 'off',
'consistent-return': 'off',
'brace-style': ['error', "1tbs", { "allowSingleLine": true } ],
'new-cap': 'off',
'no-continue': 'off',
'no-console': [ 'warn', { allow: ['warn', 'error'] } ],
'class-methods-use-this' : 'off',
},
"globals": {
"__DEBUG__": false
}
}