@@ -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 } ] ,
@@ -29,6 +29,11 @@ module.exports = {
2929 overrides : [
3030 {
3131 files : [ '*.ts' ] ,
32+ // Enable typescript-eslint for ts files.
33+ extends : [ "eslint:recommended" , "plugin:@typescript-eslint/recommended" , "plugin:prettier/recommended" ] ,
34+ parserOptions : {
35+ "project" : "./tsconfig.json"
36+ } ,
3237 rules : {
3338 "@typescript-eslint/no-floating-promises" : "error" ,
3439 "@typescript-eslint/no-this-alias" : "off" ,
@@ -50,21 +55,33 @@ module.exports = {
5055 }
5156 } ] ,
5257 "@typescript-eslint/no-shadow" : [ "warn" ] ,
58+ "prefer-rest-params" : "off" ,
5359 }
5460 } ,
5561 {
5662 files : [ "test/**/*.ts" ] ,
63+ // Enable typescript-eslint for ts files.
64+ extends : [ "eslint:recommended" , "plugin:@typescript-eslint/recommended" , "plugin:prettier/recommended" ] ,
65+ parserOptions : {
66+ "project" : "./tsconfig.json"
67+ } ,
5768 rules : {
5869 "no-empty" : "off" ,
5970 "@typescript-eslint/ban-ts-ignore" : "off" ,
71+ "@typescript-eslint/ban-types" : [ "warn" , {
72+ "types" : {
73+ "Function" : null ,
74+ }
75+ } ] ,
6076 "@typescript-eslint/no-empty-function" : "off" ,
6177 "@typescript-eslint/no-explicit-any" : "off" ,
6278 "@typescript-eslint/no-unused-vars" : "off" ,
6379 "@typescript-eslint/no-var-requires" : "off" ,
6480 "@typescript-eslint/no-shadow" : [ "off" ] ,
6581 "@typescript-eslint/no-floating-promises" : [ "off" ] ,
6682 "@typescript-eslint/no-non-null-assertion" : [ "off" ] ,
67- "@typescript-eslint/explicit-module-boundary-types" : [ "off" ]
83+ "@typescript-eslint/explicit-module-boundary-types" : [ "off" ] ,
84+ "prefer-rest-params" : "off" ,
6885 }
6986 }
7087 ]
0 commit comments