-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
eslint.config.mjs
36 lines (35 loc) · 1.07 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
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
export default [
{ ignores: ['dist'] },
{
files: ['**/*.ts'],
plugins: { '@typescript-eslint': typescriptEslint },
languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: 'module',
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
eqeqeq: ['error', 'smart'],
'linebreak-style': ['error', 'unix'],
'no-duplicate-imports': 'error',
'prefer-const': 'warn',
'@typescript-eslint/no-empty-function': ['error', {
allow: ['constructors'],
}],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': ['warn', {
argsIgnorePattern: '^_',
}],
'@typescript-eslint/no-unnecessary-condition': 'error',
},
},
];