1- import { defineConfig , globalIgnores } from "eslint/config" ;
1+ import { defineConfig , globalIgnores } from "eslint/config" ;
22import globals from "globals" ;
3- import { flatConfigs as importX } from "eslint-plugin-import-x" ;
3+ import { flatConfigs as importX } from "eslint-plugin-import-x" ;
44import js from "@eslint/js" ;
55import jsdocPlugin from "eslint-plugin-jsdoc" ;
6- import packageJson from "eslint-plugin-package-json" ;
6+ import { configs as packageJsonConfigs } from "eslint-plugin-package-json" ;
77import playwright from "eslint-plugin-playwright" ;
88import stylistic from "@stylistic/eslint-plugin" ;
99import vitest from "@vitest/eslint-plugin" ;
@@ -24,8 +24,7 @@ export default defineConfig([
2424 moment : "readonly"
2525 }
2626 } ,
27- plugins : { js, stylistic } ,
28- extends : [ importX . recommended , "js/recommended" , jsdocPlugin . configs [ "flat/recommended" ] , stylistic . configs . customize ( { indent : "tab" , quotes : "double" , semi : true , commaDangle : "never" } ) ] ,
27+ extends : [ importX . recommended , js . configs . recommended , jsdocPlugin . configs [ "flat/recommended" ] , stylistic . configs . all ] ,
2928 rules : {
3029 "@stylistic/array-element-newline" : [ "error" , "consistent" ] ,
3130 "@stylistic/arrow-parens" : [ "error" , "always" ] ,
@@ -35,14 +34,14 @@ export default defineConfig([
3534 "@stylistic/function-paren-newline" : [ "error" , "consistent" ] ,
3635 "@stylistic/implicit-arrow-linebreak" : [ "error" , "beside" ] ,
3736 "@stylistic/indent" : [ "error" , "tab" ] ,
38- "@stylistic/max-statements-per-line" : [ "error" , { max : 2 } ] ,
37+ "@stylistic/max-statements-per-line" : [ "error" , { max : 2 } ] ,
3938 "@stylistic/multiline-comment-style" : "off" ,
4039 "@stylistic/multiline-ternary" : [ "error" , "always-multiline" ] ,
41- "@stylistic/newline-per-chained-call" : [ "error" , { ignoreChainWithDepth : 4 } ] ,
40+ "@stylistic/newline-per-chained-call" : [ "error" , { ignoreChainWithDepth : 4 } ] ,
4241 "@stylistic/no-extra-parens" : "off" ,
4342 "@stylistic/no-tabs" : "off" ,
4443 "@stylistic/object-curly-spacing" : [ "error" , "always" ] ,
45- "@stylistic/object-property-newline" : [ "error" , { allowAllPropertiesOnSameLine : true } ] ,
44+ "@stylistic/object-property-newline" : [ "error" , { allowAllPropertiesOnSameLine : true } ] ,
4645 "@stylistic/operator-linebreak" : [ "error" , "before" ] ,
4746 "@stylistic/padded-blocks" : "off" ,
4847 "@stylistic/quote-props" : [ "error" , "as-needed" ] ,
@@ -51,7 +50,7 @@ export default defineConfig([
5150 "@stylistic/space-before-function-paren" : [ "error" , "always" ] ,
5251 "@stylistic/spaced-comment" : "off" ,
5352 "dot-notation" : "error" ,
54- eqeqeq : [ "error" , "always" , { null : "ignore" } ] ,
53+ eqeqeq : [ "error" , "always" , { null : "ignore" } ] ,
5554 "id-length" : "off" ,
5655 "import-x/extensions" : "error" ,
5756 "import-x/newline-after-import" : "error" ,
@@ -86,12 +85,11 @@ export default defineConfig([
8685 "js/logger.js" ,
8786 "tests/**/*.js"
8887 ] ,
89- rules : { "no-console" : "error" }
88+ rules : { "no-console" : "error" }
9089 } ,
9190 {
9291 files : [ "**/package.json" ] ,
93- plugins : { packageJson } ,
94- extends : [ "packageJson/recommended" ]
92+ extends : [ packageJsonConfigs . recommended ]
9593 } ,
9694 {
9795 files : [ "**/*.mjs" ] ,
@@ -102,15 +100,14 @@ export default defineConfig([
102100 } ,
103101 sourceType : "module"
104102 } ,
105- plugins : { js, stylistic } ,
106- extends : [ importX . recommended , "js/all" , stylistic . configs . customize ( { indent : "tab" , quotes : "double" , semi : true , commaDangle : "never" } ) ] ,
103+ extends : [ importX . recommended , js . configs . all , stylistic . configs . all ] ,
107104 rules : {
108105 "@stylistic/array-element-newline" : "off" ,
109106 "@stylistic/indent" : [ "error" , "tab" ] ,
110- "@stylistic/object-property-newline" : [ "error" , { allowAllPropertiesOnSameLine : true } ] ,
107+ "@stylistic/object-property-newline" : [ "error" , { allowAllPropertiesOnSameLine : true } ] ,
111108 "@stylistic/padded-blocks" : [ "error" , "never" ] ,
112109 "@stylistic/quote-props" : [ "error" , "as-needed" ] ,
113- "import-x/no-unresolved" : [ "error" , { ignore : [ "eslint/config" ] } ] ,
110+ "import-x/no-unresolved" : [ "error" , { ignore : [ "eslint/config" ] } ] ,
114111 "max-lines-per-function" : [ "error" , 100 ] ,
115112 "no-magic-numbers" : "off" ,
116113 "one-var" : [ "error" , "never" ] ,
@@ -124,7 +121,6 @@ export default defineConfig([
124121 ...vitest . environments . env . globals
125122 }
126123 } ,
127- plugins : { vitest } ,
128124 extends : [ vitest . configs . recommended ] ,
129125 rules : {
130126 "vitest/consistent-test-it" : "error" ,
@@ -142,7 +138,7 @@ export default defineConfig([
142138 ]
143139 }
144140 ] ,
145- "vitest/max-nested-describe" : [ "error" , { max : 3 } ] ,
141+ "vitest/max-nested-describe" : [ "error" , { max : 3 } ] ,
146142 "vitest/prefer-to-be" : "error" ,
147143 "vitest/prefer-to-have-length" : "error" ,
148144 "max-lines-per-function" : "off"
@@ -167,6 +163,13 @@ export default defineConfig([
167163 files : [ "tests/e2e/**/*.js" ] ,
168164 extends : [ playwright . configs [ "flat/recommended" ] ] ,
169165 rules : {
166+
167+ /*
168+ * Tests use Vitest-style plain beforeAll()/afterAll() calls, not Playwright's
169+ * test.beforeAll() style. The rule incorrectly treats all plain hook calls
170+ * as the same unnamed type, flagging the second hook as a duplicate.
171+ */
172+ "playwright/no-duplicate-hooks" : "off" ,
170173 "playwright/no-standalone-expect" : "off"
171174 }
172175 }
0 commit comments