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" ;
45
5- module . exports = tseslint . config ( {
6+ export default tseslint . config ( {
67 files : [ '**/*.js' , '**/*.ts' ] ,
78 extends : [
9+ expectType ,
810 eslint . configs . recommended ,
911 ...tseslint . configs . recommended ,
12+ ...tseslint . configs . recommendedTypeChecked ,
1013 ] ,
1114 plugins : {
1215 '@typescript-eslint' : tseslint . plugin ,
@@ -34,6 +37,10 @@ module.exports = tseslint.config({
3437 "@typescript-eslint/no-var-requires" : "off" ,
3538 "@typescript-eslint/no-non-null-assertion" : "off" ,
3639 "@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" ,
3744 "@typescript-eslint/no-unused-vars" : [
3845 "error" ,
3946 {
@@ -72,6 +79,10 @@ module.exports = tseslint.config({
7279 } ,
7380 languageOptions : {
7481 parser : tseslint . parser ,
82+ parserOptions : {
83+ projectService : true ,
84+ tsconfigRootDir : import . meta. dirname ,
85+ } ,
7586 globals : {
7687 __dirname : true ,
7788 beforeEach : true ,
@@ -88,4 +99,3 @@ module.exports = tseslint.config({
8899 } ,
89100 } ,
90101} ) ;
91-
0 commit comments