-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
89 lines (89 loc) · 3.02 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
module.exports = {
extends: 'eslint:recommended',
env: {
es6: true,
node: true,
browser: false,
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
},
plugins: [],
rules: {
'arrow-parens': ['error', 'as-needed'],
'array-bracket-spacing': ['error', 'never'],
'brace-style': ['error', '1tbs'],
'camelcase': 'error',
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'computed-property-spacing': ['error', 'never'],
'consistent-return': 'error',
'consistent-this': ['error', 'self'],
'curly': ['error', 'multi-line'],
'dot-notation': 'error',
'eol-last': 'error',
'eqeqeq': ['error', 'smart'],
'guard-for-in': 'error',
'indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: { var: 2, let: 2, const: 3 } }],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'keyword-spacing': 'error',
'max-len': ['warn', 120],
'no-alert': 'error',
'no-caller': 'error',
'no-catch-shadow': 'error',
'no-console': 'warn',
'no-else-return': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-parens': 'warn',
'no-fallthrough': 'error',
'no-floating-decimal': 'error',
'no-implied-eval': 'error',
'no-inner-declarations': ['error', 'both'],
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', { max: 2 }],
'no-negated-condition': 'error',
'no-param-reassign': 'warn',
'no-redeclare': 'error',
'no-return-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow': ['error', { builtinGlobals: true }],
'no-shadow-restricted-names': 'error',
'no-spaced-func': 'error',
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-undefined': 'error',
'no-underscore-dangle': 'off',
'no-unused-vars': ['error', { vars: 'all', args: 'after-used' }],
'no-use-before-define': ['error', 'nofunc'],
'no-useless-call': 'error',
'no-useless-escape': 'error',
'no-var': 'error',
'no-warning-comments': 'off',
'no-with': 'error',
'object-curly-spacing': ['error', 'always'],
'object-shorthand': ['error', 'always'],
'prefer-arrow-callback': ['error'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'semi-spacing': ['error', { before: false, after: true }],
'space-before-blocks': 'error',
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never' }],
'space-in-parens': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'spaced-comment': ['warn', 'always', { block: { markers: ['!'], exceptions: ['*'] } }],
'strict': 'off',
'valid-jsdoc': 'warn',
'wrap-iife': ['error', 'outside'],
'yoda': ['error', 'never'],
},
};