@@ -5,10 +5,10 @@ module.exports = {
55 "node" ,
66 "prettier"
77 ] ,
8- extends : [ "eslint:recommended" , "plugin:@typescript-eslint/recommended" , "plugin: prettier/recommended"] ,
8+ extends : [ "eslint:recommended" , "plugin:prettier/recommended" ] ,
99 parser : "@typescript-eslint/parser" ,
1010 parserOptions : {
11- "project" : "./tsconfig.json"
11+ "project" : null
1212 } ,
1313 rules : {
1414 "quotes" : [ "error" , "single" , { "avoidEscape" : true } ] ,
@@ -28,6 +28,11 @@ module.exports = {
2828 overrides : [
2929 {
3030 files : [ '*.ts' ] ,
31+ // Enable typescript-eslint for ts files.
32+ extends : [ "eslint:recommended" , "plugin:@typescript-eslint/recommended" , "plugin:prettier/recommended" ] ,
33+ parserOptions : {
34+ "project" : "./tsconfig.json"
35+ } ,
3136 rules : {
3237 "@typescript-eslint/no-floating-promises" : "error" ,
3338 "@typescript-eslint/no-this-alias" : "off" ,
@@ -49,21 +54,39 @@ module.exports = {
4954 }
5055 } ] ,
5156 "@typescript-eslint/no-shadow" : [ "warn" ] ,
57+ "prefer-rest-params" : "off" ,
5258 }
5359 } ,
5460 {
5561 files : [ "test/**/*.ts" ] ,
62+ // Enable typescript-eslint for ts files.
63+ extends : [ "eslint:recommended" , "plugin:@typescript-eslint/recommended" , "plugin:prettier/recommended" ] ,
64+ parserOptions : {
65+ "project" : "./tsconfig.json"
66+ } ,
5667 rules : {
5768 "no-empty" : "off" ,
5869 "@typescript-eslint/ban-ts-ignore" : "off" ,
70+ "@typescript-eslint/ban-types" : [ "warn" , {
71+ "types" : {
72+ "Function" : null ,
73+ }
74+ } ] ,
5975 "@typescript-eslint/no-empty-function" : "off" ,
6076 "@typescript-eslint/no-explicit-any" : "off" ,
6177 "@typescript-eslint/no-unused-vars" : "off" ,
6278 "@typescript-eslint/no-var-requires" : "off" ,
6379 "@typescript-eslint/no-shadow" : [ "off" ] ,
6480 "@typescript-eslint/no-floating-promises" : [ "off" ] ,
6581 "@typescript-eslint/no-non-null-assertion" : [ "off" ] ,
66- "@typescript-eslint/explicit-module-boundary-types" : [ "off" ]
82+ "@typescript-eslint/explicit-module-boundary-types" : [ "off" ] ,
83+ "prefer-rest-params" : "off" ,
84+ }
85+ } ,
86+ {
87+ files : [ "*.mjs" ] ,
88+ parserOptions : {
89+ sourceType : 'module' ,
6790 }
6891 }
6992 ]
0 commit comments