-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
40 lines (40 loc) · 1.43 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
36
37
38
39
40
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'unicorn', 'sonarjs', 'vitest', 'promise'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
'prettier',
'plugin:unicorn/all',
'plugin:sonarjs/recommended',
'plugin:vitest/all',
'plugin:promise/recommended',
],
rules: {
'unicorn/prevent-abbreviations': 'off',
'unicorn/no-keyword-prefix': 'off',
'unicorn/catch-error-name': ['error', { name: 'err' }],
'unicorn/prefer-ternary': ['error', 'only-single-line'],
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, argsIgnorePattern: '^_' },
],
'unicorn/no-new-array': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/import-index': ['error', { ignoreImports: true }],
'unicorn/filename-case': ['error', { case: 'camelCase' }],
'sonarjs/no-duplicate-string': ['error', { threshold: 5 }],
'vitest/prefer-each': 'off',
'vitest/prefer-lowercase-title': 'off',
'vitest/require-to-throw-message': 'off',
'vitest/no-conditional-expect': 'off',
'vitest/no-conditional-in-test': 'off',
'vitest/no-conditional-tests': 'off',
},
parserOptions: {
project: ['./tsconfig.json', './tests/tsconfig.json', './bin/tsconfig.json'],
},
};