-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.cjs
35 lines (35 loc) · 1 KB
/
.eslintrc.cjs
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
module.exports = {
ignorePatterns: ['dist/', 'node_modules/', '.eslintrc.cjs'],
env: {
node: true,
es2021: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'prettier', 'plugin:@typescript-eslint/recommended'],
root: true,
overrides: [],
rules: {
'no-return-await': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
// We need to ignore unused variables that start with an underscore to avoid linting errors on catch(error) blocks
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
}