/
.eslintrc.js
43 lines (43 loc) · 1.04 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
/** @type {import('eslint').ESLint.ConfigData} */
module.exports = {
env: {
node: true,
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:promise/recommended',
'prettier',
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
camelcase: 0,
'no-param-reassign': 'warn',
'require-await': 'error',
'no-use-before-define': 0,
'no-restricted-syntax': 0,
'no-await-in-loop': 0,
'prefer-template': 'off',
'promise/always-return': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/catch-or-return': 'error',
'promise/no-native': 'off',
'promise/no-nesting': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'warn',
},
overrides: [
{
// files to check, so no `--ext` is required
files: ['**/*.{js,mjs,cjs}'],
},
],
};