-
Notifications
You must be signed in to change notification settings - Fork 0
/
javascript.js
46 lines (44 loc) · 1.19 KB
/
javascript.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
module.exports = {
env: {
es6: true,
},
plugins: ['eslint-comments', 'import', 'prettier'],
extends: ['prettier'],
settings: {
'import/extensions': ['.js', '.jsx'],
},
rules: {
// ESLint (eslint-plugin-eslint-comments)
'eslint-comments/no-unused-disable': 'warn',
// Import/export syntax (eslint-plugin-import)
'import/no-useless-path-segments': [
'warn',
{
noUselessIndex: true,
},
],
'import/order': ['warn', { 'newlines-between': 'always' }],
// Custom
'array-callback-return': 'warn',
curly: 'warn',
'dot-notation': 'warn',
'eol-last': 'warn',
eqeqeq: ['error', 'always', { null: 'never' }],
'guard-for-in': 'warn',
'no-alert': 'warn',
'no-console': 'warn',
'no-debugger': 'warn',
'no-duplicate-imports': ['warn', { includeExports: true }],
'no-floating-decimal': 'warn',
'no-new': 'warn',
'no-proto': 'warn',
'no-return-assign': 'warn',
'no-underscore-dangle': ['warn', { allowAfterThis: true }],
'no-unneeded-ternary': 'warn',
'one-var': ['warn', 'never'],
'prefer-arrow-callback': 'warn',
'prefer-const': 'off',
radix: 'warn',
yoda: 'warn',
},
};