-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
58 lines (57 loc) · 1.69 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
module.exports = {
env: {
node: true,
jquery: true,
},
extends: [
'eslint:recommended',
'plugin:promise/recommended',
'plugin:unicorn/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended',
'prettier',
],
plugins: ['html', 'promise', 'jest', 'prettier'],
globals: { RED: true },
rules: {
'prettier/prettier': [
'warn',
{
trailingComma: 'es5',
tabWidth: 4,
useTabs: false,
semi: true,
singleQuote: true,
bracketSpacing: true,
endOfLine: 'auto',
printWidth: 120,
},
],
'no-var': 'error',
'prefer-arrow-callback': 'off', // can be dangerous with --fix option
'capitalized-comments': 'off',
'no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
vars: 'all',
varsIgnorePattern: '^_',
},
],
'promise/always-return': 'off',
'promise/no-return-wrap': 'warn',
'promise/param-names': 'warn',
'promise/catch-or-return': 'warn',
'promise/no-native': 'off',
'promise/no-nesting': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'off',
'promise/no-new-statics': 'error',
'promise/no-return-in-finally': 'warn',
'promise/valid-params': 'warn',
'unicorn/prefer-module': 'off',
'unicorn/prefer-node-protocol': 'off',
},
};