11import js from "@eslint/js"
2- import { defineConfig } from "eslint/config "
2+ import pluginChaiFriendly from "eslint-plugin-chai-friendly "
33import { jsdoc } from "eslint-plugin-jsdoc"
4+ import { defineConfig , globalIgnores } from "eslint/config"
45import globals from "globals"
56import ts from "typescript-eslint"
67
78export default defineConfig ( [
8- {
9- ignores : [
10- "build/**" ,
11- "docs/**" ,
12- "node_modules/**" ,
13- "sample/playground/**" ,
14- "temp/**" ,
15- ] ,
16- } ,
17-
9+ globalIgnores ( [
10+ "build/**" ,
11+ "docs/**" ,
12+ "node_modules/**" ,
13+ "sample/playground/**" ,
14+ "temp/**" ,
15+ ] ) ,
1816 {
1917 files : [ "**/*.ts" ] ,
2018 languageOptions : {
@@ -31,10 +29,7 @@ export default defineConfig([
3129 js,
3230 ts,
3331 } ,
34- extends : [
35- js . configs . recommended ,
36- ...ts . configs . recommendedTypeChecked ,
37- ] ,
32+ extends : [ js . configs . recommended , ...ts . configs . recommendedTypeChecked ] ,
3833 rules : {
3934 // exceptions from typescript-eslint/recommended
4035 "@typescript-eslint/ban-ts-comment" : "warn" ,
@@ -45,12 +40,11 @@ export default defineConfig([
4540 "@typescript-eslint/no-unnecessary-type-constraint" : "warn" ,
4641 "@typescript-eslint/no-unsafe-declaration-merging" : "warn" ,
4742 "@typescript-eslint/no-unsafe-function-type" : "warn" ,
48- "@typescript-eslint/no-unused-expressions" : "warn" ,
4943 "@typescript-eslint/no-unused-vars" : [
5044 "warn" ,
5145 {
5246 argsIgnorePattern : "^_" ,
53- destructuredArrayIgnorePattern : "^_"
47+ destructuredArrayIgnorePattern : "^_" ,
5448 } ,
5549 ] ,
5650 "@typescript-eslint/no-wrapper-object-types" : "off" ,
@@ -90,14 +84,17 @@ export default defineConfig([
9084 "no-regex-spaces" : "warn" ,
9185 } ,
9286 } ,
93-
9487 jsdoc ( {
95- config : "flat/recommended-typescript" ,
9688 files : [ "src/**/*.ts" ] ,
89+ config : "flat/recommended-typescript" ,
9790 // Temporarily enable individual rules when they are fixed, until all current warnings are gone,
9891 // and then remove manual config in favor of `config: "flat/recommended-typescript-error"`
9992 rules : {
100- "jsdoc/valid-types" : "error"
101- }
93+ "jsdoc/valid-types" : "error" ,
94+ } ,
10295 } ) ,
96+ {
97+ files : [ "test/**/*.ts" ] ,
98+ ...pluginChaiFriendly . configs . recommendedFlat ,
99+ } ,
103100] )
0 commit comments