-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
eslint.config.js
38 lines (37 loc) · 979 Bytes
/
eslint.config.js
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
import { default as tseslint } from 'typescript-eslint'
import { default as globals } from 'globals'
import { default as eslint } from '@eslint/js'
export default tseslint.config(
{
// Ignore build folder
ignores: ['dist/*'],
},
eslint.configs.recommended,
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
{
// Enable Type generation
languageOptions: {
globals: {
...globals.node,
},
parserOptions: {
project: ['./tsconfig.json', './test/tsconfig.json'],
},
}
},
{
// For test files ignore some rules
files: ['test/**/*'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off'
},
},
// Disable Type Checking JS/CJS/MJS files
{
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
extends: [tseslint.configs.disableTypeChecked],
},
)