-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy path.eslintrc.js
38 lines (38 loc) · 1.65 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
module.exports = {
root: true,
extends: 'airbnb',
plugins: ["output-todo-comments"],
parser: 'babel-eslint',
rules: {
indent: ['error', 4, { 'SwitchCase': 1 }],
'no-var': 'error',
'prefer-rest-params': 0, // arguments work faster
'no-param-reassign': ["error", { "props": false }],
'no-underscore-dangle': 0, // for some hacks and array methods underscore prefix/suffix is required
'no-use-before-define': 0, // impossible to follow
'global-require': 0, // allow to fix circular refs
'new-cap': ['error', {"capIsNewExceptions": ['Class']}],
'comma-dangle': ["error", "never"], // personal preference
'no-continue': 0, // continue statements are useful to flatten nested blocks
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/no-unresolved': ['error', { ignore: ['^src'] }], // allow to use 'src/' in tests
'no-cond-assign': ['error', 'except-parens'], // sometimes it's needed in while()
'max-lines': ["error", 210], // we may want to decrease this number later
'no-plusplus': ["error", { "allowForLoopAfterthoughts": true }], // x++ is used very often in cycles
'class-methods-use-this': 0, // it't not required to use this in class methods
'no-bitwise': ["error", { "allow": ["~"] }], // allow to use ~x.indexOf
'output-todo-comments/output-todo-comments': [
'warn', {
terms: ['todo'],
location: 'start',
}
]
},
env: {
jasmine: true
},
globals: {
nofn: true,
window: true
}
};