/
eslint.config.mjs
93 lines (91 loc) · 2.42 KB
/
eslint.config.mjs
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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import n from 'eslint-plugin-n';
import tsParser from '@typescript-eslint/parser';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
'*.css',
'*.scss',
'*.html',
'*.png',
'*.json',
'*.js',
'*.d.ts',
'*.map',
'*.md',
'*.zip',
'*.test.js',
'*.test.ts',
'*.spec.js',
'*.spec.ts',
'**/**/*.json',
'**/**/*.js',
'**/__tests__/*.*',
'**/dist/**/*.*',
'**/__helpers__/**/*.*',
'**/__mocks__/**/*.*',
'**/__tests__/**/*.*',
'**/packages/**/*.js',
],
},
{
plugins: {
'@typescript-eslint': tseslint.plugin,
n,
},
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: ['./tsconfig.base.json'],
},
},
settings: {
node: {
tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts'],
resolvePaths: ['node_modules/@types'],
},
},
rules: {
'class-methods-use-this': 'off',
'consistent-return': 'off',
curly: ['error', 'all'],
'default-param-last': 'off',
'dot-notation': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'import/order': 'off',
'n/no-missing-require': 'off',
'no-async-promise-executor': 'off',
'no-param-reassign': 'off',
'no-restricted-syntax': 'off',
'no-underscore-dangle': 'off',
'no-unsafe-optional-chaining': 'off',
'no-case-declarations': 'off',
'no-use-before-define': [
'error',
{
functions: false,
classes: false,
},
],
'n/no-extraneous-require': 'off',
'n/no-unpublished-require': 'off',
'n/no-unsupported-features/es-syntax': 'off',
'prefer-destructuring': 'off',
'prefer-object-spread': 'off',
strict: 'off',
'max-len': 'off',
'arrow-body-style': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }],
},
}
);