1
+ import typescriptEslint from '@typescript-eslint/eslint-plugin' ;
2
+ import tsParser from '@typescript-eslint/parser' ;
3
+ import path from 'node:path' ;
4
+ import { fileURLToPath } from 'node:url' ;
5
+ import js from '@eslint/js' ;
6
+ import { FlatCompat } from '@eslint/eslintrc' ;
7
+
8
+ const __filename = fileURLToPath ( import . meta. url ) ;
9
+ const __dirname = path . dirname ( __filename ) ;
10
+ const compat = new FlatCompat ( {
11
+ baseDirectory : __dirname ,
12
+ recommendedConfig : js . configs . recommended ,
13
+ allConfig : js . configs . all ,
14
+ } ) ;
15
+
16
+ export default [ ...compat . extends (
17
+ 'plugin:@typescript-eslint/recommended' ,
18
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking' ,
19
+ 'plugin:jest/recommended' ,
20
+ 'prettier' ,
21
+ ) , {
22
+ plugins : {
23
+ '@typescript-eslint' : typescriptEslint ,
24
+ } ,
25
+ languageOptions : {
26
+ parser : tsParser ,
27
+ ecmaVersion : 2018 ,
28
+ sourceType : 'module' ,
29
+ parserOptions : {
30
+ project : [ './tsconfig.json' , './tsconfig.spec.json' ] ,
31
+ } ,
32
+ } ,
33
+ rules : {
34
+ '@typescript-eslint/explicit-member-accessibility' : 'off' ,
35
+ '@typescript-eslint/no-angle-bracket-type-assertion' : 'off' ,
36
+ '@typescript-eslint/no-parameter-properties' : 'off' ,
37
+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
38
+ '@typescript-eslint/member-delimiter-style' : 'off' ,
39
+ '@typescript-eslint/no-inferrable-types' : 'off' ,
40
+ '@typescript-eslint/no-explicit-any' : 'off' ,
41
+ '@typescript-eslint/member-ordering' : 'error' ,
42
+ '@typescript-eslint/ban-types' : 'off' ,
43
+ '@typescript-eslint/no-unsafe-return' : 'off' ,
44
+ '@typescript-eslint/no-unsafe-assignment' : 'off' ,
45
+ '@typescript-eslint/no-unsafe-call' : 'off' ,
46
+ '@typescript-eslint/no-unsafe-member-access' : 'off' ,
47
+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
48
+ '@typescript-eslint/no-unsafe-function-type' : 'off' ,
49
+ '@typescript-eslint/no-wrapper-object-types' : 'off' ,
50
+ } ,
51
+ } ] ;
0 commit comments