-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.js
57 lines (57 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: 'eslint:recommended',
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2015,
sourceType: 'module',
},
plugins: ['import'],
rules: {
quotes: ['error', 'single'],
//'array-callback-return': ['error'],
camelcase: ['warn'],
semi: ['off'],
eqeqeq: ['off'],
//'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'import/named': ['error'],
'import/newline-after-import': ['warn'],
'import/no-unresolved': ['error'],
'linebreak-style': ['warn', 'unix'],
'max-classes-per-file': ['error', 1],
'no-alert': ['error'],
//'no-console': ['error'],
'no-const-assign': ['error'],
'no-debugger': ['error'],
'no-duplicate-imports': ['error'],
'no-else-return': ['error'],
'no-extra-bind': ['error'],
'no-invalid-this': ['error'],
'no-multiple-empty-lines': ['warn'],
'no-multi-spaces': [
'warn',
{ exceptions: { VariableDeclarator: true, ImportDeclaration: true } },
],
'no-restricted-globals': ['error', 'fdescribe', 'fit'],
'no-shadow': ['error'],
'no-empty': ['error', {'allowEmptyCatch': true}],
'no-trailing-spaces': ['warn'],
'no-undef': ['error'],
'no-unreachable': ['error'],
'no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', ignoreRestSiblings: true, args: 'after-used' },
],
'no-prototype-builtins': ['off'],
'no-var': ['error'],
'object-shorthand': ['warn'],
'prefer-const': ['error'],
'prefer-rest-params': ['error'],
'prefer-spread': ['warn'],
'prefer-template': ['warn'],
},
};