-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
90 lines (83 loc) · 2.46 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
module.exports = {
'parserOptions': {
'ecmaVersion': 6
},
'env': {
'node': true,
'browser': true,
'es6': true
},
'root': true,
'extends': 'eslint:recommended',
'rules': {
//Possible Errors
'comma-dangle': [ 'error', 'only-multiline' ],
'no-console': 'off',
'no-extra-parens': [ 'error', 'functions' ],
//Best Practices
'consistent-return': 'error',
'curly': [ 'warn', 'multi-or-nest', 'consistent' ],
//'curly': [ 'warn', 'multi-or-nest', {consistent: true, allowExtra: true} ],
'dot-notation': [ 'error', { allowKeywords: true } ],
'eqeqeq': 'error',
'no-alert': 'error',
'no-caller': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-fallthrough': 'error',
'no-implied-eval': 'error',
'no-iterator': 'error',
'no-labels': [ 'error', { allowLoop: true, allowSwitch: true } ],
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-multi-spaces': 'error',
'no-multi-str': 'error',
'no-native-reassign': 'error',
'no-new': 'error',
'no-new-wrappers': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-redeclare': 'error',
'no-script-url': 'error',
'no-self-assign': 'error',
'no-sequences': 'error',
'no-unused-expressions': 'error',
'no-with': 'error',
'yoda': [ 'error', 'never' ],
//Strict Mode
'strict': [ 'error', 'global' ],
//Variables
'no-catch-shadow': 'error',
'no-label-var': 'error',
'no-shadow': 'error',
'no-shadow-restricted-names': 'error',
'no-undef': 'error',
'no-undef-init': 'error',
'no-unused-vars': [ 'error', { args: 'none' } ],
'no-use-before-define': ['error', {'functions': false} ],
//Node.js and CommonJS
'no-mixed-requires': 'error',
'no-new-require': 'error',
'no-path-concat': 'error',
'no-process-exit': 'error',
'no-restricted-modules': 'error',
//Stylistic Issues
'camelcase': 'error',
'indent': [ 'error', 4, { SwitchCase: 1 } ],
'key-spacing': [ 'error', { beforeColon: false, afterColon: true } ],
'linebreak-style': [ 'error', 'unix' ],
'max-statements-per-line': 'error',
'new-cap': [ 'error', {'properties': false} ],
'new-parens': 'error',
'no-array-constructor': 'error',
'no-new-object': 'error',
'quotes': [ 'error', 'single' ],
//ECMAScript 6
'constructor-super': 'error',
'no-var': 'error',
'prefer-const': [ 'error', { 'destructuring': "all" } ],
'template-curly-spacing': 'error',
}
};