-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
eslint.config.mjs
34 lines (32 loc) · 977 Bytes
/
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
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
{
files: ['**/*.ts'],
extends: [
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
parserOptions: {
// indicates to find the closest tsconfig.json for each source file
project: true,
},
},
},
// Demonstrate override for a subdirectory.
// Note that unlike eslint 8 and earlier, it does not resolve to a configuration file
// in a parent folder of the files being checked; instead it only looks in the working
// directory.
// https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs
{
files: ['src/subdir/**'],
rules: {
'no-debugger': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'sort-imports': 'warn',
},
}
);