1
- const eslint = require ( '@eslint/js' ) ;
2
- const tseslint = require ( 'typescript-eslint' ) ;
3
- const jsdoc = require ( 'eslint-plugin-jsdoc' ) ;
1
+ import eslint from '@eslint/js' ;
2
+ import tseslint from 'typescript-eslint' ;
3
+ import jsdoc from 'eslint-plugin-jsdoc' ;
4
+ import expectType from "eslint-plugin-expect-type/configs/recommended" ;
4
5
5
- module . exports = tseslint . config ( {
6
+ export default tseslint . config ( {
6
7
files : [ '**/*.js' , '**/*.ts' ] ,
7
8
extends : [
9
+ expectType ,
8
10
eslint . configs . recommended ,
9
11
...tseslint . configs . recommended ,
12
+ ...tseslint . configs . recommendedTypeChecked ,
10
13
] ,
11
14
plugins : {
12
15
'@typescript-eslint' : tseslint . plugin ,
@@ -34,6 +37,10 @@ module.exports = tseslint.config({
34
37
"@typescript-eslint/no-var-requires" : "off" ,
35
38
"@typescript-eslint/no-non-null-assertion" : "off" ,
36
39
"@typescript-eslint/no-require-imports" : "off" ,
40
+ "@typescript-eslint/no-unsafe-call" : "off" ,
41
+ "@typescript-eslint/no-unsafe-member-access" : "off" ,
42
+ "@typescript-eslint/no-unsafe-argument" : "off" ,
43
+ "@typescript-eslint/no-unsafe-assignment" : "off" ,
37
44
"@typescript-eslint/no-unused-vars" : [
38
45
"error" ,
39
46
{
@@ -72,6 +79,10 @@ module.exports = tseslint.config({
72
79
} ,
73
80
languageOptions : {
74
81
parser : tseslint . parser ,
82
+ parserOptions : {
83
+ projectService : true ,
84
+ tsconfigRootDir : import . meta. dirname ,
85
+ } ,
75
86
globals : {
76
87
__dirname : true ,
77
88
beforeEach : true ,
@@ -88,4 +99,3 @@ module.exports = tseslint.config({
88
99
} ,
89
100
} ,
90
101
} ) ;
91
-
0 commit comments