-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
34 lines (33 loc) · 914 Bytes
/
.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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['airbnb', 'prettier'],
plugins: ['import', 'promise', 'prettier'],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
rules: {
// Native
'class-methods-use-this': [0],
'new-cap': 0,
'no-restricted-syntax': 0,
'no-unused-vars': ['error', { varsIgnorePattern: '^_' }],
// Plugins
'promise/always-return': 'error',
'promise/avoid-new': 'warn',
'promise/catch-or-return': 'error',
'promise/no-callback-in-promise': 'warn',
'promise/no-native': 'off',
'promise/no-nesting': 'warn',
'promise/no-new-statics': 'error',
'promise/no-promise-in-callback': 'warn',
'promise/no-return-in-finally': 'warn',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/valid-params': 'warn',
},
};