-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
99 lines (88 loc) · 2.38 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
env: {
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.*.json',
sourceType: 'module',
},
ignorePatterns: ['node_modules', 'dist', '_*'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:deprecation/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
plugins: ['@typescript-eslint/eslint-plugin', 'prettier', 'import', 'jsdoc'],
rules: {
'prettier/prettier': ['warn'],
'prefer-const': 'warn',
'object-shorthand': 'warn',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/ban-types': [
'error',
{
types: {
Function: false,
},
},
],
'jsdoc/no-undefined-types': 'warn',
'no-restricted-imports': [
'error',
{
patterns: ['**/*/_*'],
},
],
'import/order': [
'warn',
{
alphabetize: {
caseInsensitive: true,
orderImportKind: 'asc',
order: 'asc',
},
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
'newlines-between': 'always',
},
],
'import/no-relative-packages': 'warn',
'import/newline-after-import': 'warn',
},
settings: {
'import/resolver': {
typescript: true,
},
},
overrides: [
{
env: { jest: true },
files: ['**/*.spec.ts', '**/*.e2e-spec.ts'],
extends: ['plugin:jest/style', 'plugin:jest/recommended', 'plugin:jest-extended/all'],
plugins: ['jest', 'jest-extended'],
rules: {
'jest/valid-title': 'off',
'jest/no-conditional-expect': 'off',
'jest/expect-expect': [
'warn',
{
assertFunctionNames: ['expect', 'request.**.expect', 'http.request.**.expect'],
},
],
'jest/no-focused-tests': 'warn',
},
},
],
};