-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
99 lines (99 loc) · 3.07 KB
/
index.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
module.exports = {
'env': {
'browser': true,
'commonjs': true,
'es6': true,
'node': true,
},
'parserOptions': {
'sourceType': 'module',
},
'plugins': [
'import',
],
'rules': {
// Posible Errors
'no-console': [ 'error', { 'allow': [ 'info', 'warn', 'error' ] } ],
'no-dupe-args': 'error',
'no-dupe-else-if': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty-character-class': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-semi': 'error',
'no-import-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-obj-calls': 'error',
'no-regex-spaces': 'error',
'no-sparse-arrays': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
// Best Practises
'dot-notation': 'error',
'eqeqeq': 'error',
'no-constructor-return': 'error',
'no-else-return': 'error',
'no-eval': 'error',
'no-fallthrough': 'error',
'no-floating-decimal': 'error',
'no-global-assign': 'error',
'no-implicit-globals': 'error',
'no-invalid-this': 'error',
'no-lone-blocks': 'error',
'no-multi-spaces': 'error',
'no-param-reassign': 'error',
'no-redeclare': 'error',
'no-script-url': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-throw-literal': 'error',
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
'require-await': 'error',
'yoda': 'error',
// Variables
'no-delete-var': 'error',
'no-shadow-restricted-names': 'error',
'no-undef': 'error',
'no-unused-vars': 'error',
// Style
'array-bracket-spacing': [ 'error', 'always', { 'singleValue': false } ],
'block-spacing': 'error',
'brace-style': [ 'error', '1tbs', { 'allowSingleLine': true } ],
'comma-dangle': [ 'error', 'always-multiline' ],
'comma-spacing': [ 'error', { 'before': false, 'after': true } ],
'eol-last': [ 'error', 'always' ],
'indent': [ 'error', 2 ],
'linebreak-style': [ 'error', 'unix' ],
'no-mixed-spaces-and-tabs': 'error',
'no-multi-assign': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'quotes': [ 'error', 'single' ],
'semi-spacing': 'error',
'semi-style': 'error',
'spaced-comment': [ 'error', 'always', { 'exceptions': ['-+'] } ],
'switch-colon-spacing': [ 'error', { 'after': true, 'before': false } ],
// ES6
'arrow-spacing': 'error',
'no-const-assign': 'error',
'no-dupe-class-members': 'error',
'no-duplicate-imports': 'error',
'no-this-before-super': 'error',
'no-useless-computed-key': 'error',
'no-var': 'error',
'prefer-const': 'error',
'require-yield': 'error',
// Plugin - Import
'import/newline-after-import': [ 'error', { 'count': 2 } ],
},
}