eslint-config-setup 0.2.4 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs/ai.ts","../src/configs/base.ts","../src/build/config-builder.ts","../src/configs/cspell.ts","../src/configs/de-morgan.ts","../src/configs/imports.ts","../src/configs/jsdoc.ts","../src/configs/json.ts","../src/configs/markdown.ts","../src/configs/node.ts","../src/configs/package-json.ts","../src/configs/perfectionist.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/react-effect.ts","../src/configs/regexp.ts","../src/configs/security.ts","../src/configs/sonarjs.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/overrides/config-files.ts","../src/overrides/declarations.ts","../src/overrides/e2e.ts","../src/overrides/scripts.ts","../src/overrides/stories.ts","../src/overrides/tests.ts","../src/presets/standard.ts","../src/oxlint/integration.ts","../src/configs/compat.ts","../src/build/compose.ts"],"sourcesContent":["/* eslint-disable max-lines, max-lines-per-function -- Rule definition file: one function returning a long list of rule entries. Not complex, just large. */\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * AI mode rules — strict clean-code rules that are trivial for AI assistants\n * to follow but produce significantly more maintainable code.\n *\n * These rules would traditionally be considered \"too strict\" for humans,\n * but since most code is now AI-generated, they serve as effective\n * guardrails that the AI cannot ignore (unlike documentation).\n *\n * No plugin preset is used — all rules are hand-picked from existing plugins\n * and tightened beyond their defaults for AI-generated code.\n * @see ADR-0003: docs/adr/0003-ai-mode-as-dedicated-flag.md\n */\nexport function aiConfig(): FlatConfigArray {\n const configs: FlatConfigArray = [\n {\n name: \"eslint-config-setup/ai-structural\",\n rules: {\n // ── A. Structural clarity — always explicit, never ambiguous ──\n\n // Require braces for ALL control flow — no ambiguous one-liners\n // https://eslint.org/docs/latest/rules/curly\n curly: [\"error\", \"all\"],\n\n // Disallow else after return — flattens control flow\n // https://eslint.org/docs/latest/rules/no-else-return\n \"no-else-return\": [\"error\", { allowElseIf: false }],\n\n // No nested ternaries — unreadable, use if/else or early return\n // https://eslint.org/docs/latest/rules/no-nested-ternary\n \"no-nested-ternary\": \"error\",\n\n // No ternary when simpler alternatives exist (e.g., || or ??)\n // https://eslint.org/docs/latest/rules/no-unneeded-ternary\n \"no-unneeded-ternary\": \"error\",\n\n // No negated conditions in if/else — flip the branches instead\n // https://eslint.org/docs/latest/rules/no-negated-condition\n \"no-negated-condition\": \"error\",\n\n // No standalone if in else — use else-if instead\n // https://eslint.org/docs/latest/rules/no-lonely-if\n \"no-lonely-if\": \"error\",\n\n // No parameter reassignment — prevents subtle mutation bugs\n // https://eslint.org/docs/latest/rules/no-param-reassign\n \"no-param-reassign\": [\"error\", { props: true }],\n\n // One assignment per statement — prevents `a = b = c` chains\n // https://eslint.org/docs/latest/rules/no-multi-assign\n \"no-multi-assign\": \"error\",\n\n // One variable per declaration — clear and grep-friendly\n // https://eslint.org/docs/latest/rules/one-var\n \"one-var\": [\"error\", \"never\"],\n\n // No implicit type coercion (!!x, +x, \"\" + x) — use explicit Boolean/Number/String\n // https://eslint.org/docs/latest/rules/no-implicit-coercion\n \"no-implicit-coercion\": \"error\",\n\n // Prefer const for all bindings in destructuring when possible\n // https://eslint.org/docs/latest/rules/prefer-const\n \"prefer-const\": [\"error\", { destructuring: \"all\" }],\n\n // Disallow var — block-scoped let/const only\n // https://eslint.org/docs/latest/rules/no-var\n \"no-var\": \"error\",\n\n // Require strict equality (===) — no type coercion\n // https://eslint.org/docs/latest/rules/eqeqeq\n eqeqeq: \"error\",\n\n // Prefer template literals over concatenation — more readable\n // https://eslint.org/docs/latest/rules/prefer-template\n \"prefer-template\": \"error\",\n\n // Require shorthand properties in objects — concise, skip quoted keys\n // https://eslint.org/docs/latest/rules/object-shorthand\n \"object-shorthand\": [\"error\", \"always\", { avoidQuotes: true }],\n\n // Prefer concise arrow body: `() => expr` over `() => { return expr }`\n // https://eslint.org/docs/latest/rules/arrow-body-style\n \"arrow-body-style\": \"error\",\n\n // Prefer arrow functions for callbacks — lexical `this`\n // https://eslint.org/docs/latest/rules/prefer-arrow-callback\n \"prefer-arrow-callback\": [\"error\", { allowNamedFunctions: true }],\n\n // Prefer `x ??= y` over `x = x ?? y` — concise null-coalescing assignment\n // https://eslint.org/docs/latest/rules/logical-assignment-operators\n \"logical-assignment-operators\": [\n \"error\",\n \"always\",\n { enforceForIfStatements: true },\n ],\n\n // No assignment in return statements — separate mutation from return\n // https://eslint.org/docs/latest/rules/no-return-assign\n \"no-return-assign\": [\"error\", \"always\"],\n\n // One statement per line — scannable, diff-friendly\n // https://eslint.org/docs/latest/rules/max-statements-per-line\n \"max-statements-per-line\": [\"error\", { max: 1 }],\n\n // Prefer `x ** 2` over `Math.pow(x, 2)` — modern operator syntax\n // https://eslint.org/docs/latest/rules/prefer-exponentiation-operator\n \"prefer-exponentiation-operator\": \"error\",\n\n // Require named capture groups in regex — self-documenting patterns\n // https://eslint.org/docs/latest/rules/prefer-named-capture-group\n \"prefer-named-capture-group\": \"error\",\n\n // Require Unicode-aware regex (`u` or `v` flag) — correct string handling\n // https://eslint.org/docs/latest/rules/require-unicode-regexp\n \"require-unicode-regexp\": \"error\",\n\n // ── B. Magic numbers & constants — no unexplained code ────────\n\n // No magic numbers — extract to named constants (allows -1, 0, 1, 2)\n // https://typescript-eslint.io/rules/no-magic-numbers\n \"@typescript-eslint/no-magic-numbers\": [\n \"error\",\n {\n ignore: [-1, 0, 1, 2],\n ignoreArrayIndexes: true,\n ignoreDefaultValues: true,\n enforceConst: true,\n ignoreClassFieldInitialValues: true,\n ignoreEnums: true,\n ignoreNumericLiteralTypes: true,\n ignoreReadonlyClassProperties: true,\n ignoreTypeIndexes: true,\n },\n ],\n\n // No duplicate strings (threshold 3) — extract to constant\n // https://sonarsource.github.io/rspec/#/rspec/S1192/javascript\n \"sonarjs/no-duplicate-string\": [\"error\", { threshold: 3 }],\n\n // Flag TODO/FIXME/HACK comments — technical debt tracker\n // https://eslint.org/docs/latest/rules/no-warning-comments\n \"no-warning-comments\": \"warn\",\n\n // ── F. Async/Promise hygiene ──────────────────────────────────\n\n // No await inside loops — use Promise.all() for parallel execution\n // https://eslint.org/docs/latest/rules/no-await-in-loop\n \"no-await-in-loop\": \"error\",\n\n // Disallow returning values from Promise executors — use resolve/reject\n // https://eslint.org/docs/latest/rules/no-promise-executor-return\n \"no-promise-executor-return\": \"error\",\n\n // Every Promise must be awaited, returned, or voided — prevents silent failures\n // https://typescript-eslint.io/rules/no-floating-promises\n \"@typescript-eslint/no-floating-promises\": [\n \"error\",\n { checkThenables: true, ignoreVoid: true },\n ],\n },\n },\n {\n name: \"eslint-config-setup/ai-typescript\",\n rules: {\n // ── C. TypeScript strictness — explicit types, safe patterns ──\n\n // Require explicit return types — self-documenting function signatures\n // https://typescript-eslint.io/rules/explicit-function-return-type\n \"@typescript-eslint/explicit-function-return-type\": [\n \"error\",\n {\n allowExpressions: true,\n allowTypedFunctionExpressions: true,\n allowHigherOrderFunctions: true,\n allowIIFE: true,\n },\n ],\n\n // Enforce consistent naming: camelCase for values, PascalCase for types,\n // is/has/can/should/will/did prefix for boolean variables\n // https://typescript-eslint.io/rules/naming-convention\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: [\n \"variable\",\n \"function\",\n \"classProperty\",\n \"objectLiteralProperty\",\n \"parameterProperty\",\n \"classMethod\",\n \"objectLiteralMethod\",\n \"typeMethod\",\n \"accessor\",\n ],\n format: [\"strictCamelCase\"],\n leadingUnderscore: \"allowSingleOrDouble\",\n trailingUnderscore: \"allow\",\n filter: { regex: \"[- ]\", match: false },\n },\n {\n selector: \"typeLike\",\n format: [\"StrictPascalCase\"],\n },\n {\n // No \"I\" prefix on interfaces — use descriptive names (XO convention)\n selector: \"interface\",\n format: [\"StrictPascalCase\"],\n custom: { regex: \"^I[A-Z]\", match: false },\n },\n {\n // Type parameters: single uppercase letter (T) or PascalCase (TResult)\n selector: \"typeParameter\",\n format: [\"PascalCase\"],\n custom: { regex: \"^(T([A-Z][a-zA-Z]*)?|[A-Z])$\", match: true },\n },\n {\n selector: \"variable\",\n types: [\"boolean\"],\n format: [\"StrictPascalCase\"],\n prefix: [\"is\", \"has\", \"can\", \"should\", \"will\", \"did\"],\n },\n {\n selector: [\"classProperty\", \"objectLiteralProperty\"],\n format: null,\n modifiers: [\"requiresQuotes\"],\n },\n ],\n\n // Enforce `import type { T }` — types are erased at compile time\n // https://typescript-eslint.io/rules/consistent-type-imports\n \"@typescript-eslint/consistent-type-imports\": [\n \"error\",\n { fixStyle: \"inline-type-imports\" },\n ],\n\n // Enforce `export type { T }` — matches import convention\n // https://typescript-eslint.io/rules/consistent-type-exports\n \"@typescript-eslint/consistent-type-exports\": [\n \"error\",\n { fixMixedExportsWithInlineTypeSpecifier: true },\n ],\n\n // Disallow `any` type — auto-fix to `unknown` for type safety\n // https://typescript-eslint.io/rules/no-explicit-any\n \"@typescript-eslint/no-explicit-any\": [\"error\", { fixToUnknown: true }],\n\n // Prefer readonly for unmodified class properties — signals immutability\n // https://typescript-eslint.io/rules/prefer-readonly\n \"@typescript-eslint/prefer-readonly\": \"error\",\n\n // Functions returning promises must be async — consistent async patterns\n // https://typescript-eslint.io/rules/promise-function-async\n \"@typescript-eslint/promise-function-async\": \"error\",\n\n // Exhaustive switch statements — no missing cases, no unnecessary defaults\n // https://typescript-eslint.io/rules/switch-exhaustiveness-check\n \"@typescript-eslint/switch-exhaustiveness-check\": [\n \"error\",\n {\n allowDefaultCaseForExhaustiveSwitch: false,\n requireDefaultForNonUnion: true,\n },\n ],\n\n // Disallow unsafe type assertions (as Type) — use type guards instead\n // https://typescript-eslint.io/rules/no-unsafe-type-assertion\n \"@typescript-eslint/no-unsafe-type-assertion\": \"error\",\n\n // Require comparator for Array.sort() — prevents locale-dependent string sort\n // https://typescript-eslint.io/rules/require-array-sort-compare\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n { ignoreStringArrays: true },\n ],\n\n // Require explicit `public`/`private`/`protected` on class members\n // https://typescript-eslint.io/rules/explicit-member-accessibility\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Enforce property style for method signatures — prevents bivariance issues\n // https://typescript-eslint.io/rules/method-signature-style\n \"@typescript-eslint/method-signature-style\": [\"error\", \"property\"],\n\n // Require explicit values for enum members — prevents accidental shifts on reorder\n // https://typescript-eslint.io/rules/prefer-enum-initializers\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Prefer `type` over `interface` — consistent, supports unions/intersections\n // https://typescript-eslint.io/rules/consistent-type-definitions\n \"@typescript-eslint/consistent-type-definitions\": [\"error\", \"type\"],\n\n // Enforce consistent member ordering in classes and interfaces\n // Static → fields by visibility → constructors → methods by visibility (XO convention)\n // https://typescript-eslint.io/rules/member-ordering\n \"@typescript-eslint/member-ordering\": [\n \"warn\",\n {\n default: [\n // Index signature\n \"signature\",\n \"call-signature\",\n\n // Static\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"#private-static-field\",\n \"static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"#private-static-method\",\n \"static-method\",\n\n // Fields\n \"public-decorated-field\",\n \"protected-decorated-field\",\n \"private-decorated-field\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"#private-instance-field\",\n \"public-abstract-field\",\n \"protected-abstract-field\",\n \"field\",\n\n // Constructors\n \"public-constructor\",\n \"protected-constructor\",\n \"private-constructor\",\n \"constructor\",\n\n // Getters/Setters\n [\"public-get\", \"public-set\"],\n [\"protected-get\", \"protected-set\"],\n [\"private-get\", \"private-set\"],\n [\"#private-get\", \"#private-set\"],\n\n // Methods\n \"public-decorated-method\",\n \"protected-decorated-method\",\n \"private-decorated-method\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n \"#private-instance-method\",\n \"public-abstract-method\",\n \"protected-abstract-method\",\n \"method\",\n ],\n },\n ],\n },\n },\n {\n name: \"eslint-config-setup/ai-unicorn\",\n rules: {\n // ── D. Unicorn — modern, idiomatic patterns ───────────────────\n\n // Prefer early return over deeply nested if/else — flattens logic\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-early-return.md\n \"unicorn/prefer-early-return\": \"error\",\n\n // Move functions to the smallest scope where they're used\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md\n \"unicorn/consistent-function-scoping\": \"error\",\n\n // Forbid blanket `/* eslint-disable */` — must specify rules\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n\n // No .forEach() — use for-of loop (breakable, async-safe)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md\n \"unicorn/no-array-for-each\": \"error\",\n\n // No .reduce() — explicit loops are more readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md\n \"unicorn/no-array-reduce\": \"error\",\n\n // Prefer simple ternary over if/else for single-line assignments\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n\n // Prefer switch for 3+ conditions on same variable — structured\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md\n \"unicorn/prefer-switch\": [\"error\", { minimumCases: 3 }],\n\n // Enforce camelCase or PascalCase filenames — consistent project structure\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md\n \"unicorn/filename-case\": [\n \"error\",\n { cases: { camelCase: true, pascalCase: true } },\n ],\n\n // Prevent abbreviated variable names (e → error, btn → button) — readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md\n \"unicorn/prevent-abbreviations\": \"error\",\n\n // Detect useless switch cases that fall through to the next case\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md\n \"unicorn/no-useless-switch-case\": \"error\",\n\n // Enforce correct Error subclassing (name, constructor pattern)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md\n \"unicorn/custom-error-definition\": \"error\",\n\n // Prefer default parameters over manual reassignment\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md\n \"unicorn/prefer-default-parameters\": \"error\",\n\n // Prefer `a || b` over `a ? a : b` — simpler when equivalent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md\n \"unicorn/prefer-logical-operator-over-ternary\": \"error\",\n\n // Prefer Math.min()/Math.max() over ternaries for clamping\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md\n \"unicorn/prefer-math-min-max\": \"error\",\n\n // Prefer Set#size over converting to array — direct and correct\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md\n \"unicorn/prefer-set-size\": \"error\",\n\n // Enforce explicit `.length > 0` / `.length === 0` checks\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md\n \"unicorn/explicit-length-check\": \"error\",\n\n // Prefer for-of over C-style for loops — no off-by-one risk\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md\n \"unicorn/no-for-loop\": \"error\",\n\n // Enforce braces in switch cases — prevents scope leakage\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md\n \"unicorn/switch-case-braces\": \"error\",\n\n // Combine multiple .push() calls into one — cleaner\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-push-push.md\n \"unicorn/no-array-push-push\": \"error\",\n },\n },\n {\n name: \"eslint-config-setup/ai-sonarjs\",\n rules: {\n // ── E. SonarJS — code quality and duplicates ──────────────────\n\n // Detect copy-pasted functions — extract to shared helper\n // https://sonarsource.github.io/rspec/#/rspec/S4144/javascript\n \"sonarjs/no-identical-functions\": \"error\",\n\n // Merge nested if-statements that can be combined — reduce nesting\n // https://sonarsource.github.io/rspec/#/rspec/S1066/javascript\n \"sonarjs/no-collapsible-if\": \"error\",\n\n // Simplify redundant boolean expressions\n // https://sonarsource.github.io/rspec/#/rspec/S1125/javascript\n \"sonarjs/no-redundant-boolean\": \"error\",\n\n // Detect collections that are populated but never read — dead code\n // https://sonarsource.github.io/rspec/#/rspec/S4030/javascript\n \"sonarjs/no-unused-collection\": \"error\",\n\n // Return value directly instead of storing in temp variable\n // https://sonarsource.github.io/rspec/#/rspec/S1488/javascript\n \"sonarjs/prefer-immediate-return\": \"error\",\n\n // Simplify boolean return patterns\n // https://sonarsource.github.io/rspec/#/rspec/S1126/javascript\n \"sonarjs/prefer-single-boolean-return\": \"error\",\n\n // Detect identical sub-expressions on both sides of operator\n // https://sonarsource.github.io/rspec/#/rspec/S1764/javascript\n \"sonarjs/no-identical-expressions\": \"error\",\n\n // Simplify negated boolean checks — `!a !== b` → `a === b`\n // https://sonarsource.github.io/rspec/#/rspec/S1940/javascript\n \"sonarjs/no-inverted-boolean-check\": \"error\",\n\n // Disallow nested switch statements — extract to function\n // https://sonarsource.github.io/rspec/#/rspec/S1821/javascript\n \"sonarjs/no-nested-switch\": \"error\",\n\n // Disallow nested template literals — unreadable\n // https://sonarsource.github.io/rspec/#/rspec/S4624/javascript\n \"sonarjs/no-nested-template-literals\": \"error\",\n\n // Limit union type size — too many members signals missing abstraction\n // https://sonarsource.github.io/rspec/#/rspec/S4622/javascript\n \"sonarjs/max-union-size\": [\"error\", { max: 5 }],\n\n // Prefer type predicates for type narrowing — safer than assertions\n // https://sonarsource.github.io/rspec/#/rspec/S4322/javascript\n \"sonarjs/prefer-type-guard\": \"error\",\n\n // Public static fields should be readonly — prevents accidental mutation\n // https://sonarsource.github.io/rspec/#/rspec/S1444/javascript\n \"sonarjs/public-static-readonly\": \"error\",\n },\n },\n {\n name: \"eslint-config-setup/ai-regexp\",\n rules: {\n // Prefer lookarounds over capturing groups used only for context\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-lookaround.html\n \"regexp/prefer-lookaround\": \"error\",\n\n // Prefer named backreferences — \\k<quote> over \\1\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-backreference.html\n \"regexp/prefer-named-backreference\": \"error\",\n\n // Prefer named replacement — $<name> over $1\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-replacement.html\n \"regexp/prefer-named-replacement\": \"error\",\n\n // Prefer quantifier shorthand — a{3} over aaa\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-quantifier.html\n \"regexp/prefer-quantifier\": \"error\",\n\n // Prefer match.groups.name over match[1] — consistent named groups usage\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-result-array-groups.html\n \"regexp/prefer-result-array-groups\": \"error\",\n\n // Require v flag (unicode sets) over u flag — stricter ES2024 superset\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-sets-regexp.html\n \"regexp/require-unicode-sets-regexp\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-jsdoc\",\n rules: {\n // Prevent comments that just repeat the name — `/** The name */ name: string`\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md\n \"jsdoc/informative-docs\": \"error\",\n\n // AI should document parameters and return values completely\n \"jsdoc/require-param\": \"error\",\n \"jsdoc/require-returns\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-node\",\n rules: {\n // Warn when using Node.js builtins not available in the target version\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/node-builtins.md\n \"node/no-unsupported-features/node-builtins\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-react\",\n rules: {\n // Max one component per file — clear module boundaries\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"error\",\n\n // No inline function creation in JSX props — extract to variable or useCallback\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": \"error\",\n\n // No click handlers on static elements without role — use semantic HTML\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-static-element-interactions.md\n \"jsx-a11y/no-static-element-interactions\": \"error\",\n\n // No event handlers on non-interactive elements — use button/link instead\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-interactions.md\n \"jsx-a11y/no-noninteractive-element-interactions\": \"error\",\n\n // Interactive elements (role=\"button\") must be focusable\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/interactive-supports-focus.md\n \"jsx-a11y/interactive-supports-focus\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-complexity\",\n rules: {\n // Cyclomatic complexity limit — max branches per function\n // https://eslint.org/docs/latest/rules/complexity\n complexity: [\"error\", 10],\n\n // Max nesting depth — deep nesting signals need for extraction\n // https://eslint.org/docs/latest/rules/max-depth\n \"max-depth\": [\"error\", 3],\n\n // Max nested callbacks — prevents callback hell\n // https://eslint.org/docs/latest/rules/max-nested-callbacks\n \"max-nested-callbacks\": [\"error\", 2],\n\n // Max function parameters — many params suggest a config object\n // https://eslint.org/docs/latest/rules/max-params\n \"max-params\": [\"error\", 3],\n\n // Max statements per function — keeps functions focused\n // https://eslint.org/docs/latest/rules/max-statements\n \"max-statements\": [\"error\", 15],\n\n // Max lines per function — encourages extraction of helpers\n // https://eslint.org/docs/latest/rules/max-lines-per-function\n \"max-lines-per-function\": [\n \"error\",\n {\n max: 50,\n skipBlankLines: true,\n skipComments: true,\n },\n ],\n\n // Max lines per file — encourages modular file organization\n // https://eslint.org/docs/latest/rules/max-lines\n \"max-lines\": [\n \"error\",\n {\n max: 300,\n skipBlankLines: true,\n skipComments: true,\n },\n ],\n\n // Cognitive complexity — measures how hard a function is to understand\n // https://sonarsource.github.io/rspec/#/rspec/S3776/javascript\n \"sonarjs/cognitive-complexity\": [\"error\", 10],\n },\n }, {\n name: \"eslint-config-setup/ai-tests-strict\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n rules: {\n // Every test must be inside a describe block — organized test suites\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md\n \"vitest/require-top-level-describe\": \"error\",\n\n // Hooks (beforeEach, afterEach) must be at the top of describe — predictable setup\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md\n \"vitest/prefer-hooks-on-top\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-tests-relaxed\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n rules: {\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"max-nested-callbacks\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"sonarjs/no-duplicate-string\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n \"@typescript-eslint/naming-convention\": \"off\",\n \"unicorn/prevent-abbreviations\": \"off\",\n },\n }, {\n name: \"eslint-config-setup/ai-e2e-relaxed\",\n files: [\"**/*.spec.ts\"],\n rules: {\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n },\n }, {\n name: \"eslint-config-setup/ai-config-relaxed\",\n files: [\n \"**/*.config.{ts,mts,cts,js,mjs,cjs}\",\n \"**/vite.config.*\",\n \"**/vitest.config.*\",\n \"**/next.config.*\",\n ],\n rules: {\n complexity: \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n \"@typescript-eslint/naming-convention\": \"off\",\n },\n }, {\n name: \"eslint-config-setup/ai-declarations-relaxed\",\n files: [\"**/*.d.ts\"],\n rules: {\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n \"@typescript-eslint/naming-convention\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"unicorn/prevent-abbreviations\": \"off\",\n \"unicorn/filename-case\": \"off\",\n },\n }]\n\n // ── G. Regex — self-documenting, modern patterns ──────────────────\n\n // ── H. JSDoc — prevent meaningless AI-generated docs ──────────────\n\n // ── J. React — stricter component patterns ───────────────────────\n\n // ── AI mode relaxations for E2E test files ────────────────────────\n // E2E tests are long procedural scripts with page interactions\n\n return configs\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\nimport eslint from \"@eslint/js\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * Base ESLint config — extends `eslint.configs.recommended` with additional\n * best-practice rules for error prevention and modern JS style.\n *\n * Rules with TypeScript equivalents (no-implied-eval, dot-notation, etc.)\n * are NOT included here — they are handled by the typescript-eslint presets.\n *\n * Preset: `@eslint/js` recommended\n * @see https://eslint.org/docs/latest/rules/\n */\nexport function baseConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/base\",\n presets: [eslint.configs.recommended],\n })\n // ── Error prevention ──────────────────────────────────────────\n\n // Enforce getter/setter pairs — prevents incomplete property accessors\n // https://eslint.org/docs/latest/rules/accessor-pairs\n .addRule(\"accessor-pairs\", [\"error\", { enforceForClassMembers: true }])\n\n // Require return in array method callbacks — prevents silent bugs in .map/.filter\n // https://eslint.org/docs/latest/rules/array-callback-return\n .addRule(\"array-callback-return\", [\"error\", { allowImplicit: true }])\n\n // Disallow returning values from constructors — constructors should not return\n // https://eslint.org/docs/latest/rules/no-constructor-return\n .addRule(\"no-constructor-return\", \"error\")\n\n // Disallow returning values from Promise executors — use resolve/reject instead\n // https://eslint.org/docs/latest/rules/no-promise-executor-return\n .addRule(\"no-promise-executor-return\", \"error\")\n\n // Disallow self-comparison (x === x) — always a bug, use Number.isNaN instead\n // https://eslint.org/docs/latest/rules/no-self-compare\n .addRule(\"no-self-compare\", \"error\")\n\n // Detect template literal syntax in regular strings — likely a forgotten backtick\n // https://eslint.org/docs/latest/rules/no-template-curly-in-string\n .addRule(\"no-template-curly-in-string\", \"error\")\n\n // Detect loops that can only iterate once — logic error indicator\n // https://eslint.org/docs/latest/rules/no-unreachable-loop\n .addRule(\"no-unreachable-loop\", \"error\")\n\n // Detect race conditions with shared variables in async code\n // https://eslint.org/docs/latest/rules/require-atomic-updates\n .addRule(\"require-atomic-updates\", \"error\")\n\n // Detect loop conditions that are never modified — likely a bug\n // https://eslint.org/docs/latest/rules/no-unmodified-loop-condition\n .addRule(\"no-unmodified-loop-condition\", \"error\")\n\n // Keep getter/setter pairs adjacent — easier to find related logic\n // https://eslint.org/docs/latest/rules/grouped-accessor-pairs\n .addRule(\"grouped-accessor-pairs\", [\"error\", \"getBeforeSet\"])\n\n // Remove pointless renames — `import { x as x }` is always wrong\n // https://eslint.org/docs/latest/rules/no-useless-rename\n .addRule(\"no-useless-rename\", \"error\")\n\n // Remove unnecessary computed keys — `{ [\"key\"]: value }` → `{ key: value }`\n // https://eslint.org/docs/latest/rules/no-useless-computed-key\n .addRule(\"no-useless-computed-key\", \"error\")\n\n // ── Dangerous patterns ────────────────────────────────────────\n\n // Forbid eval() — code injection risk, never safe\n // https://eslint.org/docs/latest/rules/no-eval\n .addRule(\"no-eval\", \"error\")\n\n // Forbid alert/confirm/prompt — not for production code\n // https://eslint.org/docs/latest/rules/no-alert\n .addRule(\"no-alert\", \"error\")\n\n // Forbid arguments.caller and arguments.callee — deprecated, breaks optimizations\n // https://eslint.org/docs/latest/rules/no-caller\n .addRule(\"no-caller\", \"error\")\n\n // Forbid extending native prototypes — breaks other code\n // https://eslint.org/docs/latest/rules/no-extend-native\n .addRule(\"no-extend-native\", \"error\")\n\n // Forbid new Function() — eval in disguise\n // https://eslint.org/docs/latest/rules/no-new-func\n .addRule(\"no-new-func\", \"error\")\n\n // Forbid new String/Number/Boolean — use primitives\n // https://eslint.org/docs/latest/rules/no-new-wrappers\n .addRule(\"no-new-wrappers\", \"error\")\n\n // Forbid new Object() — use {} literal instead\n // https://eslint.org/docs/latest/rules/no-object-constructor\n .addRule(\"no-object-constructor\", \"error\")\n\n // Forbid __proto__ — use Object.getPrototypeOf instead\n // https://eslint.org/docs/latest/rules/no-proto\n .addRule(\"no-proto\", \"error\")\n\n // Forbid __iterator__ — use Symbol.iterator instead\n // https://eslint.org/docs/latest/rules/no-iterator\n .addRule(\"no-iterator\", \"error\")\n\n // Forbid javascript: URLs — XSS vector\n // https://eslint.org/docs/latest/rules/no-script-url\n .addRule(\"no-script-url\", \"error\")\n\n // Forbid octal escape sequences — use unicode escapes instead\n // https://eslint.org/docs/latest/rules/no-octal-escape\n .addRule(\"no-octal-escape\", \"error\")\n\n // ── Code quality ──────────────────────────────────────────────\n\n // Require strict equality, but allow == null (checks both null and undefined)\n // https://eslint.org/docs/latest/rules/eqeqeq\n .addRule(\"eqeqeq\", [\"error\", \"smart\"])\n\n // Require hasOwnProperty check in for-in — prevents prototype chain iteration\n // https://eslint.org/docs/latest/rules/guard-for-in\n .addRule(\"guard-for-in\", \"error\")\n\n // Require default case to be last in switch — consistent structure\n // https://eslint.org/docs/latest/rules/default-case-last\n .addRule(\"default-case-last\", \"error\")\n\n // Require radix parameter in parseInt — prevents octal interpretation\n // https://eslint.org/docs/latest/rules/radix\n .addRule(\"radix\", \"error\")\n\n // Forbid Yoda conditions (if (\"red\" === color)) — unnatural to read\n // https://eslint.org/docs/latest/rules/yoda\n .addRule(\"yoda\", \"error\")\n\n // Forbid comma operator — confusing, usually a mistake\n // https://eslint.org/docs/latest/rules/no-sequences\n .addRule(\"no-sequences\", \"error\")\n\n // Forbid new for side effects — use function call instead\n // https://eslint.org/docs/latest/rules/no-new\n .addRule(\"no-new\", \"error\")\n\n // Forbid labels (except in rare loop cases) — goto-like control flow\n // https://eslint.org/docs/latest/rules/no-labels\n .addRule(\"no-labels\", \"error\")\n\n // Remove unnecessary .bind() calls — no effect without this\n // https://eslint.org/docs/latest/rules/no-extra-bind\n .addRule(\"no-extra-bind\", \"error\")\n\n // Remove unnecessary block statements — confusing nesting\n // https://eslint.org/docs/latest/rules/no-lone-blocks\n .addRule(\"no-lone-blocks\", \"error\")\n\n // Remove unnecessary .call()/.apply() — just call the function\n // https://eslint.org/docs/latest/rules/no-useless-call\n .addRule(\"no-useless-call\", \"error\")\n\n // Remove unnecessary string concatenation — \"a\" + \"b\" → \"ab\"\n // https://eslint.org/docs/latest/rules/no-useless-concat\n .addRule(\"no-useless-concat\", \"error\")\n\n // Remove unnecessary return statements — let function end naturally\n // https://eslint.org/docs/latest/rules/no-useless-return\n .addRule(\"no-useless-return\", \"error\")\n\n // Forbid multiline strings via backslash — use template literals\n // https://eslint.org/docs/latest/rules/no-multi-str\n .addRule(\"no-multi-str\", \"error\")\n\n // Prefer /regex/ over new RegExp(\"regex\") for static patterns\n // https://eslint.org/docs/latest/rules/prefer-regex-literals\n .addRule(\"prefer-regex-literals\", [\n \"error\",\n { disallowRedundantWrapping: true },\n ])\n\n // ── Modern JS style ───────────────────────────────────────────\n\n // Disallow var — use let/const for block scoping\n // https://eslint.org/docs/latest/rules/no-var\n .addRule(\"no-var\", \"error\")\n\n // Prefer const for variables never reassigned — only when ALL destructured vars are const\n // https://eslint.org/docs/latest/rules/prefer-const\n .addRule(\"prefer-const\", [\"error\", { destructuring: \"all\" }])\n\n // Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call()\n // https://eslint.org/docs/latest/rules/prefer-object-has-own\n .addRule(\"prefer-object-has-own\", \"error\")\n\n // Prefer { ...obj } over Object.assign({}, obj) — more readable\n // https://eslint.org/docs/latest/rules/prefer-object-spread\n .addRule(\"prefer-object-spread\", \"error\")\n\n // Prefer rest parameters over `arguments` object — typed and array-like\n // https://eslint.org/docs/latest/rules/prefer-rest-params\n .addRule(\"prefer-rest-params\", \"error\")\n\n // Prefer spread syntax over Function.prototype.apply() — cleaner syntax\n // https://eslint.org/docs/latest/rules/prefer-spread\n .addRule(\"prefer-spread\", \"error\")\n\n // Prefer template literals over string concatenation — more readable\n // https://eslint.org/docs/latest/rules/prefer-template\n .addRule(\"prefer-template\", \"error\")\n\n // Require description for Symbol() — aids debugging\n // https://eslint.org/docs/latest/rules/symbol-description\n .addRule(\"symbol-description\", \"error\")\n\n .build()\n}\n","/* eslint-disable max-lines-per-function, max-statements, max-depth, complexity, sonarjs/cognitive-complexity -- Config builder: merges presets, rules, and overrides in a single pass. Inherent complexity from ESLint's config format. */\nimport type { Linter } from \"eslint\"\n\nimport type { FlatConfig, FlatConfigArray } from \"../types\"\n\ntype RuleValue = Linter.RuleEntry\n\ninterface ConfigBuilderOptions {\n name: string\n presets?: FlatConfig[]\n passthrough?: FlatConfigArray\n plugins?: FlatConfig[\"plugins\"]\n languageOptions?: FlatConfig[\"languageOptions\"]\n settings?: FlatConfig[\"settings\"]\n files?: FlatConfig[\"files\"]\n ignores?: FlatConfig[\"ignores\"]\n}\n\ninterface ConfigBuilder {\n /** Override an existing preset rule. THROWS if rule not in preset. */\n overrideRule(name: string, value: RuleValue): ConfigBuilder\n /** Add a new rule. THROWS if rule already exists in preset or was already added. */\n addRule(name: string, value: RuleValue): ConfigBuilder\n /** Disable an existing preset rule (set to \"off\"). THROWS if not found. */\n disableRule(name: string): ConfigBuilder\n /** Remove a rule entirely from output. THROWS if not found. */\n removeRule(name: string): ConfigBuilder\n /** Add an extra output block with specific files and rules (not validated against preset). */\n addFileOverride(\n name: string,\n files: string[],\n rules: Partial<Linter.RulesRecord>,\n ): ConfigBuilder\n /** Materialize into FlatConfigArray. */\n build(): FlatConfigArray\n}\n\nexport function createConfig(options: ConfigBuilderOptions): ConfigBuilder {\n // Expand presets: merge all rules from preset objects into one map\n const presetRules = new Map<string, RuleValue>()\n const presetPlugins: NonNullable<FlatConfig[\"plugins\"]> = {}\n\n if (options.presets) {\n for (const preset of options.presets) {\n if (preset.plugins) {\n Object.assign(presetPlugins, preset.plugins)\n }\n if (preset.rules) {\n for (const [name, value] of Object.entries(preset.rules)) {\n if (value !== undefined) {\n presetRules.set(name, value)\n }\n }\n }\n }\n }\n\n // Mutable builder state\n const overrides = new Map<string, RuleValue>()\n const additions = new Map<string, RuleValue>()\n const disabled = new Set<string>()\n const removed = new Set<string>()\n const fileOverrides: Array<{\n name: string\n files: string[]\n rules: Partial<Linter.RulesRecord>\n }> = []\n\n const builder: ConfigBuilder = {\n overrideRule(name: string, value: RuleValue): ConfigBuilder {\n if (!presetRules.has(name)) {\n throw new Error(\n `overrideRule(\"${name}\"): rule not found in preset. ` +\n `Cannot override a rule that doesn't exist in the preset.`,\n )\n }\n overrides.set(name, value)\n return builder\n },\n\n addRule(name: string, value: RuleValue): ConfigBuilder {\n if (presetRules.has(name)) {\n throw new Error(\n `addRule(\"${name}\"): rule already exists in preset. ` +\n `Use overrideRule() to change its value, or removeRule() to drop it.`,\n )\n }\n if (additions.has(name)) {\n throw new Error(\n `addRule(\"${name}\"): rule was already added. ` +\n `Each rule can only be added once.`,\n )\n }\n additions.set(name, value)\n return builder\n },\n\n disableRule(name: string): ConfigBuilder {\n if (!presetRules.has(name) && !additions.has(name)) {\n throw new Error(\n `disableRule(\"${name}\"): rule not found in preset or additions. ` +\n `Cannot disable a rule that doesn't exist.`,\n )\n }\n disabled.add(name)\n return builder\n },\n\n removeRule(name: string): ConfigBuilder {\n if (!presetRules.has(name) && !additions.has(name)) {\n throw new Error(\n `removeRule(\"${name}\"): rule not found in preset or additions. ` +\n `Cannot remove a rule that doesn't exist.`,\n )\n }\n removed.add(name)\n return builder\n },\n\n addFileOverride(\n name: string,\n files: string[],\n rules: Partial<Linter.RulesRecord>,\n ): ConfigBuilder {\n fileOverrides.push({ name, files, rules })\n return builder\n },\n\n build(): FlatConfigArray {\n // Start with all preset rules\n const rules: Linter.RulesRecord = {}\n for (const [name, value] of presetRules) {\n if (!removed.has(name)) {\n rules[name] = value\n }\n }\n\n // Apply overrides\n for (const [name, value] of overrides) {\n if (!removed.has(name)) {\n rules[name] = value\n }\n }\n\n // Apply additions\n for (const [name, value] of additions) {\n if (!removed.has(name)) {\n rules[name] = value\n }\n }\n\n // Apply disabled\n for (const name of disabled) {\n if (!removed.has(name)) {\n rules[name] = \"off\"\n }\n }\n\n // Build the main config block\n const mainBlock: FlatConfig = {\n name: options.name,\n rules,\n }\n\n // Merge plugins from preset + user\n const mergedPlugins = { ...presetPlugins, ...options.plugins }\n if (Object.keys(mergedPlugins).length > 0) {\n mainBlock.plugins = mergedPlugins\n }\n\n if (options.languageOptions) {\n mainBlock.languageOptions = options.languageOptions\n }\n if (options.settings) {\n mainBlock.settings = options.settings\n }\n if (options.files) {\n mainBlock.files = options.files\n }\n if (options.ignores) {\n mainBlock.ignores = options.ignores\n }\n\n const result: FlatConfigArray = []\n\n // Passthrough blocks first\n if (options.passthrough) {\n result.push(...options.passthrough)\n }\n\n // Main validated block\n result.push(mainBlock)\n\n // File override blocks\n for (const fo of fileOverrides) {\n result.push({\n name: fo.name,\n files: fo.files,\n rules: fo.rules as Linter.RulesRecord,\n })\n }\n\n return result\n },\n }\n\n return builder\n}\n","import cspellPlugin from \"@cspell/eslint-plugin\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * CSpell config — spell checking for identifiers and comments.\n * Catches typos in variable names, function names, and documentation.\n * Severity is \"warn\" because dictionary misses are common for domain terms.\n *\n * @see https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-eslint-plugin#readme\n */\nexport function cspellConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/cspell\",\n plugins: {\n \"@cspell\": cspellPlugin,\n },\n rules: {\n // Check spelling in identifiers and comments — catches typos in API names\n // Strings are excluded (may contain user-facing text, URLs, etc.)\n // Auto-fix disabled — spelling corrections need human review\n // https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-eslint-plugin#rules\n \"@cspell/spellchecker\": [\n \"warn\",\n {\n checkComments: true,\n checkIdentifiers: true,\n checkStrings: false,\n autoFix: false,\n },\n ],\n },\n },\n ]\n}\n","import deMorganPlugin from \"eslint-plugin-de-morgan\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * De Morgan config — enforces De Morgan's laws on negated boolean expressions.\n * Both rules are auto-fixable: !(A && B) → !A || !B and !(A || B) → !A && !B.\n *\n * Complements sonarjs/no-inverted-boolean-check (which handles simple !(a === b) → a !== b)\n * by targeting compound expressions with && and ||.\n *\n * @see https://github.com/azat-io/eslint-plugin-de-morgan\n */\nexport function deMorganConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/de-morgan\",\n plugins: {\n \"de-morgan\": deMorganPlugin,\n },\n rules: {\n // Transform !(A && B) → !A || !B — more readable negated conjunction\n // https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md\n \"de-morgan/no-negated-conjunction\": \"error\",\n\n // Transform !(A || B) → !A && !B — more readable negated disjunction\n // https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md\n \"de-morgan/no-negated-disjunction\": \"error\",\n },\n },\n ]\n}\n","import importXPlugin from \"eslint-plugin-import-x\"\nimport unusedImportsPlugin from \"eslint-plugin-unused-imports\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Import/export config — two plugins with clear separation of concerns:\n * - `import-x` handles import **validation** (cycles, duplicates, etc.)\n * - `unused-imports` handles **removal** of unused imports (auto-fixable)\n *\n * Import/export **ordering** is handled by perfectionist (see perfectionist.ts).\n *\n * @see https://github.com/un-ts/eslint-plugin-import-x\n * @see https://github.com/sweepline/eslint-plugin-unused-imports\n */\nexport function importsConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/imports\",\n plugins: {\n \"import\": importXPlugin as Record<string, unknown>,\n \"unused-imports\": unusedImportsPlugin,\n },\n rules: {\n // ── Validation (import-x) ────────────────────────────────────\n\n // Merge duplicate import paths into one statement — reduces noise\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": [\"error\", { \"prefer-inline\": true }],\n\n // Forbid a module from importing itself — always a bug\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-self-import.md\n \"import/no-self-import\": \"error\",\n\n // Detect circular dependencies — limited to depth 3 for performance\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-cycle.md\n \"import/no-cycle\": [\"error\", { maxDepth: 3 }],\n\n // Remove unnecessary path segments (e.g., ./foo/../foo → ./foo)\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md\n \"import/no-useless-path-segments\": \"error\",\n\n // Forbid mutable export bindings — prevents shared mutable state\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Imports must come before other statements — consistent module structure\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/first.md\n \"import/first\": \"error\",\n\n // Require blank line after import block — visual separation\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md\n \"import/newline-after-import\": \"error\",\n\n // Detect `import Foo from './Foo'` when Foo is also a named export — likely wrong\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\n\n // Detect `Foo.bar` when `bar` is a named export — use `import { bar }` instead\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // Detect empty `import {} from 'foo'` — leftover after refactoring\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n\n // Forbid absolute file paths in imports — not portable across machines\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // ── Disabled: ordering handled by perfectionist ────────────────\n\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/order.md\n \"import/order\": \"off\",\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/sort-imports.md\n \"import/sort-imports\": \"off\",\n\n // ── Unused import removal ─────────────────────────────────────\n\n // Auto-remove unused imports — keeps imports clean (auto-fixable)\n // https://github.com/sweepline/eslint-plugin-unused-imports#usage\n \"unused-imports/no-unused-imports\": \"error\",\n },\n },\n ]\n}\n","import jsdocPlugin from \"eslint-plugin-jsdoc\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * JSDoc config — validates existing JSDoc annotations without requiring them.\n *\n * Preset: `flat/recommended-typescript-error` — all recommended JSDoc rules\n * adapted for TypeScript (types are in TS, not JSDoc).\n *\n * Overrides:\n * - `require-jsdoc` OFF — we validate existing JSDoc, we don't mandate it\n * - param/return descriptions downgraded to warn — helpful but not blocking\n * @see https://github.com/gajus/eslint-plugin-jsdoc#rules\n */\nexport function jsdocConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/jsdoc\",\n presets: [jsdocPlugin.configs[\"flat/recommended-typescript-error\"]],\n })\n // OFF: Don't require JSDoc on everything — only validate what exists\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md\n .overrideRule(\"jsdoc/require-jsdoc\", \"off\")\n\n // OFF: Too strict for normal usage — requiring @param/@returns on every\n // documented function adds noise. Enabled in AI mode where completeness matters.\n .overrideRule(\"jsdoc/require-param\", \"off\")\n .overrideRule(\"jsdoc/require-returns\", \"off\")\n .overrideRule(\"jsdoc/require-yields\", \"off\")\n\n // Warn if @param descriptions are missing — helpful but not blocking\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md\n .overrideRule(\"jsdoc/require-param-description\", \"warn\")\n\n // Warn if @returns description is missing — helpful but not blocking\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md\n .overrideRule(\"jsdoc/require-returns-description\", \"warn\")\n\n // Override preset's typed option — use plain error without options\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md\n .overrideRule(\"jsdoc/check-tag-names\", \"error\")\n\n // Enable detection of references to undefined types in JSDoc (off in preset)\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md\n .overrideRule(\"jsdoc/no-undefined-types\", \"error\")\n\n // OFF: Allow blank lines between description and tags — keeps JSDoc readable\n // The preset enforces no blank lines before tags, but visual separation helps.\n .overrideRule(\"jsdoc/tag-lines\", \"off\")\n\n .build()\n}\n","import type { ESLint } from \"eslint\"\n\nimport jsonPlugin from \"@eslint/json\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nconst plugin = jsonPlugin as unknown as ESLint.Plugin\n\n/**\n * JSON/JSONC config — native JSON linting using the official `@eslint/json` plugin.\n * Two blocks: strict JSON for most files, JSONC (with comments) for tsconfig etc.\n *\n * @see https://github.com/eslint/json#rules\n */\nexport function jsonConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/json\",\n files: [\"**/*.json\"],\n ignores: [\"**/package-lock.json\"],\n language: \"json/json\",\n plugins: {\n json: plugin,\n },\n rules: {\n // Detect duplicate keys in JSON — last-write-wins is confusing\n // https://github.com/eslint/json#rules\n \"json/no-duplicate-keys\": \"error\",\n\n // Detect empty string keys — likely a mistake\n // https://github.com/eslint/json#rules\n \"json/no-empty-keys\": \"error\",\n\n // Detect unsafe values (NaN, Infinity, lone surrogates) — invalid JSON\n // https://github.com/eslint/json#rules\n \"json/no-unsafe-values\": \"error\",\n\n // Detect unnormalized Unicode keys — prevents invisible key mismatches\n // https://github.com/eslint/json#rules\n \"json/no-unnormalized-keys\": \"error\",\n },\n },\n {\n name: \"eslint-config-setup/jsonc\",\n files: [\n \"**/tsconfig.json\",\n \"**/tsconfig.*.json\",\n \"**/.vscode/*.json\",\n \"**/turbo.json\",\n ],\n language: \"json/jsonc\",\n plugins: {\n json: plugin,\n },\n rules: {\n // Detect duplicate keys in JSONC — same rationale as JSON\n // https://github.com/eslint/json#rules\n \"json/no-duplicate-keys\": \"error\",\n\n // Detect empty string keys — likely a mistake\n // https://github.com/eslint/json#rules\n \"json/no-empty-keys\": \"error\",\n\n // Detect unsafe values (NaN, Infinity, lone surrogates) — invalid JSON\n // https://github.com/eslint/json#rules\n \"json/no-unsafe-values\": \"error\",\n\n // Detect unnormalized Unicode keys — prevents invisible key mismatches\n // https://github.com/eslint/json#rules\n \"json/no-unnormalized-keys\": \"error\",\n },\n },\n ]\n}\n","import * as mdxPlugin from \"eslint-plugin-mdx\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Markdown & MDX config — lints code blocks inside Markdown and MDX files\n * using eslint-plugin-mdx. Code examples in docs get the same ESLint rules\n * as your source code. Covers both `.md` and `.mdx` files.\n *\n * Markdown structure linting (headings, links, etc.) is intentionally left\n * to dedicated tools like markdownlint.\n *\n * @see https://github.com/mdx-js/eslint-mdx\n * @see https://github.com/DavidAnson/markdownlint-cli2 (recommended for Markdown structure linting)\n */\nexport function markdownConfig(): FlatConfigArray {\n return [\n // ── MDX / Markdown parsing ─────────────────────────────────────\n {\n ...mdxPlugin.flat,\n processor: mdxPlugin.createRemarkProcessor({\n lintCodeBlocks: true,\n languageMapper: {},\n }),\n },\n\n // ── Code block linting ─────────────────────────────────────────\n // Applies ESLint rules to fenced code blocks extracted from .md/.mdx.\n // Relaxes rules that don't apply to incomplete code snippets.\n {\n ...mdxPlugin.flatCodeBlocks,\n rules: {\n ...mdxPlugin.flatCodeBlocks.rules,\n // Snippets don't need trailing newlines\n \"eol-last\": \"off\",\n // Variables may be defined elsewhere\n \"no-undef\": \"off\",\n // Snippets often show standalone expressions\n \"no-unused-expressions\": \"off\",\n // Variables are often declared for demonstration\n \"no-unused-vars\": \"off\",\n // Padding is irrelevant in snippets\n \"padded-blocks\": \"off\",\n // Strict mode is irrelevant in snippets\n strict: \"off\",\n // BOM is irrelevant in snippets\n \"unicode-bom\": \"off\",\n },\n },\n ]\n}\n","import nodePlugin from \"eslint-plugin-n\"\nimport globals from \"globals\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Node.js config — rules for server-side JavaScript/TypeScript.\n * Hand-picked subset of eslint-plugin-n. We don't use the full preset because\n * module resolution rules (`no-missing-import`, `no-unpublished-import`) are\n * handled better by TypeScript.\n *\n * @see https://github.com/eslint-community/eslint-plugin-n#-rules\n */\nexport function nodeConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/node\",\n languageOptions: {\n globals: {\n ...globals.node,\n },\n },\n plugins: {\n node: nodePlugin,\n },\n rules: {\n // Detect usage of deprecated Node.js APIs (fs.exists, url.parse, etc.)\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-deprecated-api.md\n \"node/no-deprecated-api\": \"error\",\n\n // Prevent `module.exports = ...` assignment in ES modules\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-exports-assign.md\n \"node/no-exports-assign\": \"error\",\n\n // OFF: TypeScript resolves imports — this rule has false positives\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-missing-import.md\n \"node/no-missing-import\": \"off\",\n\n // OFF: TypeScript resolves requires — this rule has false positives\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-missing-require.md\n \"node/no-missing-require\": \"off\",\n\n // Warn on process.exit() — prefer throwing errors for clean shutdown\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-exit.md\n \"node/no-process-exit\": \"warn\",\n\n // OFF: Too many false positives with monorepos and devDependencies\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unpublished-import.md\n \"node/no-unpublished-import\": \"off\",\n\n // Validate hashbang lines — correct syntax, Unix linebreaks, only in entry files\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/hashbang.md\n \"node/hashbang\": \"error\",\n\n // Detect `__dirname + '/foo'` — use path.join() instead (breaks on Windows)\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-path-concat.md\n \"node/no-path-concat\": \"error\",\n\n // ── Prefer global builtins ────────────────────────────────────\n\n // Use global Buffer instead of require('buffer').Buffer\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/buffer.md\n \"node/prefer-global/buffer\": [\"error\", \"always\"],\n\n // Use global console — always available in Node.js\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/console.md\n \"node/prefer-global/console\": [\"error\", \"always\"],\n\n // Use global process — always available in Node.js\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/process.md\n \"node/prefer-global/process\": [\"error\", \"always\"],\n\n // Use global URL — available since Node.js 10\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/url.md\n \"node/prefer-global/url\": [\"error\", \"always\"],\n\n // Use global URLSearchParams — available since Node.js 10\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/url-search-params.md\n \"node/prefer-global/url-search-params\": [\"error\", \"always\"],\n\n // ── Prefer promise-based APIs ─────────────────────────────────\n\n // Use dns.promises instead of callback-based dns — modern async\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-promises/dns.md\n \"node/prefer-promises/dns\": \"error\",\n\n // Use fs.promises instead of callback-based fs — modern async\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-promises/fs.md\n \"node/prefer-promises/fs\": \"error\",\n },\n },\n ]\n}\n","import { configs as packageJsonConfigs } from \"eslint-plugin-package-json\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Package.json config — semantic validation of package.json files.\n *\n * Uses the recommended preset from eslint-plugin-package-json which includes:\n * - All valid-* rules (only fire on malformed existing fields, never on missing)\n * - Conservative require-* rules with ignorePrivate: true by default\n * - Quality rules (no-empty-fields, unique-dependencies, etc.)\n *\n * Sorting/ordering rules are off by default — enabled only in AI mode.\n *\n * @see https://github.com/JoshuaKGoldberg/eslint-plugin-package-json\n */\nexport function packageJsonConfig(): FlatConfigArray {\n const recommended = packageJsonConfigs.recommended\n\n return [\n {\n ...recommended,\n name: \"eslint-config-setup/package-json\",\n },\n ]\n}\n\n/**\n * Package.json AI config — enables ordering and sorting rules.\n * Only active in AI mode where deterministic structure is enforced.\n */\nexport function packageJsonAiConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/package-json-ai\",\n files: [\"**/package.json\"],\n rules: {\n // Enforce consistent property ordering in package.json\n // https://github.com/JoshuaKGoldberg/eslint-plugin-package-json\n \"package-json/order-properties\": \"error\",\n\n // Sort dependencies, scripts, exports, etc. alphabetically\n // https://github.com/JoshuaKGoldberg/eslint-plugin-package-json\n \"package-json/sort-collections\": \"error\",\n },\n },\n ]\n}\n","import perfectionistPlugin from \"eslint-plugin-perfectionist\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Perfectionist config — deterministic sorting of code elements.\n *\n * Sorts everything Prettier doesn't: imports, exports, union types,\n * object keys, interface members, etc. Especially valuable for\n * AI-generated code where ordering is arbitrary.\n *\n * Replaces `simple-import-sort` — perfectionist handles everything\n * simple-import-sort does, plus TypeScript path alias recognition\n * and named import sorting.\n *\n * Core philosophy: `partitionByNewLine: true` globally — semantic\n * grouping via blank lines is preserved, within groups natural sort.\n *\n * @see https://perfectionist.dev\n */\n\n/**\n * Mechanical sorting rules — always active.\n * These have no semantic dimension: the order of imports, named exports,\n * or union type members carries no meaning.\n */\nexport function perfectionistConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/perfectionist\",\n plugins: {\n perfectionist: perfectionistPlugin,\n },\n settings: {\n perfectionist: {\n type: \"natural\",\n order: \"asc\",\n partitionByNewLine: true,\n },\n },\n rules: {\n // Auto-sort import statements — deterministic ordering regardless of input\n // Replaces simple-import-sort/imports\n // https://perfectionist.dev/rules/sort-imports\n \"perfectionist/sort-imports\": [\n \"error\",\n {\n partitionByNewLine: false,\n },\n ],\n\n // Sort specifiers inside `import { a, b, c }` — deterministic\n // https://perfectionist.dev/rules/sort-named-imports\n \"perfectionist/sort-named-imports\": \"error\",\n\n // Sort specifiers inside `export { a, b, c }` — deterministic\n // https://perfectionist.dev/rules/sort-named-exports\n \"perfectionist/sort-named-exports\": \"error\",\n\n // Auto-sort export statements — deterministic ordering\n // Replaces simple-import-sort/exports\n // https://perfectionist.dev/rules/sort-exports\n \"perfectionist/sort-exports\": \"error\",\n\n // Sort union type members — `number | string` has no semantic order\n // https://perfectionist.dev/rules/sort-union-types\n \"perfectionist/sort-union-types\": \"error\",\n\n // Sort intersection type members — `A & B` has no semantic order\n // https://perfectionist.dev/rules/sort-intersection-types\n \"perfectionist/sort-intersection-types\": \"error\",\n },\n },\n ]\n}\n\n/**\n * Structural sorting rules — AI mode only.\n * These sort code elements that *could* have semantic ordering\n * (e.g., object keys grouped by concern). Enforcing alphabetical\n * order here is a trade-off: consistency over intent. Worth it\n * for AI-generated code where \"intent\" is often random.\n */\nexport function perfectionistAiConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/perfectionist-ai\",\n rules: {\n // Sort interface members — consistent shape definitions\n // https://perfectionist.dev/rules/sort-interfaces\n \"perfectionist/sort-interfaces\": \"error\",\n\n // Sort object type members — consistent type definitions\n // https://perfectionist.dev/rules/sort-object-types\n \"perfectionist/sort-object-types\": \"error\",\n\n // Sort enum members — consistent enum definitions\n // https://perfectionist.dev/rules/sort-enums\n \"perfectionist/sort-enums\": \"error\",\n\n // Sort JSX props — consistent component usage\n // https://perfectionist.dev/rules/sort-jsx-props\n \"perfectionist/sort-jsx-props\": \"error\",\n\n // Sort object keys — consistent object literals\n // https://perfectionist.dev/rules/sort-objects\n \"perfectionist/sort-objects\": \"error\",\n\n // Sort class members — consistent class structure\n // https://perfectionist.dev/rules/sort-classes\n \"perfectionist/sort-classes\": \"error\",\n\n // Sort switch cases — consistent case ordering\n // https://perfectionist.dev/rules/sort-switch-case\n \"perfectionist/sort-switch-case\": \"error\",\n\n // Sort Map entries — consistent Map initialization\n // https://perfectionist.dev/rules/sort-maps\n \"perfectionist/sort-maps\": \"error\",\n\n // Sort Set entries — consistent Set initialization\n // https://perfectionist.dev/rules/sort-sets\n \"perfectionist/sort-sets\": \"error\",\n\n // Sort array.includes() members — consistent membership checks\n // https://perfectionist.dev/rules/sort-array-includes\n \"perfectionist/sort-array-includes\": \"error\",\n },\n },\n ]\n}\n","import prettierConfig from \"eslint-config-prettier\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * Prettier compat config — disables all ESLint rules that conflict with Prettier.\n * Must be the last config block (before OxLint if enabled).\n *\n * Preset: eslint-config-prettier (turns off ~30 formatting rules)\n * @see https://github.com/prettier/eslint-config-prettier#readme\n */\nexport function prettierCompatConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/prettier\",\n presets: [prettierConfig],\n }).build()\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\n// @ts-expect-error -- no type declarations available\nimport jsxA11yPlugin from \"eslint-plugin-jsx-a11y\"\nimport reactPlugin from \"eslint-plugin-react\"\nimport reactHooksPlugin from \"eslint-plugin-react-hooks\"\nimport reactRefreshPlugin from \"eslint-plugin-react-refresh\"\nimport globals from \"globals\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * React config — React 19+, Hooks (incl. Compiler), and JSX accessibility.\n *\n * We hand-pick rules instead of using plugin presets because:\n * - `eslint-plugin-react`'s recommended preset includes `react-in-jsx-scope` which\n * is unnecessary since React 17 JSX transform\n * - We want explicit control over each rule and its severity\n * - jsx-a11y has no flat config preset yet\n *\n * Since React Compiler v1.0, compiler rules are included in eslint-plugin-react-hooks\n * (>= 7.0.0). The standalone eslint-plugin-react-compiler is deprecated.\n *\n * @see https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules\n * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks\n * @see https://github.com/ArnaudBarre/eslint-plugin-react-refresh\n * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#supported-rules\n */\nexport function reactConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/react\",\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n plugins: {\n react: reactPlugin,\n \"react-hooks\": reactHooksPlugin as Record<string, unknown>,\n \"react-refresh\": reactRefreshPlugin,\n \"jsx-a11y\": jsxA11yPlugin as Record<string, unknown>,\n },\n settings: {\n react: {\n version: \"detect\",\n },\n },\n rules: {\n // ── React core ────────────────────────────────────────────────\n\n // Prevent unsafe target=\"_blank\" links — requires rel=\"noreferrer\"\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": \"error\",\n\n // Prevent usage of undefined JSX components — catches typos\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // OFF: Not needed with React 17+ automatic JSX transform\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": \"off\",\n\n // OFF: Not needed with React 17+ automatic JSX transform\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": \"off\",\n\n // Warn on dangerouslySetInnerHTML — XSS risk, should be reviewed\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Prevent usage of deprecated React APIs — stay current\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": \"error\",\n\n // Prevent direct mutation of this.state — use setState instead\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent unknown DOM properties (e.g., class → className)\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Prevent unstable nested component definitions — causes remounts\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md\n \"react/no-unstable-nested-components\": \"error\",\n\n // Prevent passing children as a prop — use JSX children syntax instead\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Enforce self-closing tags for components without children — <Foo />\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Prevent void DOM elements (br, img, hr) from having children\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n // OFF: TypeScript handles prop validation\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": \"off\",\n\n // Require key prop in iterators — including fragment shorthand\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": [\"error\", { checkFragmentShorthand: true }],\n\n // Prevent comments from being inserted as text nodes in JSX\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // Prevent duplicate props — always a bug\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": \"error\",\n\n // Remove unnecessary JSX fragments — <>{x}</> → {x}\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": [\"error\", { allowExpressions: true }],\n\n // Enforce PascalCase for component names — React convention\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": \"error\",\n\n // Prefer <Foo active /> over <Foo active={true} /> — concise\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\"],\n\n // Prevent unnecessary string curly braces: title={\"foo\"} → title=\"foo\"\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\n \"error\",\n { props: \"never\", children: \"never\" },\n ],\n\n // Enforce function declarations for named components, arrows for unnamed\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"function-declaration\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Enforce destructured useState naming: const [foo, setFoo] = useState()\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md\n \"react/hook-use-state\": \"error\",\n\n // Require sandbox attribute on iframes — security best practice\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md\n \"react/iframe-missing-sandbox\": \"error\",\n\n // Prevent using array index as key — breaks reconciliation on reorder\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Prevent object/array literals as default props — creates new reference every render\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md\n \"react/no-object-type-as-default-prop\": \"error\",\n\n // Prevent `{count && <Foo />}` — renders \"0\" when count is 0\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md\n \"react/jsx-no-leaked-render\": \"error\",\n\n // Prevent inline object creation in context providers — causes re-renders\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n // Prevent `this.setState({ count: this.state.count + 1 })` — race condition\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Detect state properties that are set but never read — dead code\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md\n \"react/no-unused-state\": \"error\",\n\n // Prevent `style=\"color: red\"` — must be an object in React\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // No string refs — deprecated since React 16.3, use useRef\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Require explicit type on <button> — prevents unintended form submits\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md\n \"react/button-has-type\": \"error\",\n\n // Prevent dangerouslySetInnerHTML + children at the same time — conflict\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // ── React Hooks ───────────────────────────────────────────────\n\n // Enforce Rules of Hooks — hooks must be called at the top level\n // https://react.dev/reference/rules/rules-of-hooks\n \"react-hooks/rules-of-hooks\": \"error\",\n\n // Verify dependency arrays in useEffect/useMemo/useCallback\n // https://react.dev/reference/react/useEffect#specifying-reactive-dependencies\n \"react-hooks/exhaustive-deps\": \"error\",\n\n // ── React Refresh (Fast Refresh / HMR) ────────────────────────\n\n // Ensure components are exported in a way that supports Fast Refresh.\n // Mixed exports (component + constants) break HMR state preservation.\n // allowConstantExport: Vite handles constant exports without breaking HMR.\n // https://github.com/ArnaudBarre/eslint-plugin-react-refresh\n \"react-refresh/only-export-components\": [\n \"warn\",\n { allowConstantExport: true },\n ],\n\n // ── React Compiler (via react-hooks >= 7.0) ─────────────────────\n\n // Validates code is compatible with React Compiler's auto-memoization\n // Merged into react-hooks since React Compiler v1.0 (Oct 2025)\n // https://react.dev/learn/react-compiler\n \"react-hooks/react-compiler\": \"error\",\n\n // ── JSX Accessibility (a11y) ──────────────────────────────────\n\n // Require alt text on img, area, input[type=\"image\"], object\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/alt-text.md\n \"jsx-a11y/alt-text\": \"error\",\n\n // Require anchor content — empty links are inaccessible\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-has-content.md\n \"jsx-a11y/anchor-has-content\": \"error\",\n\n // Require valid href on anchors — no `#` or `javascript:` void\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-is-valid.md\n \"jsx-a11y/anchor-is-valid\": \"error\",\n\n // Active descendant elements must be focusable (tabindex)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-activedescendant-has-tabindex.md\n \"jsx-a11y/aria-activedescendant-has-tabindex\": \"error\",\n\n // Validate aria-* attributes exist — catches typos in ARIA props\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-props.md\n \"jsx-a11y/aria-props\": \"error\",\n\n // Validate aria-* values match their type (boolean, token, etc.)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-proptypes.md\n \"jsx-a11y/aria-proptypes\": \"error\",\n\n // Validate role attribute values — catches invalid role names\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-role.md\n \"jsx-a11y/aria-role\": \"error\",\n\n // Prevent ARIA on elements that don't support it (meta, script, style)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-unsupported-elements.md\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n\n // Click handlers must have keyboard equivalent — keyboard accessibility\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/click-events-have-key-events.md\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n\n // Heading elements must have content — screen readers need it\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md\n \"jsx-a11y/heading-has-content\": \"error\",\n\n // Require lang attribute on <html> — language identification\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/html-has-lang.md\n \"jsx-a11y/html-has-lang\": \"error\",\n\n // Prevent redundant alt text like \"image of...\" — screen readers add this\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md\n \"jsx-a11y/img-redundant-alt\": \"error\",\n\n // Every form label must be associated with a control\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md\n \"jsx-a11y/label-has-associated-control\": \"error\",\n\n // Mouse event handlers must have keyboard equivalents\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/mouse-events-have-key-events.md\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n\n // No accessKey attribute — inconsistent shortcuts confuse users\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-access-key.md\n \"jsx-a11y/no-access-key\": \"error\",\n\n // No autofocus attribute (except non-DOM) — disorienting for screen readers\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-autofocus.md\n \"jsx-a11y/no-autofocus\": [\"error\", { ignoreNonDOM: true }],\n\n // No <marquee>/<blink> — deprecated distracting elements\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-distracting-elements.md\n \"jsx-a11y/no-distracting-elements\": \"error\",\n\n // No redundant ARIA roles (e.g., <button role=\"button\">)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-redundant-roles.md\n \"jsx-a11y/no-redundant-roles\": \"error\",\n\n // Role elements must have all required ARIA props\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-has-required-aria-props.md\n \"jsx-a11y/role-has-required-aria-props\": \"error\",\n\n // Don't use unsupported ARIA attributes for a given role\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-supports-aria-props.md\n \"jsx-a11y/role-supports-aria-props\": \"error\",\n\n // scope attribute only on <th> elements — HTML specification\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/scope.md\n \"jsx-a11y/scope\": \"error\",\n\n // No positive tabIndex values — disrupts natural tab order\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/tabindex-no-positive.md\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n\n // Validate lang attribute values — e.g. \"de\" ok, \"deutsch\" not\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/lang.md\n \"jsx-a11y/lang\": \"error\",\n\n // Validate autocomplete attribute values on form elements\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/autocomplete-valid.md\n \"jsx-a11y/autocomplete-valid\": \"error\",\n },\n },\n ]\n}\n","import reactEffectPlugin from \"eslint-plugin-react-you-might-not-need-an-effect\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * React effect config — catches unnecessary useEffect anti-patterns.\n * Codifies the patterns from the React docs article \"You Might Not Need an Effect\".\n *\n * Complements react-hooks (which checks dependency arrays are correct) by\n * detecting when the entire effect is unnecessary — derived state, chained\n * state updates, prop-triggered resets, and more.\n *\n * @see https://react.dev/learn/you-might-not-need-an-effect\n * @see https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n */\nexport function reactEffectConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/react-effect\",\n plugins: {\n \"react-you-might-not-need-an-effect\": reactEffectPlugin,\n },\n rules: {\n // Disallow storing derived state in an effect — compute at render time or useMemo\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-derived-state\": \"error\",\n\n // Disallow chaining state updates in an effect — update together instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-chain-state-updates\": \"error\",\n\n // Disallow using state + effect as an event handler — call logic directly\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-event-handler\": \"error\",\n\n // Disallow adjusting state when a prop changes — compute inline during render\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change\": \"warn\",\n\n // Disallow resetting all state when a prop changes — use the key prop instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change\": \"error\",\n\n // Disallow passing live state to parent via effect — lift state up instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-pass-live-state-to-parent\": \"error\",\n\n // Disallow passing fetched data to parent via effect — fetch in parent instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-pass-data-to-parent\": \"error\",\n\n // Disallow initializing state in an effect — pass initial value to useState\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-initialize-state\": \"error\",\n\n // Disallow empty effects — dead code, remove them\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-empty-effect\": \"error\",\n },\n },\n ]\n}\n","import { configs as regexpConfigs } from \"eslint-plugin-regexp\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * RegExp config — uses the full `flat/recommended` preset from eslint-plugin-regexp.\n * Validates regular expression syntax, detects common mistakes, and suggests\n * simpler patterns.\n *\n * Preset: eslint-plugin-regexp flat/recommended (all rules at their default severity)\n * @see https://ota-meshi.github.io/eslint-plugin-regexp/\n * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/\n */\nexport function regexpConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/regexp\",\n presets: [regexpConfigs[\"flat/recommended\"]],\n })\n\n // ── Beyond recommended ──────────────────────────────────────────\n\n // Disallow invisible control characters in regex — almost always a paste artifact\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-control-character.html\n .addRule(\"regexp/no-control-character\", \"error\")\n\n // Disallow ambiguous octal escapes — use \\x01 or named backreference instead\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-octal.html\n .addRule(\"regexp/no-octal\", \"error\")\n\n // Disallow standalone backslashes — /\\a/ silently ignores the backslash\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-standalone-backslash.html\n .addRule(\"regexp/no-standalone-backslash\", \"error\")\n\n // Detect patterns with quadratic move behavior — subtle ReDoS variant\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-move.html\n .addRule(\"regexp/no-super-linear-move\", \"error\")\n\n // Require $$ for literal dollar signs in replacement strings — prevents bugs\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-escape-replacement-dollar-char.html\n .addRule(\"regexp/prefer-escape-replacement-dollar-char\", \"error\")\n\n .build()\n}\n","import type { ESLint } from \"eslint\"\n\n// @ts-expect-error -- no type declarations available\nimport securityPlugin from \"eslint-plugin-security\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nconst plugin = securityPlugin as unknown as ESLint.Plugin\n\n/**\n * Security config — Node.js security patterns from eslint-plugin-security.\n * We manually select rules instead of using the preset because the preset\n * enables `detect-object-injection` which produces too many false positives.\n *\n * @see https://github.com/eslint-community/eslint-plugin-security#rules\n */\nexport function securityConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/security\",\n plugins: {\n security: plugin,\n },\n rules: {\n // ── Errors: dangerous patterns that should never appear ────────\n\n // Detect Buffer read/write without noAssert — can read out of bounds\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-buffer-noassert.md\n \"security/detect-buffer-noassert\": \"error\",\n\n // Detect child_process usage — potential command injection vector\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-child-process.md\n \"security/detect-child-process\": \"error\",\n\n // Detect disabled mustache escaping — XSS risk in templates\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-disable-mustache-escape.md\n \"security/detect-disable-mustache-escape\": \"error\",\n\n // Detect eval() with variable arguments — code injection risk\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-eval-with-expression.md\n \"security/detect-eval-with-expression\": \"error\",\n\n // Detect new Buffer(n) — deprecated, use Buffer.alloc() instead\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-new-buffer.md\n \"security/detect-new-buffer\": \"error\",\n\n // Detect CSRF middleware placed after method-override — CSRF bypass\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-no-csrf-before-method-override.md\n \"security/detect-no-csrf-before-method-override\": \"error\",\n\n // Detect Math.random() / pseudoRandomBytes — not cryptographically secure\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-pseudoRandomBytes.md\n \"security/detect-pseudoRandomBytes\": \"error\",\n\n // Detect regexes vulnerable to ReDoS (catastrophic backtracking)\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-unsafe-regex.md\n \"security/detect-unsafe-regex\": \"error\",\n\n // ── Warnings: worth reviewing but may have legitimate uses ─────\n\n // Detect dynamic fs paths — potential path traversal (many false positives)\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-fs-filename.md\n \"security/detect-non-literal-fs-filename\": \"warn\",\n\n // Detect dynamic regex construction — potential ReDoS\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-regexp.md\n \"security/detect-non-literal-regexp\": \"warn\",\n\n // Detect dynamic require() — potential code injection\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-require.md\n \"security/detect-non-literal-require\": \"warn\",\n\n // Detect string comparisons that may leak timing info — side-channel risk\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-possible-timing-attacks.md\n \"security/detect-possible-timing-attacks\": \"warn\",\n\n // Detect Unicode bidirectional control characters — source code trojan attack\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-bidi-characters.md\n \"security/detect-bidi-characters\": \"error\",\n\n // ── Disabled: too many false positives ────────────────────────\n\n // Flags all bracket notation (obj[key]) — nearly every codebase triggers this\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-object-injection.md\n \"security/detect-object-injection\": \"off\",\n },\n },\n ]\n}\n","import sonarjsPlugin from \"eslint-plugin-sonarjs\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * SonarJS config — code-quality rules from SonarSource.\n * Hand-picked subset focused on bug detection and code smells.\n * We don't use the full preset because many SonarJS rules overlap with\n * typescript-eslint and unicorn.\n *\n * @see https://github.com/SonarSource/SonarJS/tree/master/packages/jsts/src/rules#readme\n */\nexport function sonarjsConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/sonarjs\",\n plugins: {\n sonarjs: sonarjsPlugin as Record<string, unknown>,\n },\n rules: {\n // Detect copy-pasted functions — extract to shared helper instead\n // https://sonarsource.github.io/rspec/#/rspec/S4144/javascript\n \"sonarjs/no-identical-functions\": \"error\",\n\n // Merge nested if-statements that can be combined — reduces nesting\n // https://sonarsource.github.io/rspec/#/rspec/S1066/javascript\n \"sonarjs/no-collapsible-if\": \"error\",\n\n // Simplify `if (x) return true; else return false;` → `return x`\n // https://sonarsource.github.io/rspec/#/rspec/S1125/javascript\n \"sonarjs/no-redundant-boolean\": \"error\",\n\n // Detect collections that are populated but never read — dead code\n // https://sonarsource.github.io/rspec/#/rspec/S4030/javascript\n \"sonarjs/no-unused-collection\": \"error\",\n\n // Return value directly instead of storing in temp variable first\n // https://sonarsource.github.io/rspec/#/rspec/S1488/javascript\n \"sonarjs/prefer-immediate-return\": \"error\",\n\n // Simplify boolean return patterns — `return cond` instead of `if/else`\n // https://sonarsource.github.io/rspec/#/rspec/S1126/javascript\n \"sonarjs/prefer-single-boolean-return\": \"error\",\n\n // Detect identical sub-expressions on both sides of operator (x && x)\n // https://sonarsource.github.io/rspec/#/rspec/S1764/javascript\n \"sonarjs/no-identical-expressions\": \"error\",\n\n // Simplify `!(a === b)` → `a !== b` — more readable\n // https://sonarsource.github.io/rspec/#/rspec/S1940/javascript\n \"sonarjs/no-inverted-boolean-check\": \"error\",\n\n // Detect size/length comparisons that are always true/false\n // https://sonarsource.github.io/rspec/#/rspec/S3981/javascript\n \"sonarjs/no-collection-size-mischeck\": \"error\",\n\n // Detect duplicate conditions in if/else-if chains — copy-paste bug\n // https://sonarsource.github.io/rspec/#/rspec/S1862/javascript\n \"sonarjs/no-identical-conditions\": \"error\",\n\n // Detect identical code in if and else branches — refactoring leftover\n // https://sonarsource.github.io/rspec/#/rspec/S1871/javascript\n \"sonarjs/no-duplicated-branches\": \"error\",\n\n // Detect .filter()/.map()/.slice() called without using the result\n // https://sonarsource.github.io/rspec/#/rspec/S2201/javascript\n \"sonarjs/no-ignored-return\": \"error\",\n\n // Detect redundant return/break/continue at end of block\n // https://sonarsource.github.io/rspec/#/rspec/S3626/javascript\n \"sonarjs/no-redundant-jump\": \"error\",\n\n // Prevent .only() from being committed — blocks CI for others\n // https://sonarsource.github.io/rspec/#/rspec/S6426/javascript\n \"sonarjs/no-exclusive-tests\": \"error\",\n\n // Detect `const sorted = arr.sort()` — .sort() mutates the original\n // https://sonarsource.github.io/rspec/#/rspec/S4043/javascript\n \"sonarjs/no-misleading-array-reverse\": \"error\",\n\n // Require initial value for .reduce() — crashes on empty arrays without it\n // https://sonarsource.github.io/rspec/#/rspec/S6959/javascript\n \"sonarjs/reduce-initial-value\": \"error\",\n\n // Disallow async operations in constructors — use factory methods\n // https://sonarsource.github.io/rspec/#/rspec/S7059/javascript\n \"sonarjs/no-async-constructor\": \"error\",\n\n // Detect `field?: string | undefined` — the `?` already implies undefined\n // https://sonarsource.github.io/rspec/#/rspec/S4782/javascript\n \"sonarjs/no-redundant-optional\": \"error\",\n\n // Detect `string | number | string` — duplicate constituents in unions\n // https://sonarsource.github.io/rspec/#/rspec/S4621/javascript\n \"sonarjs/no-duplicate-in-composite\": \"error\",\n\n // Detect hardcoded secrets (API keys, passwords, tokens) in source code\n // https://sonarsource.github.io/rspec/#/rspec/S6418/javascript\n \"sonarjs/no-hardcoded-secrets\": \"warn\",\n },\n },\n ]\n}\n","/* eslint-disable max-lines-per-function, max-statements -- Rule definition file: sequential builder calls that configure the TypeScript preset. */\nimport tseslint from \"typescript-eslint\"\n\nimport type { FlatConfig, FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * TypeScript config — extends typescript-eslint strict presets with project-wide type checking.\n *\n * Presets used:\n * - `tseslint.configs.strictTypeChecked` — all recommended + strict rules with type info\n * - `tseslint.configs.stylisticTypeChecked` — consistent code style with type info\n *\n * The presets already handle many core ESLint rules by disabling them and enabling\n * TS-aware equivalents (no-implied-eval, dot-notation, no-throw-literal, etc.).\n *\n * @see https://typescript-eslint.io/getting-started/\n * @see https://typescript-eslint.io/rules/\n */\nexport function typescriptConfig(): FlatConfigArray {\n const typeChecked = tseslint.configs.strictTypeChecked\n const stylistic = tseslint.configs.stylisticTypeChecked\n\n // Blocks 0+1: parser setup + ESLint-core replacements (structural, not validated)\n // Block 2 from each: the actual @typescript-eslint/* rules (validated)\n const structuralBlocks = typeChecked.slice(0, 2) as FlatConfigArray\n const ruleBlocks = [typeChecked[2], stylistic[2]] as FlatConfig[]\n\n const builder = createConfig({\n name: \"eslint-config-setup/typescript\",\n passthrough: structuralBlocks,\n presets: ruleBlocks,\n languageOptions: {\n parserOptions: {\n // Use project service for automatic tsconfig resolution\n // https://typescript-eslint.io/packages/parser#projectservice\n projectService: true,\n },\n },\n })\n\n // ── Override preset defaults ──────────────────────────────────\n\n // Override bare `error` with underscore-ignore pattern — universal convention\n // Preset sets bare `error` with no options (no ignoreRestSiblings, no _ pattern)\n // https://typescript-eslint.io/rules/no-unused-vars\n builder.overrideRule(\"@typescript-eslint/no-unused-vars\", [\n \"error\",\n {\n args: \"all\",\n argsIgnorePattern: \"^_\",\n caughtErrors: \"all\",\n caughtErrorsIgnorePattern: \"^_\",\n destructuredArrayIgnorePattern: \"^_\",\n varsIgnorePattern: \"^_\",\n ignoreRestSiblings: true,\n },\n ])\n\n // Enforce T[] for simple types, Array<T> for complex — readable array types\n // (in stylisticTypeChecked preset as bare \"error\", we add options)\n // https://typescript-eslint.io/rules/array-type\n builder.overrideRule(\"@typescript-eslint/array-type\", [\n \"error\",\n { default: \"array-simple\" },\n ])\n\n // Override return-await from \"error-handling-correctness-only\" to \"in-try-catch\"\n // https://typescript-eslint.io/rules/return-await\n builder.overrideRule(\"@typescript-eslint/return-await\", [\n \"error\",\n \"in-try-catch\",\n ])\n\n // Downgrade from error to warn — stay current but don't block\n // https://typescript-eslint.io/rules/no-deprecated\n builder.overrideRule(\"@typescript-eslint/no-deprecated\", \"warn\")\n\n // ── Beyond presets: import/export hygiene ──────────────────\n\n // Enforce `import type { T }` — ensures types are erased at compile time\n // https://typescript-eslint.io/rules/consistent-type-imports\n builder.addRule(\"@typescript-eslint/consistent-type-imports\", [\n \"error\",\n { fixStyle: \"inline-type-imports\" },\n ])\n\n // Enforce `export type { T }` — matches import convention\n // https://typescript-eslint.io/rules/consistent-type-exports\n builder.addRule(\"@typescript-eslint/consistent-type-exports\", [\n \"error\",\n { fixMixedExportsWithInlineTypeSpecifier: true },\n ])\n\n // Prevent type-only imports from triggering side effects\n // https://typescript-eslint.io/rules/no-import-type-side-effects\n builder.addRule(\"@typescript-eslint/no-import-type-side-effects\", \"error\")\n\n // Remove unnecessary namespace qualifiers — cleaner code\n // https://typescript-eslint.io/rules/no-unnecessary-qualifier\n builder.addRule(\"@typescript-eslint/no-unnecessary-qualifier\", \"error\")\n\n // Remove useless `export {}` — keeps module boundaries clean\n // https://typescript-eslint.io/rules/no-useless-empty-export\n builder.addRule(\"@typescript-eslint/no-useless-empty-export\", \"error\")\n\n // Detect redundant `this.x = x` after constructor parameter property\n // https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment\n builder.addRule(\n \"@typescript-eslint/no-unnecessary-parameter-property-assignment\",\n \"error\",\n )\n\n // Void-returning callbacks must not accidentally return values\n // Catches: `forEach(x => map.set(x, 1))` — .set() returns the map, but forEach expects void\n // https://typescript-eslint.io/rules/strict-void-return\n builder.addRule(\"@typescript-eslint/strict-void-return\", \"error\")\n\n // ── Beyond presets: safety & correctness ──────────────────────\n\n // Prevent variable shadowing — catches bugs where inner var hides outer\n // Not in any preset. TS-aware version avoids false positives with type/value merging.\n // https://typescript-eslint.io/rules/no-shadow\n builder.addRule(\"no-shadow\", \"off\")\n builder.addRule(\"@typescript-eslint/no-shadow\", [\n \"error\",\n {\n hoist: \"all\",\n allow: [\"resolve\", \"reject\", \"done\", \"next\", \"error\"],\n ignoreTypeValueShadow: true,\n ignoreFunctionTypeParameterNameValueShadow: true,\n },\n ])\n\n // Allow numbers in template literals — `${count}` is idiomatic JS\n // https://typescript-eslint.io/rules/restrict-template-expressions\n builder.overrideRule(\"@typescript-eslint/restrict-template-expressions\", [\n \"error\",\n { allowNumber: true },\n ])\n\n // Require strict boolean expressions — no implicit truthiness checks\n // Prevents bugs like `if (count)` when count is 0 (falsy but valid)\n // https://typescript-eslint.io/rules/strict-boolean-expressions\n builder.addRule(\"@typescript-eslint/strict-boolean-expressions\", [\n \"error\",\n { allowNullableBoolean: true, allowNullableObject: true },\n ])\n\n // ── File overrides ────────────────────────────────────────────\n\n // Disable type-checked rules for plain JS files (no tsconfig coverage)\n // https://typescript-eslint.io/users/configs#disable-type-checked\n builder.addFileOverride(\n \"eslint-config-setup/typescript-js-compat\",\n [\"**/*.{js,mjs,cjs}\"],\n tseslint.configs.disableTypeChecked.rules ?? {},\n )\n\n return builder.build()\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\nimport unicornPlugin from \"eslint-plugin-unicorn\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Unicorn config — modern JavaScript idioms and best practices.\n * We hand-pick rules instead of using `flat/recommended` because the\n * recommended preset includes opinionated rules we disagree with\n * (e.g., `no-null`, `no-nested-ternary`, `filename-case`).\n *\n * @see https://github.com/sindresorhus/eslint-plugin-unicorn#rules\n */\nexport function unicornConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/unicorn\",\n plugins: {\n unicorn: unicornPlugin,\n },\n rules: {\n // ── Error prevention ──────────────────────────────────────────\n\n // Forbid `/* eslint-disable */` without specific rule — too broad\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n\n // Disallow `instanceof` with built-in objects — use proper checks instead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md\n \"unicorn/no-instanceof-builtins\": \"error\",\n\n // Prevent passing non-function to removeEventListener — common mistake\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md\n \"unicorn/no-invalid-remove-event-listener\": \"error\",\n\n // Disallow invalid fetch() options — catches typos at lint time\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md\n \"unicorn/no-invalid-fetch-options\": \"error\",\n\n // Prefer direct undefined checks over typeof — cleaner with strict mode\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md\n \"unicorn/no-typeof-undefined\": \"error\",\n\n // Remove useless fallback in object spread ({ ...a, x: a.x ?? y })\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md\n \"unicorn/no-useless-fallback-in-spread\": \"error\",\n\n // Remove unnecessary .length checks before array operations\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md\n \"unicorn/no-useless-length-check\": \"error\",\n\n // Remove unnecessary spread operators ([...array] when array already exists)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md\n \"unicorn/no-useless-spread\": \"error\",\n\n // Remove useless Promise.resolve/reject wrappers — simplify async code\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md\n \"unicorn/no-useless-promise-resolve-reject\": \"error\",\n\n // Disallow `return undefined` — implicit undefined is cleaner\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md\n \"unicorn/no-useless-undefined\": \"error\",\n\n // Disallow `await` in Promise.all/race arguments — already a promise\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md\n \"unicorn/no-await-in-promise-methods\": \"error\",\n\n // Catch `!a === b` bugs — use `a !== b` instead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md\n \"unicorn/no-negation-in-equality-check\": \"error\",\n\n // Disallow objects with `.then` property — prevents accidental thenables\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md\n \"unicorn/no-thenable\": \"error\",\n\n // Disallow `(await foo).bar` — assign to variable first for clarity\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md\n \"unicorn/no-await-expression-member\": \"error\",\n\n // Disallow `const self = this` — use arrow functions instead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md\n \"unicorn/no-this-assignment\": \"error\",\n\n // Disallow `await` on non-promise values — unnecessary overhead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md\n \"unicorn/no-unnecessary-await\": \"error\",\n\n // Disallow unnecessary slice end argument — `.length` is the default\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-slice-end.md\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n\n // OFF: Stylistic — developers should decide their own array initialization pattern\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md\n \"unicorn/no-immediate-mutation\": \"off\",\n\n // Disallow recursive access in getters/setters — infinite loop risk\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md\n \"unicorn/no-accessor-recursion\": \"error\",\n\n // Disallow anonymous default exports — hard to find and refactor\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md\n \"unicorn/no-anonymous-default-export\": \"error\",\n\n // Disallow `this` argument in array methods — use arrow functions\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md\n \"unicorn/no-array-method-this-argument\": \"error\",\n\n // Disallow passing function references directly to iterator methods\n // Prevents bugs like `['1','2'].map(parseInt)` → [1, NaN]\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md\n \"unicorn/no-array-callback-reference\": \"error\",\n\n // Disallow unreadable IIFEs — extract to named function\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md\n \"unicorn/no-unreadable-iife\": \"error\",\n\n // Require Error messages — aids debugging\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md\n \"unicorn/error-message\": \"error\",\n\n // Require `new` keyword when throwing errors — consistent pattern\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md\n \"unicorn/throw-new-error\": \"error\",\n\n // Prefer consistent types when spreading a ternary in an array literal\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md\n \"unicorn/consistent-empty-array-spread\": \"error\",\n\n // Prefer passing Date directly to constructor when cloning\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md\n \"unicorn/consistent-date-clone\": \"error\",\n\n // Enforce consistent style for indexOf/findIndex existence checks\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md\n \"unicorn/consistent-existence-index-check\": \"error\",\n\n // ── Modern API preferences ────────────────────────────────────\n\n // Prefer .flatMap() over .map().flat() — single pass, more readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md\n \"unicorn/prefer-array-flat-map\": \"error\",\n\n // Prefer .find() over .filter()[0] — stops at first match\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md\n \"unicorn/prefer-array-find\": \"error\",\n\n // Prefer .flat() over manual recursive flattening\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md\n \"unicorn/prefer-array-flat\": \"error\",\n\n // Prefer .indexOf() over manual search loops\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md\n \"unicorn/prefer-array-index-of\": \"error\",\n\n // Prefer .some() over .find() !== undefined — semantic intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md\n \"unicorn/prefer-array-some\": \"error\",\n\n // Prefer .at(-1) over arr[arr.length - 1] — cleaner negative indexing\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md\n \"unicorn/prefer-at\": \"error\",\n\n // Prefer .includes() over .indexOf() !== -1 — boolean intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md\n \"unicorn/prefer-includes\": \"error\",\n\n // Prefer .before()/.after()/.replaceWith() over parent.insertBefore()\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n\n // Prefer Math.log10/Math.hypot over manual math — accurate and readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md\n \"unicorn/prefer-modern-math-apis\": \"error\",\n\n // Prefer negative index over length-based — cleaner with .slice(-n)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md\n \"unicorn/prefer-negative-index\": \"error\",\n\n // Prefer Number.isFinite/Number.isNaN over global — no coercion\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md\n \"unicorn/prefer-number-properties\": \"error\",\n\n // Prefer Object.fromEntries() over manual reduce for key-value mapping\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md\n \"unicorn/prefer-object-from-entries\": \"error\",\n\n // Prefer Set.has() over Array.includes() for repeated lookups — O(1)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md\n \"unicorn/prefer-set-has\": \"error\",\n\n // Prefer .replaceAll() over regex with global flag — clearer intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md\n \"unicorn/prefer-string-replace-all\": \"error\",\n\n // Prefer .slice() over .substr()/.substring() — consistent, no gotchas\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md\n \"unicorn/prefer-string-slice\": \"error\",\n\n // Prefer .startsWith()/.endsWith() over regex — simpler, faster\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md\n \"unicorn/prefer-string-starts-ends-with\": \"error\",\n\n // Prefer .trimStart()/.trimEnd() over .trimLeft()/.trimRight()\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n\n // Prefer structuredClone() over JSON.parse(JSON.stringify()) — handles more types\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md\n \"unicorn/prefer-structured-clone\": \"error\",\n\n // Prefer top-level await over async IIFE — cleaner module pattern\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md\n \"unicorn/prefer-top-level-await\": \"error\",\n\n // Throw TypeError for type checks — correct error type\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md\n \"unicorn/prefer-type-error\": \"error\",\n\n // ── Regex ─────────────────────────────────────────────────────\n\n // Simplify regex patterns — auto-fixable regex optimization\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md\n \"unicorn/better-regex\": \"error\",\n\n // ── Misc ──────────────────────────────────────────────────────\n\n // Enforce `error` name in catch blocks — consistent naming\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md\n \"unicorn/catch-error-name\": [\"error\", { name: \"error\" }],\n\n // Enforce `new` for builtins that require it (Map, Set, WeakMap, etc.)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md\n \"unicorn/new-for-builtins\": \"error\",\n\n // Prefer Array.from({length}) or fill() over new Array(n) — explicit intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md\n \"unicorn/no-new-array\": \"error\",\n\n // Prefer Buffer.from()/Buffer.alloc() over new Buffer() — deprecated\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md\n \"unicorn/no-new-buffer\": \"error\",\n\n // Forbid unreadable destructuring like `const [,,, d] = arr`\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n\n // Remove unnecessary `.0` in numbers (1.0 → 1) — cleaner\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md\n \"unicorn/no-zero-fractions\": \"error\",\n\n // Enforce lowercase hex (0xff not 0xFF) — consistent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md\n \"unicorn/number-literal-case\": \"error\",\n\n // Enforce numeric separators (1_000_000 not 1000000) — readable large numbers\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md\n \"unicorn/numeric-separators-style\": \"error\",\n\n // Prefer `export { x } from 'y'` over import then re-export\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md\n \"unicorn/prefer-export-from\": [\"error\", { ignoreUsedVariables: true }],\n\n // Prefer built-in coercion (String, Number, Boolean) over wrapper functions\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md\n \"unicorn/prefer-native-coercion-functions\": \"error\",\n\n // Prefer .test() over .match() for boolean regex checks\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md\n \"unicorn/prefer-regexp-test\": \"error\",\n\n // Prefer [...iterable] spread over Array.from(iterable) — concise\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md\n \"unicorn/prefer-spread\": \"error\",\n\n // Prefer relative URLs over absolute same-origin URLs\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md\n \"unicorn/relative-url-style\": \"error\",\n\n // Prefer `node:fs` over `fs` — explicit built-in module protocol\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md\n \"unicorn/prefer-node-protocol\": \"error\",\n\n // Prefer `globalThis` over `window`/`self`/`global` — universal\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md\n \"unicorn/prefer-global-this\": \"error\",\n\n // Prefer omitting unused catch binding — cleaner syntax\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md\n \"unicorn/prefer-optional-catch-binding\": \"error\",\n\n // Prefer `Date.now()` over `new Date().getTime()` — direct and readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md\n \"unicorn/prefer-date-now\": \"error\",\n\n // Enforce consistent `utf-8` casing for text encoding identifiers\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md\n \"unicorn/text-encoding-identifier-case\": \"error\",\n\n // Prefer `import.meta.url`/`import.meta.dirname` over `__filename`/`__dirname`\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md\n \"unicorn/prefer-import-meta-properties\": \"error\",\n\n // OFF: Sequential .push() is natural in codegen and conditional builders.\n // No real performance benefit in modern V8 — purely stylistic.\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md\n \"unicorn/prefer-single-call\": \"off\",\n },\n },\n ]\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Config file overrides — relaxed rules for tool configuration files.\n * Config files (vite, vitest, next, tailwind, postcss) have their own\n * patterns that conflict with strict app-code rules.\n *\n * File patterns: *.config.*, vite.config.*, vitest.config.*, etc.\n */\nexport function configFilesOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/config-files\",\n files: [\n \"**/*.config.{ts,mts,cts,js,mjs,cjs}\",\n \"**/vite.config.*\",\n \"**/vitest.config.*\",\n \"**/next.config.*\",\n \"**/tailwind.config.*\",\n \"**/postcss.config.*\",\n ],\n rules: {\n // Config files often require default exports (Vite, Next.js, Tailwind)\n \"import/no-default-export\": \"off\",\n\n // Config files can have complex configuration objects\n complexity: \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n\n // Config files may use require() for dynamic plugin loading\n \"@typescript-eslint/no-require-imports\": \"off\",\n\n // Config files may log build info to console\n \"no-console\": \"off\",\n\n // Config files often have magic numbers (ports, sizes, timeouts)\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n },\n },\n ]\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Declaration file overrides — minimal rules for `.d.ts` files.\n * Declaration files follow their own patterns (ambient declarations,\n * interface merging, namespaces) that conflict with app-code rules.\n *\n * File pattern: *.d.ts files\n */\nexport function declarationsOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/declarations\",\n files: [\"**/*.d.ts\"],\n rules: {\n // Declaration files often have unused type parameters/variables\n \"@typescript-eslint/no-unused-vars\": \"off\",\n\n // Empty interfaces are valid for declaration merging\n \"@typescript-eslint/no-empty-interface\": \"off\",\n\n // Empty object types are used for extensible interfaces\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n\n // `any` is sometimes necessary in third-party type declarations\n \"@typescript-eslint/no-explicit-any\": \"off\",\n\n // Both `type` and `interface` are valid in declarations\n \"@typescript-eslint/consistent-type-definitions\": \"off\",\n\n // Namespaces are standard in ambient declarations\n \"@typescript-eslint/no-namespace\": \"off\",\n\n // Duplicate imports happen with declaration merging\n \"import/no-duplicates\": \"off\",\n\n // Unused imports are common in re-export declaration files\n \"unused-imports/no-unused-imports\": \"off\",\n\n // ── AI mode rules that don't apply to declaration files ────────\n\n // Declarations inherit return types from the implementation\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n\n // Third-party naming conventions must be followed as-is\n \"@typescript-eslint/naming-convention\": \"off\",\n\n // Abbreviations in third-party types are unavoidable\n \"unicorn/prevent-abbreviations\": \"off\",\n\n // .d.ts filename is dictated by the module it declares\n \"unicorn/filename-case\": \"off\",\n },\n },\n ]\n}\n","import playwrightPlugin from \"eslint-plugin-playwright\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * E2E test overrides — Playwright rules + relaxed strictness for E2E tests.\n *\n * File pattern: *.spec.ts (Playwright convention)\n *\n * @see https://github.com/playwright-community/eslint-plugin-playwright#rules\n */\nexport function e2eOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/e2e\",\n files: [\"**/*.spec.ts\"],\n plugins: {\n playwright: playwrightPlugin,\n },\n rules: {\n // ── Playwright rules ──────────────────────────────────────────\n\n // Every test must contain at least one expect()\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md\n \"playwright/expect-expect\": \"error\",\n\n // Limit describe nesting to 3 levels — keeps tests readable\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/max-nested-describe.md\n \"playwright/max-nested-describe\": [\"error\", { max: 3 }],\n\n // Detect missing await on Playwright async methods — common mistake\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/missing-playwright-await.md\n \"playwright/missing-playwright-await\": \"error\",\n\n // No expect() inside conditionals — tests should be deterministic\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-conditional-expect.md\n \"playwright/no-conditional-expect\": \"error\",\n\n // Warn on conditional logic in tests — tests should be linear\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-conditional-in-test.md\n \"playwright/no-conditional-in-test\": \"warn\",\n\n // Prefer locators over element handles — auto-retry, less flaky\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-element-handle.md\n \"playwright/no-element-handle\": \"error\",\n\n // No page.evaluate with arbitrary code — brittle, hard to debug\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-eval.md\n \"playwright/no-eval\": \"error\",\n\n // No test.only — prevents accidentally skipping tests in CI\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-focused-test.md\n \"playwright/no-focused-test\": \"error\",\n\n // Warn on { force: true } — bypasses visibility/actionability checks\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-force-option.md\n \"playwright/no-force-option\": \"warn\",\n\n // No waitUntil: \"networkidle\" — unreliable, use specific waits\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-networkidle.md\n \"playwright/no-networkidle\": \"error\",\n\n // No page.pause() — debugging artifact, breaks CI\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-page-pause.md\n \"playwright/no-page-pause\": \"error\",\n\n // Warn on test.skip — track disabled tests\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-skipped-test.md\n \"playwright/no-skipped-test\": \"warn\",\n\n // No unnecessary await on non-promise values\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-useless-await.md\n \"playwright/no-useless-await\": \"error\",\n\n // No double-negative assertions: expect(x).not.not...\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-useless-not.md\n \"playwright/no-useless-not\": \"error\",\n\n // Warn on waitForSelector — prefer locators with auto-wait\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-wait-for-selector.md\n \"playwright/no-wait-for-selector\": \"warn\",\n\n // No hardcoded timeouts — use Playwright's built-in waiting\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-wait-for-timeout.md\n \"playwright/no-wait-for-timeout\": \"error\",\n\n // Prefer web-first assertions (toBeVisible, toHaveText) — auto-retry\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-web-first-assertions.md\n \"playwright/prefer-web-first-assertions\": \"error\",\n\n // Validate expect() usage — proper matcher and argument count\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-expect.md\n \"playwright/valid-expect\": \"error\",\n\n // ── Relaxed rules for E2E tests ───────────────────────────────\n // E2E tests are long procedural scripts with many page interactions\n\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n },\n },\n ]\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Script file overrides — relaxed rules for build/dev scripts.\n * Scripts are CLI tools that legitimately use console.log and process.exit.\n *\n * File pattern: scripts dir (*.ts, *.mts, *.js, *.mjs)\n */\nexport function scriptsOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/scripts\",\n files: [\"**/scripts/**/*.{ts,mts,js,mjs}\"],\n rules: {\n // Scripts use console for user-facing output\n \"no-console\": \"off\",\n\n // Scripts use process.exit for clean termination\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-exit.md\n \"node/no-process-exit\": \"off\",\n\n // Scripts can be long (build pipelines, code generators)\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n\n // Scripts are often procedural without explicit return types\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n\n // Scripts legitimately call process.exit()\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md\n \"unicorn/no-process-exit\": \"off\",\n },\n },\n ]\n}\n","import storybookPlugin from \"eslint-plugin-storybook\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Storybook overrides — Storybook best-practice rules for story files.\n *\n * File pattern: *.stories.{ts,tsx}\n *\n * @see https://github.com/storybookjs/eslint-plugin-storybook#supported-rules\n */\nexport function storiesOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/stories\",\n files: [\"**/*.stories.{ts,tsx}\"],\n plugins: {\n storybook: storybookPlugin as Record<string, unknown>,\n },\n rules: {\n // ── Storybook rules ───────────────────────────────────────────\n\n // Await play function interactions — prevents race conditions\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/await-interactions.md\n \"storybook/await-interactions\": \"error\",\n\n // Stories must have a default export (meta) — Storybook requirement\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/default-exports.md\n \"storybook/default-exports\": \"error\",\n\n // Use / for hierarchy separators, not | or . — Storybook 7+ convention\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/hierarchy-separator.md\n \"storybook/hierarchy-separator\": \"error\",\n\n // No redundant story names that match export name — DRY\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-redundant-story-name.md\n \"storybook/no-redundant-story-name\": \"error\",\n\n // No deprecated storiesOf() API — use CSF (Component Story Format)\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-stories-of.md\n \"storybook/no-stories-of\": \"error\",\n\n // Warn if title is in meta — auto-title is preferred in CSF 3\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-title-property-in-meta.md\n \"storybook/no-title-property-in-meta\": \"warn\",\n\n // Story exports should be PascalCase — component naming convention\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/prefer-pascal-case.md\n \"storybook/prefer-pascal-case\": \"error\",\n\n // File must export at least one story — prevents empty story files\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/story-exports.md\n \"storybook/story-exports\": \"error\",\n\n // Use Storybook's expect() instead of Jest/Vitest in play functions\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-expect.md\n \"storybook/use-storybook-expect\": \"error\",\n\n // Use Storybook's Testing Library, not direct import\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-testing-library.md\n \"storybook/use-storybook-testing-library\": \"error\",\n\n // Enforce `satisfies Meta<typeof Component>` on default export — type-safe meta\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/meta-satisfies-type.md\n \"storybook/meta-satisfies-type\": \"error\",\n\n // ── Relaxed rules for stories ─────────────────────────────────\n\n // Stories require default exports (meta object)\n \"import/no-default-export\": \"off\",\n\n // Stories can be long (many variants of a component)\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n },\n },\n ]\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\nimport vitestPlugin from \"@vitest/eslint-plugin\"\nimport testingLibraryPlugin from \"eslint-plugin-testing-library\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Test file overrides — Vitest rules + Testing Library + relaxed strictness.\n *\n * File patterns: *.test.{ts,tsx}, __tests__/*.{ts,tsx}\n *\n * @see https://github.com/vitest-dev/eslint-plugin-vitest#rules\n * @see https://github.com/testing-library/eslint-plugin-testing-library#supported-rules\n */\nexport function testsOverride(): FlatConfigArray {\n const configs: FlatConfigArray = [\n {\n name: \"eslint-config-setup/tests\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n plugins: {\n vitest: vitestPlugin,\n },\n rules: {\n // ── Vitest rules ──────────────────────────────────────────────\n\n // Every test must contain at least one assertion\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md\n \"vitest/expect-expect\": \"error\",\n\n // Prevent duplicate test titles within a describe block\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md\n \"vitest/no-identical-title\": \"error\",\n\n // No it.only / describe.only — prevents accidentally skipping tests in CI\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md\n \"vitest/no-focused-tests\": \"error\",\n\n // Warn on it.skip / describe.skip — track disabled tests\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md\n \"vitest/no-disabled-tests\": \"warn\",\n\n // No duplicate beforeEach/afterEach hooks — merge them\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md\n \"vitest/no-duplicate-hooks\": \"error\",\n\n // Prefer .toBe() over .toEqual() for primitives — clearer intent\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md\n \"vitest/prefer-to-be\": \"error\",\n\n // Prefer .toHaveLength() over .toBe(arr.length) — better errors\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md\n \"vitest/prefer-to-have-length\": \"error\",\n\n // Validate expect() usage — no dangling expect without assertion\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md\n \"vitest/valid-expect\": \"error\",\n\n // Validate test/describe title format — no empty or invalid titles\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md\n \"vitest/valid-title\": \"error\",\n\n // No conditional logic (if/else) inside tests — split into separate tests\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md\n \"vitest/no-conditional-in-test\": \"error\",\n\n // No expect() inside conditional blocks — always assert unconditionally\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md\n \"vitest/no-conditional-expect\": \"error\",\n\n // No standalone expect() outside test blocks — always wrap in it/test\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md\n \"vitest/no-standalone-expect\": \"error\",\n\n // Prefer .toStrictEqual() over .toEqual() — catches undefined vs missing\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md\n \"vitest/prefer-strict-equal\": \"error\",\n\n // Prefer vi.spyOn() over vi.fn() for method mocks — preserves original\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md\n \"vitest/prefer-spy-on\": \"error\",\n\n // Require message argument in toThrow/toThrowError — verify correct error\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md\n \"vitest/require-to-throw-message\": \"error\",\n\n // ── Relaxed rules for tests ───────────────────────────────────\n // Tests are naturally verbose and use patterns banned in prod code\n\n // Tests can be long (setup + many assertions)\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n\n // Tests often need `any` for mocking and type assertions\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unsafe-assignment\": \"off\",\n \"@typescript-eslint/no-unsafe-member-access\": \"off\",\n },\n },\n {\n name: \"eslint-config-setup/tests-testing-library\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n plugins: {\n \"testing-library\": testingLibraryPlugin,\n },\n rules: {\n // ── Testing Library rules ───────────────────────────────────\n\n // Await async events (userEvent.click, etc.) — prevents race conditions\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-events.md\n \"testing-library/await-async-events\": \"error\",\n\n // Await async queries (findBy*) — they return promises\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-queries.md\n \"testing-library/await-async-queries\": \"error\",\n\n // Await async utilities (waitFor, waitForElementToBeRemoved)\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-utils.md\n \"testing-library/await-async-utils\": \"error\",\n\n // Don't await synchronous events — misleading\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-await-sync-events.md\n \"testing-library/no-await-sync-events\": \"error\",\n\n // Don't await synchronous queries (getBy*, queryBy*) — not promises\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-await-sync-queries.md\n \"testing-library/no-await-sync-queries\": \"error\",\n\n // Don't use container.querySelector — use queries instead\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-container.md\n \"testing-library/no-container\": \"error\",\n\n // Warn on debug()/prettyDOM() left in tests — debugging artifacts\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-debugging-utils.md\n \"testing-library/no-debugging-utils\": \"warn\",\n\n // Don't access DOM nodes directly — use queries\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-node-access.md\n \"testing-library/no-node-access\": \"error\",\n\n // Don't call render in beforeEach — call in each test\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-render-in-lifecycle.md\n \"testing-library/no-render-in-lifecycle\": \"error\",\n\n // No unnecessary act() wrappers — TL handles this internally\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-unnecessary-act.md\n \"testing-library/no-unnecessary-act\": \"error\",\n\n // One assertion per waitFor — multiple can mask failures\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-wait-for-multiple-assertions.md\n \"testing-library/no-wait-for-multiple-assertions\": \"error\",\n\n // No side effects in waitFor — only assertions\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-wait-for-side-effects.md\n \"testing-library/no-wait-for-side-effects\": \"error\",\n\n // Prefer findBy* over waitFor + getBy* — built-in combination\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-find-by.md\n \"testing-library/prefer-find-by\": \"error\",\n\n // Use getBy* (throws) for present elements, queryBy* for absent\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-presence-queries.md\n \"testing-library/prefer-presence-queries\": \"error\",\n\n // Use queryBy* for disappearance checks — returns null when gone\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-query-by-disappearance.md\n \"testing-library/prefer-query-by-disappearance\": \"error\",\n\n // Use screen.getBy* over destructured render result — consistent\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-screen-queries.md\n \"testing-library/prefer-screen-queries\": \"error\",\n\n // Name render result consistently (e.g., `const { getByText } = render(...)`)\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/render-result-naming-convention.md\n \"testing-library/render-result-naming-convention\": \"error\",\n },\n }]\n\n\n return configs\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Complexity preset — limits for production code that encourage small,\n * focused functions and aggressive extraction of helper functions.\n * @see https://eslint.org/docs/latest/rules/#suggestions (complexity rules)\n */\nexport function standardComplexity(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/complexity\",\n rules: {\n // Max cyclomatic complexity per function — 10 branches\n // https://eslint.org/docs/latest/rules/complexity\n complexity: [\"error\", 10],\n\n // Max nesting depth — 3 levels\n // https://eslint.org/docs/latest/rules/max-depth\n \"max-depth\": [\"error\", 3],\n\n // Max nested callbacks — 2 levels\n // https://eslint.org/docs/latest/rules/max-nested-callbacks\n \"max-nested-callbacks\": [\"error\", 2],\n\n // Max function parameters — 3 before using options object\n // https://eslint.org/docs/latest/rules/max-params\n \"max-params\": [\"error\", 3],\n\n // Max statements per function — 15\n // https://eslint.org/docs/latest/rules/max-statements\n \"max-statements\": [\"error\", 15],\n\n // Max lines per function — 50 (excluding blanks and comments)\n // https://eslint.org/docs/latest/rules/max-lines-per-function\n \"max-lines-per-function\": [\n \"error\",\n { max: 50, skipBlankLines: true, skipComments: true },\n ],\n\n // Max lines per file — 300 (excluding blanks and comments)\n // https://eslint.org/docs/latest/rules/max-lines\n \"max-lines\": [\n \"error\",\n { max: 300, skipBlankLines: true, skipComments: true },\n ],\n\n // Cognitive complexity — measures how hard code is to understand\n // https://sonarsource.github.io/rspec/#/rspec/S3776/javascript\n \"sonarjs/cognitive-complexity\": [\"error\", 10],\n },\n },\n {\n name: \"eslint-config-setup/complexity-tests-relaxed\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\", \"**/*.spec.ts\"],\n rules: {\n \"max-nested-callbacks\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n },\n },\n ]\n}\n","import oxlintPlugin from \"eslint-plugin-oxlint\"\n\nimport type { ConfigOptions, FlatConfig, FlatConfigArray } from \"../types\"\n\n/**\n * Appends eslint-plugin-oxlint configs that disable all ESLint rules\n * already covered by OxLint. Must be the LAST config in the array.\n *\n * This allows running `oxlint && eslint` where OxLint handles the fast\n * checks and ESLint only runs type-aware and specialty rules.\n */\nexport function oxlintIntegration(opts: ConfigOptions): FlatConfigArray {\n const typedPlugin = oxlintPlugin as unknown as {\n configs: Record<string, FlatConfig>\n }\n\n const configs: FlatConfigArray = [\n {\n name: \"eslint-config-setup/oxlint\",\n ...typedPlugin.configs[\"flat/recommended\"],\n },\n ]\n\n // Add plugin-specific oxlint overrides if those plugins are active\n if (opts.react) {\n configs.push({\n name: \"eslint-config-setup/oxlint-react\",\n ...typedPlugin.configs[\"flat/react\"],\n }, {\n name: \"eslint-config-setup/oxlint-jsx-a11y\",\n ...typedPlugin.configs[\"flat/jsx-a11y\"],\n })\n }\n\n if (opts.node) {\n configs.push({\n name: \"eslint-config-setup/oxlint-node\",\n ...typedPlugin.configs[\"flat/node\"],\n })\n }\n\n // TypeScript and unicorn overlaps\n configs.push({\n name: \"eslint-config-setup/oxlint-typescript\",\n ...typedPlugin.configs[\"flat/typescript\"],\n }, {\n name: \"eslint-config-setup/oxlint-unicorn\",\n ...typedPlugin.configs[\"flat/unicorn\"],\n }, {\n name: \"eslint-config-setup/oxlint-import\",\n ...typedPlugin.configs[\"flat/import\"],\n }, {\n name: \"eslint-config-setup/oxlint-jsdoc\",\n ...typedPlugin.configs[\"flat/jsdoc\"],\n })\n\n return configs\n}\n","import compatPlugin from \"eslint-plugin-compat\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Browser compatibility config — checks that browser APIs are available\n * in the project's browserslist targets. Uses MDN compatibility data.\n *\n * Activated automatically for non-Node projects (when `node: false`).\n * If no browserslist config exists, the default applies:\n * `> 0.5%, last 2 versions, Firefox ESR, not dead`\n *\n * @see https://github.com/amilajack/eslint-plugin-compat\n * @see https://browsersl.ist/\n */\nexport function compatConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/compat\",\n plugins: {\n compat: compatPlugin,\n },\n rules: {\n // Warn when using browser APIs not supported in browserslist targets\n // https://github.com/amilajack/eslint-plugin-compat#usage\n \"compat/compat\": \"warn\",\n },\n },\n ]\n}\n","/* eslint-disable max-statements -- Composition function: sequentially pushes all config blocks. Each push is trivial but there are many configs. */\nimport type { ConfigOptions, FlatConfigArray } from \"../types\"\n\nimport { aiConfig } from \"../configs/ai\"\nimport { baseConfig } from \"../configs/base\"\nimport { compatConfig } from \"../configs/compat\"\nimport { cspellConfig } from \"../configs/cspell\"\nimport { deMorganConfig } from \"../configs/de-morgan\"\nimport { importsConfig } from \"../configs/imports\"\nimport { jsdocConfig } from \"../configs/jsdoc\"\nimport { jsonConfig } from \"../configs/json\"\nimport { markdownConfig } from \"../configs/markdown\"\nimport { nodeConfig } from \"../configs/node\"\nimport { packageJsonAiConfig, packageJsonConfig } from \"../configs/package-json\"\nimport { perfectionistAiConfig, perfectionistConfig } from \"../configs/perfectionist\"\nimport { prettierCompatConfig } from \"../configs/prettier\"\nimport { reactConfig } from \"../configs/react\"\nimport { reactEffectConfig } from \"../configs/react-effect\"\nimport { regexpConfig } from \"../configs/regexp\"\nimport { securityConfig } from \"../configs/security\"\nimport { sonarjsConfig } from \"../configs/sonarjs\"\nimport { typescriptConfig } from \"../configs/typescript\"\nimport { unicornConfig } from \"../configs/unicorn\"\nimport { configFilesOverride } from \"../overrides/config-files\"\nimport { declarationsOverride } from \"../overrides/declarations\"\nimport { e2eOverride } from \"../overrides/e2e\"\nimport { scriptsOverride } from \"../overrides/scripts\"\nimport { storiesOverride } from \"../overrides/stories\"\nimport { testsOverride } from \"../overrides/tests\"\nimport { oxlintIntegration } from \"../oxlint/integration\"\nimport { standardComplexity } from \"../presets/standard\"\n\n/**\n * Composes a full flat config array from the given options.\n * This is the core logic used by the build system to generate configs.\n */\nexport function composeConfig(opts: ConfigOptions): FlatConfigArray {\n const config: FlatConfigArray = []\n\n // 1. Base rules (always)\n config.push(...baseConfig())\n\n // 2. TypeScript (always, uses strictTypeChecked)\n config.push(...typescriptConfig())\n\n // 3. Imports (always)\n config.push(...importsConfig())\n\n // 4. Perfectionist — mechanical sorting (always)\n config.push(...perfectionistConfig())\n\n // 5. Unicorn (always)\n config.push(...unicornConfig())\n\n // 5. Regexp (always)\n config.push(...regexpConfig())\n\n // 6. JSDoc (always)\n config.push(...jsdocConfig())\n\n // 7. CSpell (always)\n config.push(...cspellConfig())\n\n // 8. SonarJS (always)\n config.push(...sonarjsConfig())\n\n // 9. Security (always)\n config.push(...securityConfig())\n\n // 10. De Morgan (always)\n config.push(...deMorganConfig())\n\n // 11. Browser compat (when not a Node.js project)\n if (!opts.node) {\n config.push(...compatConfig())\n }\n\n // 11. Complexity preset (before AI which may override)\n if (!opts.ai) {\n config.push(...standardComplexity())\n }\n\n // 12. Node.js (conditional)\n if (opts.node) {\n config.push(...nodeConfig())\n }\n\n // 13. React (conditional)\n if (opts.react) {\n config.push(...reactConfig())\n config.push(...reactEffectConfig())\n }\n\n // 14. AI mode (conditional — includes its own complexity limits)\n if (opts.ai) {\n config.push(...aiConfig())\n config.push(...perfectionistAiConfig())\n config.push(...packageJsonAiConfig())\n }\n\n // 15. File-pattern overrides (always relevant — no-op if files don't exist)\n config.push(...testsOverride())\n config.push(...e2eOverride())\n config.push(...storiesOverride())\n config.push(...configFilesOverride())\n config.push(...declarationsOverride())\n config.push(...scriptsOverride())\n\n // 16. JSON, Package.json & Markdown (always)\n config.push(...jsonConfig())\n config.push(...packageJsonConfig())\n config.push(...markdownConfig())\n\n // 18. Prettier compat (always last for TS/JS rules)\n config.push(...prettierCompatConfig())\n\n // 19. OxLint (absolute last — disables rules OxLint already covers)\n if (opts.oxlint) {\n config.push(...oxlintIntegration(opts))\n }\n\n return config\n}\n"],"mappings":";AAeO,SAAS,WAA4B;AAC1C,QAAM,UAA2B;AAAA,IAC/B;AAAA,MACE,MAAM;A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/B,SAAO,KAAK,GAAG,qBAAqB,CAAC;AAGrC,MAAI,KAAK,QAAQ;AACf,WAAO,KAAK,GAAG,kBAAkB,IAAI,CAAC;AAAA,EACxC;AAEA,SAAO;AACT;","names":["globals","plugin"]}
1
+ {"version":3,"sources":["../src/configs/ai.ts","../src/configs/base.ts","../src/build/config-builder.ts","../src/configs/cspell.ts","../src/configs/de-morgan.ts","../src/configs/imports.ts","../src/configs/jsdoc.ts","../src/configs/json.ts","../src/configs/markdown.ts","../src/configs/node.ts","../src/configs/package-json.ts","../src/configs/perfectionist.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/react-effect.ts","../src/configs/regexp.ts","../src/configs/security.ts","../src/configs/sonarjs.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/overrides/config-files.ts","../src/overrides/declarations.ts","../src/overrides/e2e.ts","../src/overrides/scripts.ts","../src/overrides/stories.ts","../src/overrides/tests.ts","../src/presets/standard.ts","../src/oxlint/integration.ts","../src/configs/compat.ts","../src/build/compose.ts"],"sourcesContent":["/* eslint-disable max-lines, max-lines-per-function -- Rule definition file: one function returning a long list of rule entries. Not complex, just large. */\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * AI mode rules — strict clean-code rules that are trivial for AI assistants\n * to follow but produce significantly more maintainable code.\n *\n * These rules would traditionally be considered \"too strict\" for humans,\n * but since most code is now AI-generated, they serve as effective\n * guardrails that the AI cannot ignore (unlike documentation).\n *\n * No plugin preset is used — all rules are hand-picked from existing plugins\n * and tightened beyond their defaults for AI-generated code.\n * @see ADR-0006: docs/adr/0006-ai-mode-as-dedicated-flag.md\n */\nexport function aiConfig(): FlatConfigArray {\n const configs: FlatConfigArray = [\n {\n name: \"eslint-config-setup/ai-structural\",\n rules: {\n // ── A. Structural clarity — always explicit, never ambiguous ──\n\n // Require braces for ALL control flow — no ambiguous one-liners\n // https://eslint.org/docs/latest/rules/curly\n curly: [\"error\", \"all\"],\n\n // Disallow else after return — flattens control flow\n // https://eslint.org/docs/latest/rules/no-else-return\n \"no-else-return\": [\"error\", { allowElseIf: false }],\n\n // No nested ternaries — unreadable, use if/else or early return\n // https://eslint.org/docs/latest/rules/no-nested-ternary\n \"no-nested-ternary\": \"error\",\n\n // No ternary when simpler alternatives exist (e.g., || or ??)\n // https://eslint.org/docs/latest/rules/no-unneeded-ternary\n \"no-unneeded-ternary\": \"error\",\n\n // No negated conditions in if/else — flip the branches instead\n // https://eslint.org/docs/latest/rules/no-negated-condition\n \"no-negated-condition\": \"error\",\n\n // No standalone if in else — use else-if instead\n // https://eslint.org/docs/latest/rules/no-lonely-if\n \"no-lonely-if\": \"error\",\n\n // No parameter reassignment — prevents subtle mutation bugs\n // https://eslint.org/docs/latest/rules/no-param-reassign\n \"no-param-reassign\": [\"error\", { props: true }],\n\n // One assignment per statement — prevents `a = b = c` chains\n // https://eslint.org/docs/latest/rules/no-multi-assign\n \"no-multi-assign\": \"error\",\n\n // One variable per declaration — clear and grep-friendly\n // https://eslint.org/docs/latest/rules/one-var\n \"one-var\": [\"error\", \"never\"],\n\n // No implicit type coercion (!!x, +x, \"\" + x) — use explicit Boolean/Number/String\n // https://eslint.org/docs/latest/rules/no-implicit-coercion\n \"no-implicit-coercion\": \"error\",\n\n // Prefer const for all bindings in destructuring when possible\n // https://eslint.org/docs/latest/rules/prefer-const\n \"prefer-const\": [\"error\", { destructuring: \"all\" }],\n\n // Disallow var — block-scoped let/const only\n // https://eslint.org/docs/latest/rules/no-var\n \"no-var\": \"error\",\n\n // Require strict equality (===) — no type coercion\n // https://eslint.org/docs/latest/rules/eqeqeq\n eqeqeq: \"error\",\n\n // Prefer template literals over concatenation — more readable\n // https://eslint.org/docs/latest/rules/prefer-template\n \"prefer-template\": \"error\",\n\n // Require shorthand properties in objects — concise, skip quoted keys\n // https://eslint.org/docs/latest/rules/object-shorthand\n \"object-shorthand\": [\"error\", \"always\", { avoidQuotes: true }],\n\n // Prefer concise arrow body: `() => expr` over `() => { return expr }`\n // https://eslint.org/docs/latest/rules/arrow-body-style\n \"arrow-body-style\": \"error\",\n\n // Prefer arrow functions for callbacks — lexical `this`\n // https://eslint.org/docs/latest/rules/prefer-arrow-callback\n \"prefer-arrow-callback\": [\"error\", { allowNamedFunctions: true }],\n\n // Prefer `x ??= y` over `x = x ?? y` — concise null-coalescing assignment\n // https://eslint.org/docs/latest/rules/logical-assignment-operators\n \"logical-assignment-operators\": [\n \"error\",\n \"always\",\n { enforceForIfStatements: true },\n ],\n\n // No assignment in return statements — separate mutation from return\n // https://eslint.org/docs/latest/rules/no-return-assign\n \"no-return-assign\": [\"error\", \"always\"],\n\n // One statement per line — scannable, diff-friendly\n // https://eslint.org/docs/latest/rules/max-statements-per-line\n \"max-statements-per-line\": [\"error\", { max: 1 }],\n\n // Prefer `x ** 2` over `Math.pow(x, 2)` — modern operator syntax\n // https://eslint.org/docs/latest/rules/prefer-exponentiation-operator\n \"prefer-exponentiation-operator\": \"error\",\n\n // Require named capture groups in regex — self-documenting patterns\n // https://eslint.org/docs/latest/rules/prefer-named-capture-group\n \"prefer-named-capture-group\": \"error\",\n\n // Require Unicode-aware regex (`u` or `v` flag) — correct string handling\n // https://eslint.org/docs/latest/rules/require-unicode-regexp\n \"require-unicode-regexp\": \"error\",\n\n // ── B. Magic numbers & constants — no unexplained code ────────\n\n // No magic numbers — extract to named constants (allows -1, 0, 1, 2)\n // https://typescript-eslint.io/rules/no-magic-numbers\n \"@typescript-eslint/no-magic-numbers\": [\n \"error\",\n {\n ignore: [-1, 0, 1, 2],\n ignoreArrayIndexes: true,\n ignoreDefaultValues: true,\n enforceConst: true,\n ignoreClassFieldInitialValues: true,\n ignoreEnums: true,\n ignoreNumericLiteralTypes: true,\n ignoreReadonlyClassProperties: true,\n ignoreTypeIndexes: true,\n },\n ],\n\n // No duplicate strings (threshold 3) — extract to constant\n // https://sonarsource.github.io/rspec/#/rspec/S1192/javascript\n \"sonarjs/no-duplicate-string\": [\"error\", { threshold: 3 }],\n\n // Flag TODO/FIXME/HACK comments — technical debt tracker\n // https://eslint.org/docs/latest/rules/no-warning-comments\n \"no-warning-comments\": \"warn\",\n\n // ── F. Async/Promise hygiene ──────────────────────────────────\n\n // No await inside loops — use Promise.all() for parallel execution\n // https://eslint.org/docs/latest/rules/no-await-in-loop\n \"no-await-in-loop\": \"error\",\n\n // Disallow returning values from Promise executors — use resolve/reject\n // https://eslint.org/docs/latest/rules/no-promise-executor-return\n \"no-promise-executor-return\": \"error\",\n\n // Every Promise must be awaited, returned, or voided — prevents silent failures\n // https://typescript-eslint.io/rules/no-floating-promises\n \"@typescript-eslint/no-floating-promises\": [\n \"error\",\n { checkThenables: true, ignoreVoid: true },\n ],\n },\n },\n {\n name: \"eslint-config-setup/ai-typescript\",\n rules: {\n // ── C. TypeScript strictness — explicit types, safe patterns ──\n\n // Require explicit return types — self-documenting function signatures\n // https://typescript-eslint.io/rules/explicit-function-return-type\n \"@typescript-eslint/explicit-function-return-type\": [\n \"error\",\n {\n allowExpressions: true,\n allowTypedFunctionExpressions: true,\n allowHigherOrderFunctions: true,\n allowIIFEs: true,\n },\n ],\n\n // Enforce consistent naming: camelCase for values, PascalCase for types,\n // is/has/can/should/will/did prefix for boolean variables\n // https://typescript-eslint.io/rules/naming-convention\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: [\n \"variable\",\n \"function\",\n \"classProperty\",\n \"objectLiteralProperty\",\n \"parameterProperty\",\n \"classMethod\",\n \"objectLiteralMethod\",\n \"typeMethod\",\n \"accessor\",\n ],\n format: [\"strictCamelCase\"],\n leadingUnderscore: \"allowSingleOrDouble\",\n trailingUnderscore: \"allow\",\n filter: { regex: \"[- ]\", match: false },\n },\n {\n selector: \"typeLike\",\n format: [\"StrictPascalCase\"],\n },\n {\n // No \"I\" prefix on interfaces — use descriptive names (XO convention)\n selector: \"interface\",\n format: [\"StrictPascalCase\"],\n custom: { regex: \"^I[A-Z]\", match: false },\n },\n {\n // Type parameters: single uppercase letter (T) or PascalCase (TResult)\n selector: \"typeParameter\",\n format: [\"PascalCase\"],\n custom: { regex: \"^(T([A-Z][a-zA-Z]*)?|[A-Z])$\", match: true },\n },\n {\n selector: \"variable\",\n types: [\"boolean\"],\n format: [\"StrictPascalCase\"],\n prefix: [\"is\", \"has\", \"can\", \"should\", \"will\", \"did\"],\n },\n {\n selector: [\"classProperty\", \"objectLiteralProperty\"],\n format: null,\n modifiers: [\"requiresQuotes\"],\n },\n ],\n\n // Enforce `import type { T }` — types are erased at compile time\n // https://typescript-eslint.io/rules/consistent-type-imports\n \"@typescript-eslint/consistent-type-imports\": [\n \"error\",\n { fixStyle: \"inline-type-imports\" },\n ],\n\n // Enforce `export type { T }` — matches import convention\n // https://typescript-eslint.io/rules/consistent-type-exports\n \"@typescript-eslint/consistent-type-exports\": [\n \"error\",\n { fixMixedExportsWithInlineTypeSpecifier: true },\n ],\n\n // Disallow `any` type — auto-fix to `unknown` for type safety\n // https://typescript-eslint.io/rules/no-explicit-any\n \"@typescript-eslint/no-explicit-any\": [\"error\", { fixToUnknown: true }],\n\n // Prefer readonly for unmodified class properties — signals immutability\n // https://typescript-eslint.io/rules/prefer-readonly\n \"@typescript-eslint/prefer-readonly\": \"error\",\n\n // Functions returning promises must be async — consistent async patterns\n // https://typescript-eslint.io/rules/promise-function-async\n \"@typescript-eslint/promise-function-async\": \"error\",\n\n // Exhaustive switch statements — no missing cases, no unnecessary defaults\n // https://typescript-eslint.io/rules/switch-exhaustiveness-check\n \"@typescript-eslint/switch-exhaustiveness-check\": [\n \"error\",\n {\n allowDefaultCaseForExhaustiveSwitch: false,\n requireDefaultForNonUnion: true,\n },\n ],\n\n // Disallow unsafe type assertions (as Type) — use type guards instead\n // https://typescript-eslint.io/rules/no-unsafe-type-assertion\n \"@typescript-eslint/no-unsafe-type-assertion\": \"error\",\n\n // Require comparator for Array.sort() — prevents locale-dependent string sort\n // https://typescript-eslint.io/rules/require-array-sort-compare\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n { ignoreStringArrays: true },\n ],\n\n // Require explicit `public`/`private`/`protected` on class members\n // https://typescript-eslint.io/rules/explicit-member-accessibility\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Enforce property style for method signatures — prevents bivariance issues\n // https://typescript-eslint.io/rules/method-signature-style\n \"@typescript-eslint/method-signature-style\": [\"error\", \"property\"],\n\n // Require explicit values for enum members — prevents accidental shifts on reorder\n // https://typescript-eslint.io/rules/prefer-enum-initializers\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Prefer `type` over `interface` — consistent, supports unions/intersections\n // https://typescript-eslint.io/rules/consistent-type-definitions\n \"@typescript-eslint/consistent-type-definitions\": [\"error\", \"type\"],\n\n // Enforce consistent member ordering in classes and interfaces\n // Static → fields by visibility → constructors → methods by visibility (XO convention)\n // https://typescript-eslint.io/rules/member-ordering\n \"@typescript-eslint/member-ordering\": [\n \"warn\",\n {\n default: [\n // Index signature\n \"signature\",\n \"call-signature\",\n\n // Static\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"#private-static-field\",\n \"static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"#private-static-method\",\n \"static-method\",\n\n // Fields\n \"public-decorated-field\",\n \"protected-decorated-field\",\n \"private-decorated-field\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"#private-instance-field\",\n \"public-abstract-field\",\n \"protected-abstract-field\",\n \"field\",\n\n // Constructors\n \"public-constructor\",\n \"protected-constructor\",\n \"private-constructor\",\n \"constructor\",\n\n // Getters/Setters\n [\"public-get\", \"public-set\"],\n [\"protected-get\", \"protected-set\"],\n [\"private-get\", \"private-set\"],\n [\"#private-get\", \"#private-set\"],\n\n // Methods\n \"public-decorated-method\",\n \"protected-decorated-method\",\n \"private-decorated-method\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n \"#private-instance-method\",\n \"public-abstract-method\",\n \"protected-abstract-method\",\n \"method\",\n ],\n },\n ],\n },\n },\n {\n name: \"eslint-config-setup/ai-unicorn\",\n rules: {\n // ── D. Unicorn — modern, idiomatic patterns ───────────────────\n\n // Move functions to the smallest scope where they're used\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md\n \"unicorn/consistent-function-scoping\": \"error\",\n\n // Forbid blanket `/* eslint-disable */` — must specify rules\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n\n // No .forEach() — use for-of loop (breakable, async-safe)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md\n \"unicorn/no-array-for-each\": \"error\",\n\n // No .reduce() — explicit loops are more readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md\n \"unicorn/no-array-reduce\": \"error\",\n\n // Prefer simple ternary over if/else for single-line assignments\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n\n // Prefer switch for 3+ conditions on same variable — structured\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md\n \"unicorn/prefer-switch\": [\"error\", { minimumCases: 3 }],\n\n // Enforce camelCase or PascalCase filenames — consistent project structure\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md\n \"unicorn/filename-case\": [\n \"error\",\n { cases: { camelCase: true, pascalCase: true } },\n ],\n\n // Prevent abbreviated variable names (e → error, btn → button) — readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md\n \"unicorn/prevent-abbreviations\": \"error\",\n\n // Detect useless switch cases that fall through to the next case\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md\n \"unicorn/no-useless-switch-case\": \"error\",\n\n // Enforce correct Error subclassing (name, constructor pattern)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md\n \"unicorn/custom-error-definition\": \"error\",\n\n // Prefer default parameters over manual reassignment\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md\n \"unicorn/prefer-default-parameters\": \"error\",\n\n // Prefer `a || b` over `a ? a : b` — simpler when equivalent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md\n \"unicorn/prefer-logical-operator-over-ternary\": \"error\",\n\n // Prefer Math.min()/Math.max() over ternaries for clamping\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md\n \"unicorn/prefer-math-min-max\": \"error\",\n\n // Prefer Set#size over converting to array — direct and correct\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md\n \"unicorn/prefer-set-size\": \"error\",\n\n // Enforce explicit `.length > 0` / `.length === 0` checks\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md\n \"unicorn/explicit-length-check\": \"error\",\n\n // Prefer for-of over C-style for loops — no off-by-one risk\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md\n \"unicorn/no-for-loop\": \"error\",\n\n // Enforce braces in switch cases — prevents scope leakage\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md\n \"unicorn/switch-case-braces\": \"error\",\n\n // Combine multiple .push() calls into one — cleaner\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-push-push.md\n \"unicorn/no-array-push-push\": \"error\",\n },\n },\n {\n name: \"eslint-config-setup/ai-sonarjs\",\n rules: {\n // ── E. SonarJS — code quality and duplicates ──────────────────\n\n // Detect copy-pasted functions — extract to shared helper\n // https://sonarsource.github.io/rspec/#/rspec/S4144/javascript\n \"sonarjs/no-identical-functions\": \"error\",\n\n // Merge nested if-statements that can be combined — reduce nesting\n // https://sonarsource.github.io/rspec/#/rspec/S1066/javascript\n \"sonarjs/no-collapsible-if\": \"error\",\n\n // Simplify redundant boolean expressions\n // https://sonarsource.github.io/rspec/#/rspec/S1125/javascript\n \"sonarjs/no-redundant-boolean\": \"error\",\n\n // Detect collections that are populated but never read — dead code\n // https://sonarsource.github.io/rspec/#/rspec/S4030/javascript\n \"sonarjs/no-unused-collection\": \"error\",\n\n // Return value directly instead of storing in temp variable\n // https://sonarsource.github.io/rspec/#/rspec/S1488/javascript\n \"sonarjs/prefer-immediate-return\": \"error\",\n\n // Simplify boolean return patterns\n // https://sonarsource.github.io/rspec/#/rspec/S1126/javascript\n \"sonarjs/prefer-single-boolean-return\": \"error\",\n\n // Detect identical sub-expressions on both sides of operator\n // https://sonarsource.github.io/rspec/#/rspec/S1764/javascript\n \"sonarjs/no-identical-expressions\": \"error\",\n\n // Simplify negated boolean checks — `!a !== b` → `a === b`\n // https://sonarsource.github.io/rspec/#/rspec/S1940/javascript\n \"sonarjs/no-inverted-boolean-check\": \"error\",\n\n // Disallow nested switch statements — extract to function\n // https://sonarsource.github.io/rspec/#/rspec/S1821/javascript\n \"sonarjs/no-nested-switch\": \"error\",\n\n // Disallow nested template literals — unreadable\n // https://sonarsource.github.io/rspec/#/rspec/S4624/javascript\n \"sonarjs/no-nested-template-literals\": \"error\",\n\n // Limit union type size — too many members signals missing abstraction\n // https://sonarsource.github.io/rspec/#/rspec/S4622/javascript\n \"sonarjs/max-union-size\": [\"error\", { threshold: 5 }],\n\n // Prefer type predicates for type narrowing — safer than assertions\n // https://sonarsource.github.io/rspec/#/rspec/S4322/javascript\n \"sonarjs/prefer-type-guard\": \"error\",\n\n // Public static fields should be readonly — prevents accidental mutation\n // https://sonarsource.github.io/rspec/#/rspec/S1444/javascript\n \"sonarjs/public-static-readonly\": \"error\",\n },\n },\n {\n name: \"eslint-config-setup/ai-regexp\",\n rules: {\n // Prefer lookarounds over capturing groups used only for context\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-lookaround.html\n \"regexp/prefer-lookaround\": \"error\",\n\n // Prefer named backreferences — \\k<quote> over \\1\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-backreference.html\n \"regexp/prefer-named-backreference\": \"error\",\n\n // Prefer named replacement — $<name> over $1\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-replacement.html\n \"regexp/prefer-named-replacement\": \"error\",\n\n // Prefer quantifier shorthand — a{3} over aaa\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-quantifier.html\n \"regexp/prefer-quantifier\": \"error\",\n\n // Prefer match.groups.name over match[1] — consistent named groups usage\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-result-array-groups.html\n \"regexp/prefer-result-array-groups\": \"error\",\n\n // Require v flag (unicode sets) over u flag — stricter ES2024 superset\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-sets-regexp.html\n \"regexp/require-unicode-sets-regexp\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-jsdoc\",\n rules: {\n // Prevent comments that just repeat the name — `/** The name */ name: string`\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md\n \"jsdoc/informative-docs\": \"error\",\n\n // AI should document parameters and return values completely\n \"jsdoc/require-param\": \"error\",\n \"jsdoc/require-returns\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-node\",\n rules: {\n // Warn when using Node.js builtins not available in the target version\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/node-builtins.md\n \"node/no-unsupported-features/node-builtins\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-react\",\n rules: {\n // Max one component per file — clear module boundaries\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"error\",\n\n // No inline function creation in JSX props — extract to variable or useCallback\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": \"error\",\n\n // No click handlers on static elements without role — use semantic HTML\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-static-element-interactions.md\n \"jsx-a11y/no-static-element-interactions\": \"error\",\n\n // No event handlers on non-interactive elements — use button/link instead\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-interactions.md\n \"jsx-a11y/no-noninteractive-element-interactions\": \"error\",\n\n // Interactive elements (role=\"button\") must be focusable\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/interactive-supports-focus.md\n \"jsx-a11y/interactive-supports-focus\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-complexity\",\n rules: {\n // Cyclomatic complexity limit — max branches per function\n // https://eslint.org/docs/latest/rules/complexity\n complexity: [\"error\", 10],\n\n // Max nesting depth — deep nesting signals need for extraction\n // https://eslint.org/docs/latest/rules/max-depth\n \"max-depth\": [\"error\", 3],\n\n // Max nested callbacks — prevents callback hell\n // https://eslint.org/docs/latest/rules/max-nested-callbacks\n \"max-nested-callbacks\": [\"error\", 2],\n\n // Max function parameters — many params suggest a config object\n // https://eslint.org/docs/latest/rules/max-params\n \"max-params\": [\"error\", 3],\n\n // Max statements per function — keeps functions focused\n // https://eslint.org/docs/latest/rules/max-statements\n \"max-statements\": [\"error\", 15],\n\n // Max lines per function — encourages extraction of helpers\n // https://eslint.org/docs/latest/rules/max-lines-per-function\n \"max-lines-per-function\": [\n \"error\",\n {\n max: 50,\n skipBlankLines: true,\n skipComments: true,\n },\n ],\n\n // Max lines per file — encourages modular file organization\n // https://eslint.org/docs/latest/rules/max-lines\n \"max-lines\": [\n \"error\",\n {\n max: 300,\n skipBlankLines: true,\n skipComments: true,\n },\n ],\n\n // Cognitive complexity — measures how hard a function is to understand\n // https://sonarsource.github.io/rspec/#/rspec/S3776/javascript\n \"sonarjs/cognitive-complexity\": [\"error\", 10],\n },\n }, {\n name: \"eslint-config-setup/ai-tests-strict\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n rules: {\n // Every test must be inside a describe block — organized test suites\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md\n \"vitest/require-top-level-describe\": \"error\",\n\n // Hooks (beforeEach, afterEach) must be at the top of describe — predictable setup\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md\n \"vitest/prefer-hooks-on-top\": \"error\",\n },\n }, {\n name: \"eslint-config-setup/ai-tests-relaxed\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n rules: {\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"max-nested-callbacks\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"sonarjs/no-duplicate-string\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n \"@typescript-eslint/naming-convention\": \"off\",\n \"unicorn/prevent-abbreviations\": \"off\",\n },\n }, {\n name: \"eslint-config-setup/ai-e2e-relaxed\",\n files: [\"**/*.spec.ts\"],\n rules: {\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n },\n }, {\n name: \"eslint-config-setup/ai-config-relaxed\",\n files: [\n \"**/*.config.{ts,mts,cts,js,mjs,cjs}\",\n \"**/vite.config.*\",\n \"**/vitest.config.*\",\n \"**/next.config.*\",\n ],\n rules: {\n complexity: \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n \"@typescript-eslint/naming-convention\": \"off\",\n },\n }, {\n name: \"eslint-config-setup/ai-declarations-relaxed\",\n files: [\"**/*.d.ts\"],\n rules: {\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n \"@typescript-eslint/naming-convention\": \"off\",\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n \"unicorn/prevent-abbreviations\": \"off\",\n \"unicorn/filename-case\": \"off\",\n },\n }]\n\n // ── G. Regex — self-documenting, modern patterns ──────────────────\n\n // ── H. JSDoc — prevent meaningless AI-generated docs ──────────────\n\n // ── J. React — stricter component patterns ───────────────────────\n\n // ── AI mode relaxations for E2E test files ────────────────────────\n // E2E tests are long procedural scripts with page interactions\n\n return configs\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\nimport eslint from \"@eslint/js\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * Base ESLint config — extends `eslint.configs.recommended` with additional\n * best-practice rules for error prevention and modern JS style.\n *\n * Rules with TypeScript equivalents (no-implied-eval, dot-notation, etc.)\n * are NOT included here — they are handled by the typescript-eslint presets.\n *\n * Preset: `@eslint/js` recommended\n * @see https://eslint.org/docs/latest/rules/\n */\nexport function baseConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/base\",\n presets: [eslint.configs.recommended],\n })\n // ── Error prevention ──────────────────────────────────────────\n\n // Enforce getter/setter pairs — prevents incomplete property accessors\n // https://eslint.org/docs/latest/rules/accessor-pairs\n .addRule(\"accessor-pairs\", [\"error\", { enforceForClassMembers: true }])\n\n // Require return in array method callbacks — prevents silent bugs in .map/.filter\n // https://eslint.org/docs/latest/rules/array-callback-return\n .addRule(\"array-callback-return\", [\"error\", { allowImplicit: true }])\n\n // Disallow returning values from constructors — constructors should not return\n // https://eslint.org/docs/latest/rules/no-constructor-return\n .addRule(\"no-constructor-return\", \"error\")\n\n // Disallow returning values from Promise executors — use resolve/reject instead\n // https://eslint.org/docs/latest/rules/no-promise-executor-return\n .addRule(\"no-promise-executor-return\", \"error\")\n\n // Disallow self-comparison (x === x) — always a bug, use Number.isNaN instead\n // https://eslint.org/docs/latest/rules/no-self-compare\n .addRule(\"no-self-compare\", \"error\")\n\n // Detect template literal syntax in regular strings — likely a forgotten backtick\n // https://eslint.org/docs/latest/rules/no-template-curly-in-string\n .addRule(\"no-template-curly-in-string\", \"error\")\n\n // Detect loops that can only iterate once — logic error indicator\n // https://eslint.org/docs/latest/rules/no-unreachable-loop\n .addRule(\"no-unreachable-loop\", \"error\")\n\n // Detect race conditions with shared variables in async code\n // https://eslint.org/docs/latest/rules/require-atomic-updates\n .addRule(\"require-atomic-updates\", \"error\")\n\n // Detect loop conditions that are never modified — likely a bug\n // https://eslint.org/docs/latest/rules/no-unmodified-loop-condition\n .addRule(\"no-unmodified-loop-condition\", \"error\")\n\n // Keep getter/setter pairs adjacent — easier to find related logic\n // https://eslint.org/docs/latest/rules/grouped-accessor-pairs\n .addRule(\"grouped-accessor-pairs\", [\"error\", \"getBeforeSet\"])\n\n // Remove pointless renames — `import { x as x }` is always wrong\n // https://eslint.org/docs/latest/rules/no-useless-rename\n .addRule(\"no-useless-rename\", \"error\")\n\n // Remove unnecessary computed keys — `{ [\"key\"]: value }` → `{ key: value }`\n // https://eslint.org/docs/latest/rules/no-useless-computed-key\n .addRule(\"no-useless-computed-key\", \"error\")\n\n // ── Dangerous patterns ────────────────────────────────────────\n\n // Forbid eval() — code injection risk, never safe\n // https://eslint.org/docs/latest/rules/no-eval\n .addRule(\"no-eval\", \"error\")\n\n // Forbid alert/confirm/prompt — not for production code\n // https://eslint.org/docs/latest/rules/no-alert\n .addRule(\"no-alert\", \"error\")\n\n // Forbid arguments.caller and arguments.callee — deprecated, breaks optimizations\n // https://eslint.org/docs/latest/rules/no-caller\n .addRule(\"no-caller\", \"error\")\n\n // Forbid extending native prototypes — breaks other code\n // https://eslint.org/docs/latest/rules/no-extend-native\n .addRule(\"no-extend-native\", \"error\")\n\n // Forbid new Function() — eval in disguise\n // https://eslint.org/docs/latest/rules/no-new-func\n .addRule(\"no-new-func\", \"error\")\n\n // Forbid new String/Number/Boolean — use primitives\n // https://eslint.org/docs/latest/rules/no-new-wrappers\n .addRule(\"no-new-wrappers\", \"error\")\n\n // Forbid new Object() — use {} literal instead\n // https://eslint.org/docs/latest/rules/no-object-constructor\n .addRule(\"no-object-constructor\", \"error\")\n\n // Forbid __proto__ — use Object.getPrototypeOf instead\n // https://eslint.org/docs/latest/rules/no-proto\n .addRule(\"no-proto\", \"error\")\n\n // Forbid __iterator__ — use Symbol.iterator instead\n // https://eslint.org/docs/latest/rules/no-iterator\n .addRule(\"no-iterator\", \"error\")\n\n // Forbid javascript: URLs — XSS vector\n // https://eslint.org/docs/latest/rules/no-script-url\n .addRule(\"no-script-url\", \"error\")\n\n // Forbid octal escape sequences — use unicode escapes instead\n // https://eslint.org/docs/latest/rules/no-octal-escape\n .addRule(\"no-octal-escape\", \"error\")\n\n // ── Code quality ──────────────────────────────────────────────\n\n // Require strict equality, but allow == null (checks both null and undefined)\n // https://eslint.org/docs/latest/rules/eqeqeq\n .addRule(\"eqeqeq\", [\"error\", \"smart\"])\n\n // Require hasOwnProperty check in for-in — prevents prototype chain iteration\n // https://eslint.org/docs/latest/rules/guard-for-in\n .addRule(\"guard-for-in\", \"error\")\n\n // Require default case to be last in switch — consistent structure\n // https://eslint.org/docs/latest/rules/default-case-last\n .addRule(\"default-case-last\", \"error\")\n\n // Require radix parameter in parseInt — prevents octal interpretation\n // https://eslint.org/docs/latest/rules/radix\n .addRule(\"radix\", \"error\")\n\n // Forbid Yoda conditions (if (\"red\" === color)) — unnatural to read\n // https://eslint.org/docs/latest/rules/yoda\n .addRule(\"yoda\", \"error\")\n\n // Forbid comma operator — confusing, usually a mistake\n // https://eslint.org/docs/latest/rules/no-sequences\n .addRule(\"no-sequences\", \"error\")\n\n // Forbid new for side effects — use function call instead\n // https://eslint.org/docs/latest/rules/no-new\n .addRule(\"no-new\", \"error\")\n\n // Forbid labels (except in rare loop cases) — goto-like control flow\n // https://eslint.org/docs/latest/rules/no-labels\n .addRule(\"no-labels\", \"error\")\n\n // Remove unnecessary .bind() calls — no effect without this\n // https://eslint.org/docs/latest/rules/no-extra-bind\n .addRule(\"no-extra-bind\", \"error\")\n\n // Remove unnecessary block statements — confusing nesting\n // https://eslint.org/docs/latest/rules/no-lone-blocks\n .addRule(\"no-lone-blocks\", \"error\")\n\n // Remove unnecessary .call()/.apply() — just call the function\n // https://eslint.org/docs/latest/rules/no-useless-call\n .addRule(\"no-useless-call\", \"error\")\n\n // Remove unnecessary string concatenation — \"a\" + \"b\" → \"ab\"\n // https://eslint.org/docs/latest/rules/no-useless-concat\n .addRule(\"no-useless-concat\", \"error\")\n\n // Remove unnecessary return statements — let function end naturally\n // https://eslint.org/docs/latest/rules/no-useless-return\n .addRule(\"no-useless-return\", \"error\")\n\n // Forbid multiline strings via backslash — use template literals\n // https://eslint.org/docs/latest/rules/no-multi-str\n .addRule(\"no-multi-str\", \"error\")\n\n // Prefer /regex/ over new RegExp(\"regex\") for static patterns\n // https://eslint.org/docs/latest/rules/prefer-regex-literals\n .addRule(\"prefer-regex-literals\", [\n \"error\",\n { disallowRedundantWrapping: true },\n ])\n\n // ── Modern JS style ───────────────────────────────────────────\n\n // Disallow var — use let/const for block scoping\n // https://eslint.org/docs/latest/rules/no-var\n .addRule(\"no-var\", \"error\")\n\n // Prefer const for variables never reassigned — only when ALL destructured vars are const\n // https://eslint.org/docs/latest/rules/prefer-const\n .addRule(\"prefer-const\", [\"error\", { destructuring: \"all\" }])\n\n // Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call()\n // https://eslint.org/docs/latest/rules/prefer-object-has-own\n .addRule(\"prefer-object-has-own\", \"error\")\n\n // Prefer { ...obj } over Object.assign({}, obj) — more readable\n // https://eslint.org/docs/latest/rules/prefer-object-spread\n .addRule(\"prefer-object-spread\", \"error\")\n\n // Prefer rest parameters over `arguments` object — typed and array-like\n // https://eslint.org/docs/latest/rules/prefer-rest-params\n .addRule(\"prefer-rest-params\", \"error\")\n\n // Prefer spread syntax over Function.prototype.apply() — cleaner syntax\n // https://eslint.org/docs/latest/rules/prefer-spread\n .addRule(\"prefer-spread\", \"error\")\n\n // Prefer template literals over string concatenation — more readable\n // https://eslint.org/docs/latest/rules/prefer-template\n .addRule(\"prefer-template\", \"error\")\n\n // Require description for Symbol() — aids debugging\n // https://eslint.org/docs/latest/rules/symbol-description\n .addRule(\"symbol-description\", \"error\")\n\n .build()\n}\n","/* eslint-disable max-lines-per-function, max-statements, max-depth, complexity, sonarjs/cognitive-complexity -- Config builder: merges presets, rules, and overrides in a single pass. Inherent complexity from ESLint's config format. */\nimport type { Linter } from \"eslint\"\n\nimport type { FlatConfig, FlatConfigArray } from \"../types\"\n\ntype RuleValue = Linter.RuleEntry\n\ninterface ConfigBuilderOptions {\n name: string\n presets?: FlatConfig[]\n passthrough?: FlatConfigArray\n plugins?: FlatConfig[\"plugins\"]\n languageOptions?: FlatConfig[\"languageOptions\"]\n settings?: FlatConfig[\"settings\"]\n files?: FlatConfig[\"files\"]\n ignores?: FlatConfig[\"ignores\"]\n}\n\ninterface ConfigBuilder {\n /** Override an existing preset rule. THROWS if rule not in preset. */\n overrideRule(name: string, value: RuleValue): ConfigBuilder\n /** Add a new rule. THROWS if rule already exists in preset or was already added. */\n addRule(name: string, value: RuleValue): ConfigBuilder\n /** Disable an existing preset rule (set to \"off\"). THROWS if not found. */\n disableRule(name: string): ConfigBuilder\n /** Remove a rule entirely from output. THROWS if not found. */\n removeRule(name: string): ConfigBuilder\n /** Add an extra output block with specific files and rules (not validated against preset). */\n addFileOverride(\n name: string,\n files: string[],\n rules: Partial<Linter.RulesRecord>,\n ): ConfigBuilder\n /** Materialize into FlatConfigArray. */\n build(): FlatConfigArray\n}\n\nexport function createConfig(options: ConfigBuilderOptions): ConfigBuilder {\n // Expand presets: merge all rules from preset objects into one map\n const presetRules = new Map<string, RuleValue>()\n const presetPlugins: NonNullable<FlatConfig[\"plugins\"]> = {}\n\n if (options.presets) {\n for (const preset of options.presets) {\n if (preset.plugins) {\n Object.assign(presetPlugins, preset.plugins)\n }\n if (preset.rules) {\n for (const [name, value] of Object.entries(preset.rules)) {\n if (value !== undefined) {\n presetRules.set(name, value)\n }\n }\n }\n }\n }\n\n // Mutable builder state\n const overrides = new Map<string, RuleValue>()\n const additions = new Map<string, RuleValue>()\n const disabled = new Set<string>()\n const removed = new Set<string>()\n const fileOverrides: Array<{\n name: string\n files: string[]\n rules: Partial<Linter.RulesRecord>\n }> = []\n\n const builder: ConfigBuilder = {\n overrideRule(name: string, value: RuleValue): ConfigBuilder {\n if (!presetRules.has(name)) {\n throw new Error(\n `overrideRule(\"${name}\"): rule not found in preset. ` +\n `Cannot override a rule that doesn't exist in the preset.`,\n )\n }\n overrides.set(name, value)\n return builder\n },\n\n addRule(name: string, value: RuleValue): ConfigBuilder {\n if (presetRules.has(name)) {\n throw new Error(\n `addRule(\"${name}\"): rule already exists in preset. ` +\n `Use overrideRule() to change its value, or removeRule() to drop it.`,\n )\n }\n if (additions.has(name)) {\n throw new Error(\n `addRule(\"${name}\"): rule was already added. ` +\n `Each rule can only be added once.`,\n )\n }\n additions.set(name, value)\n return builder\n },\n\n disableRule(name: string): ConfigBuilder {\n if (!presetRules.has(name) && !additions.has(name)) {\n throw new Error(\n `disableRule(\"${name}\"): rule not found in preset or additions. ` +\n `Cannot disable a rule that doesn't exist.`,\n )\n }\n disabled.add(name)\n return builder\n },\n\n removeRule(name: string): ConfigBuilder {\n if (!presetRules.has(name) && !additions.has(name)) {\n throw new Error(\n `removeRule(\"${name}\"): rule not found in preset or additions. ` +\n `Cannot remove a rule that doesn't exist.`,\n )\n }\n removed.add(name)\n return builder\n },\n\n addFileOverride(\n name: string,\n files: string[],\n rules: Partial<Linter.RulesRecord>,\n ): ConfigBuilder {\n fileOverrides.push({ name, files, rules })\n return builder\n },\n\n build(): FlatConfigArray {\n // Start with all preset rules\n const rules: Linter.RulesRecord = {}\n for (const [name, value] of presetRules) {\n if (!removed.has(name)) {\n rules[name] = value\n }\n }\n\n // Apply overrides\n for (const [name, value] of overrides) {\n if (!removed.has(name)) {\n rules[name] = value\n }\n }\n\n // Apply additions\n for (const [name, value] of additions) {\n if (!removed.has(name)) {\n rules[name] = value\n }\n }\n\n // Apply disabled\n for (const name of disabled) {\n if (!removed.has(name)) {\n rules[name] = \"off\"\n }\n }\n\n // Build the main config block\n const mainBlock: FlatConfig = {\n name: options.name,\n rules,\n }\n\n // Merge plugins from preset + user\n const mergedPlugins = { ...presetPlugins, ...options.plugins }\n if (Object.keys(mergedPlugins).length > 0) {\n mainBlock.plugins = mergedPlugins\n }\n\n if (options.languageOptions) {\n mainBlock.languageOptions = options.languageOptions\n }\n if (options.settings) {\n mainBlock.settings = options.settings\n }\n if (options.files) {\n mainBlock.files = options.files\n }\n if (options.ignores) {\n mainBlock.ignores = options.ignores\n }\n\n const result: FlatConfigArray = []\n\n // Passthrough blocks first\n if (options.passthrough) {\n result.push(...options.passthrough)\n }\n\n // Main validated block\n result.push(mainBlock)\n\n // File override blocks\n for (const fo of fileOverrides) {\n result.push({\n name: fo.name,\n files: fo.files,\n rules: fo.rules as Linter.RulesRecord,\n })\n }\n\n return result\n },\n }\n\n return builder\n}\n","import cspellPlugin from \"@cspell/eslint-plugin\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * CSpell config — spell checking for identifiers and comments.\n * Catches typos in variable names, function names, and documentation.\n * Severity is \"warn\" because dictionary misses are common for domain terms.\n *\n * @see https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-eslint-plugin#readme\n */\nexport function cspellConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/cspell\",\n plugins: {\n \"@cspell\": cspellPlugin,\n },\n rules: {\n // Check spelling in identifiers and comments — catches typos in API names\n // Strings are excluded (may contain user-facing text, URLs, etc.)\n // Auto-fix disabled — spelling corrections need human review\n // https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-eslint-plugin#rules\n \"@cspell/spellchecker\": [\n \"warn\",\n {\n checkComments: true,\n checkIdentifiers: true,\n checkStrings: false,\n autoFix: false,\n },\n ],\n },\n },\n ]\n}\n","import deMorganPlugin from \"eslint-plugin-de-morgan\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * De Morgan config — enforces De Morgan's laws on negated boolean expressions.\n * Both rules are auto-fixable: !(A && B) → !A || !B and !(A || B) → !A && !B.\n *\n * Complements sonarjs/no-inverted-boolean-check (which handles simple !(a === b) → a !== b)\n * by targeting compound expressions with && and ||.\n *\n * @see https://github.com/azat-io/eslint-plugin-de-morgan\n */\nexport function deMorganConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/de-morgan\",\n plugins: {\n \"de-morgan\": deMorganPlugin,\n },\n rules: {\n // Transform !(A && B) → !A || !B — more readable negated conjunction\n // https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md\n \"de-morgan/no-negated-conjunction\": \"error\",\n\n // Transform !(A || B) → !A && !B — more readable negated disjunction\n // https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md\n \"de-morgan/no-negated-disjunction\": \"error\",\n },\n },\n ]\n}\n","import importXPlugin from \"eslint-plugin-import-x\"\nimport unusedImportsPlugin from \"eslint-plugin-unused-imports\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Import/export config — two plugins with clear separation of concerns:\n * - `import-x` handles import **validation** (cycles, duplicates, etc.)\n * - `unused-imports` handles **removal** of unused imports (auto-fixable)\n *\n * Import/export **ordering** is handled by perfectionist (see perfectionist.ts).\n *\n * @see https://github.com/un-ts/eslint-plugin-import-x\n * @see https://github.com/sweepline/eslint-plugin-unused-imports\n */\nexport function importsConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/imports\",\n plugins: {\n \"import\": importXPlugin as Record<string, unknown>,\n \"unused-imports\": unusedImportsPlugin,\n },\n rules: {\n // ── Validation (import-x) ────────────────────────────────────\n\n // Merge duplicate import paths into one statement — reduces noise\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": [\"error\", { \"prefer-inline\": true }],\n\n // Forbid a module from importing itself — always a bug\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-self-import.md\n \"import/no-self-import\": \"error\",\n\n // Detect circular dependencies — limited to depth 3 for performance\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-cycle.md\n \"import/no-cycle\": [\"error\", { maxDepth: 3 }],\n\n // Remove unnecessary path segments (e.g., ./foo/../foo → ./foo)\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md\n \"import/no-useless-path-segments\": \"error\",\n\n // Forbid mutable export bindings — prevents shared mutable state\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Imports must come before other statements — consistent module structure\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/first.md\n \"import/first\": \"error\",\n\n // Require blank line after import block — visual separation\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md\n \"import/newline-after-import\": \"error\",\n\n // Detect `import Foo from './Foo'` when Foo is also a named export — likely wrong\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\n\n // Detect `Foo.bar` when `bar` is a named export — use `import { bar }` instead\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // Detect empty `import {} from 'foo'` — leftover after refactoring\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n\n // Forbid absolute file paths in imports — not portable across machines\n // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // ── Disabled: ordering handled by perfectionist ────────────────\n\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/order.md\n \"import/order\": \"off\",\n // https://github.com/un-ts/eslint-plugin-import/blob/master/docs/rules/sort-imports.md\n \"import/sort-imports\": \"off\",\n\n // ── Unused import removal ─────────────────────────────────────\n\n // Auto-remove unused imports — keeps imports clean (auto-fixable)\n // https://github.com/sweepline/eslint-plugin-unused-imports#usage\n \"unused-imports/no-unused-imports\": \"error\",\n },\n },\n ]\n}\n","import jsdocPlugin from \"eslint-plugin-jsdoc\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * JSDoc config — validates existing JSDoc annotations without requiring them.\n *\n * Preset: `flat/recommended-typescript-error` — all recommended JSDoc rules\n * adapted for TypeScript (types are in TS, not JSDoc).\n *\n * Overrides:\n * - `require-jsdoc` OFF — we validate existing JSDoc, we don't mandate it\n * - param/return descriptions downgraded to warn — helpful but not blocking\n * @see https://github.com/gajus/eslint-plugin-jsdoc#rules\n */\nexport function jsdocConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/jsdoc\",\n presets: [jsdocPlugin.configs[\"flat/recommended-typescript-error\"]],\n })\n // OFF: Don't require JSDoc on everything — only validate what exists\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md\n .overrideRule(\"jsdoc/require-jsdoc\", \"off\")\n\n // OFF: Too strict for normal usage — requiring @param/@returns on every\n // documented function adds noise. Enabled in AI mode where completeness matters.\n .overrideRule(\"jsdoc/require-param\", \"off\")\n .overrideRule(\"jsdoc/require-returns\", \"off\")\n .overrideRule(\"jsdoc/require-yields\", \"off\")\n\n // Warn if @param descriptions are missing — helpful but not blocking\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md\n .overrideRule(\"jsdoc/require-param-description\", \"warn\")\n\n // Warn if @returns description is missing — helpful but not blocking\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md\n .overrideRule(\"jsdoc/require-returns-description\", \"warn\")\n\n // Override preset's typed option — use plain error without options\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md\n .overrideRule(\"jsdoc/check-tag-names\", \"error\")\n\n // Enable detection of references to undefined types in JSDoc (off in preset)\n // https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md\n .overrideRule(\"jsdoc/no-undefined-types\", \"error\")\n\n // OFF: Allow blank lines between description and tags — keeps JSDoc readable\n // The preset enforces no blank lines before tags, but visual separation helps.\n .overrideRule(\"jsdoc/tag-lines\", \"off\")\n\n .build()\n}\n","import type { ESLint } from \"eslint\"\n\nimport jsonPlugin from \"@eslint/json\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nconst plugin = jsonPlugin as unknown as ESLint.Plugin\n\n/**\n * JSON/JSONC config — native JSON linting using the official `@eslint/json` plugin.\n * Two blocks: strict JSON for most files, JSONC (with comments) for tsconfig etc.\n *\n * @see https://github.com/eslint/json#rules\n */\nexport function jsonConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/json\",\n files: [\"**/*.json\"],\n ignores: [\"**/package-lock.json\"],\n language: \"json/json\",\n plugins: {\n json: plugin,\n },\n rules: {\n // Detect duplicate keys in JSON — last-write-wins is confusing\n // https://github.com/eslint/json#rules\n \"json/no-duplicate-keys\": \"error\",\n\n // Detect empty string keys — likely a mistake\n // https://github.com/eslint/json#rules\n \"json/no-empty-keys\": \"error\",\n\n // Detect unsafe values (NaN, Infinity, lone surrogates) — invalid JSON\n // https://github.com/eslint/json#rules\n \"json/no-unsafe-values\": \"error\",\n\n // Detect unnormalized Unicode keys — prevents invisible key mismatches\n // https://github.com/eslint/json#rules\n \"json/no-unnormalized-keys\": \"error\",\n },\n },\n {\n name: \"eslint-config-setup/jsonc\",\n files: [\n \"**/tsconfig.json\",\n \"**/tsconfig.*.json\",\n \"**/.vscode/*.json\",\n \"**/turbo.json\",\n ],\n language: \"json/jsonc\",\n plugins: {\n json: plugin,\n },\n rules: {\n // Detect duplicate keys in JSONC — same rationale as JSON\n // https://github.com/eslint/json#rules\n \"json/no-duplicate-keys\": \"error\",\n\n // Detect empty string keys — likely a mistake\n // https://github.com/eslint/json#rules\n \"json/no-empty-keys\": \"error\",\n\n // Detect unsafe values (NaN, Infinity, lone surrogates) — invalid JSON\n // https://github.com/eslint/json#rules\n \"json/no-unsafe-values\": \"error\",\n\n // Detect unnormalized Unicode keys — prevents invisible key mismatches\n // https://github.com/eslint/json#rules\n \"json/no-unnormalized-keys\": \"error\",\n },\n },\n ]\n}\n","import * as mdxPlugin from \"eslint-plugin-mdx\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Markdown & MDX config — lints code blocks inside Markdown and MDX files\n * using eslint-plugin-mdx. Code examples in docs get the same ESLint rules\n * as your source code. Covers both `.md` and `.mdx` files.\n *\n * Markdown structure linting (headings, links, etc.) is intentionally left\n * to dedicated tools like markdownlint.\n *\n * @see https://github.com/mdx-js/eslint-mdx\n * @see https://github.com/DavidAnson/markdownlint-cli2 (recommended for Markdown structure linting)\n */\nexport function markdownConfig(): FlatConfigArray {\n return [\n // ── MDX / Markdown parsing ─────────────────────────────────────\n {\n ...mdxPlugin.flat,\n processor: mdxPlugin.createRemarkProcessor({\n lintCodeBlocks: true,\n languageMapper: {},\n }),\n },\n\n // ── Code block linting ─────────────────────────────────────────\n // Applies ESLint rules to fenced code blocks extracted from .md/.mdx.\n // Relaxes rules that don't apply to incomplete code snippets.\n {\n ...mdxPlugin.flatCodeBlocks,\n rules: {\n ...mdxPlugin.flatCodeBlocks.rules,\n // Snippets don't need trailing newlines\n \"eol-last\": \"off\",\n // Variables may be defined elsewhere\n \"no-undef\": \"off\",\n // Snippets often show standalone expressions\n \"no-unused-expressions\": \"off\",\n // Variables are often declared for demonstration\n \"no-unused-vars\": \"off\",\n // Padding is irrelevant in snippets\n \"padded-blocks\": \"off\",\n // Strict mode is irrelevant in snippets\n strict: \"off\",\n // BOM is irrelevant in snippets\n \"unicode-bom\": \"off\",\n },\n },\n ]\n}\n","import nodePlugin from \"eslint-plugin-n\"\nimport globals from \"globals\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Node.js config — rules for server-side JavaScript/TypeScript.\n * Hand-picked subset of eslint-plugin-n. We don't use the full preset because\n * module resolution rules (`no-missing-import`, `no-unpublished-import`) are\n * handled better by TypeScript.\n *\n * @see https://github.com/eslint-community/eslint-plugin-n#-rules\n */\nexport function nodeConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/node\",\n languageOptions: {\n globals: {\n ...globals.node,\n },\n },\n plugins: {\n node: nodePlugin,\n },\n rules: {\n // Detect usage of deprecated Node.js APIs (fs.exists, url.parse, etc.)\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-deprecated-api.md\n \"node/no-deprecated-api\": \"error\",\n\n // Prevent `module.exports = ...` assignment in ES modules\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-exports-assign.md\n \"node/no-exports-assign\": \"error\",\n\n // OFF: TypeScript resolves imports — this rule has false positives\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-missing-import.md\n \"node/no-missing-import\": \"off\",\n\n // OFF: TypeScript resolves requires — this rule has false positives\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-missing-require.md\n \"node/no-missing-require\": \"off\",\n\n // Warn on process.exit() — prefer throwing errors for clean shutdown\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-exit.md\n \"node/no-process-exit\": \"warn\",\n\n // OFF: Too many false positives with monorepos and devDependencies\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unpublished-import.md\n \"node/no-unpublished-import\": \"off\",\n\n // Validate hashbang lines — correct syntax, Unix linebreaks, only in entry files\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/hashbang.md\n \"node/hashbang\": \"error\",\n\n // Detect `__dirname + '/foo'` — use path.join() instead (breaks on Windows)\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-path-concat.md\n \"node/no-path-concat\": \"error\",\n\n // ── Prefer global builtins ────────────────────────────────────\n\n // Use global Buffer instead of require('buffer').Buffer\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/buffer.md\n \"node/prefer-global/buffer\": [\"error\", \"always\"],\n\n // Use global console — always available in Node.js\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/console.md\n \"node/prefer-global/console\": [\"error\", \"always\"],\n\n // Use global process — always available in Node.js\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/process.md\n \"node/prefer-global/process\": [\"error\", \"always\"],\n\n // Use global URL — available since Node.js 10\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/url.md\n \"node/prefer-global/url\": [\"error\", \"always\"],\n\n // Use global URLSearchParams — available since Node.js 10\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-global/url-search-params.md\n \"node/prefer-global/url-search-params\": [\"error\", \"always\"],\n\n // ── Prefer promise-based APIs ─────────────────────────────────\n\n // Use dns.promises instead of callback-based dns — modern async\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-promises/dns.md\n \"node/prefer-promises/dns\": \"error\",\n\n // Use fs.promises instead of callback-based fs — modern async\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-promises/fs.md\n \"node/prefer-promises/fs\": \"error\",\n },\n },\n ]\n}\n","import { configs as packageJsonConfigs } from \"eslint-plugin-package-json\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Package.json config — semantic validation of package.json files.\n *\n * Uses the recommended preset from eslint-plugin-package-json which includes:\n * - All valid-* rules (only fire on malformed existing fields, never on missing)\n * - Conservative require-* rules with ignorePrivate: true by default\n * - Quality rules (no-empty-fields, unique-dependencies, etc.)\n *\n * Sorting/ordering rules are off by default — enabled only in AI mode.\n *\n * @see https://github.com/JoshuaKGoldberg/eslint-plugin-package-json\n */\nexport function packageJsonConfig(): FlatConfigArray {\n const recommended = packageJsonConfigs.recommended\n\n return [\n {\n ...recommended,\n name: \"eslint-config-setup/package-json\",\n },\n ]\n}\n\n/**\n * Package.json AI config — enables ordering and sorting rules.\n * Only active in AI mode where deterministic structure is enforced.\n */\nexport function packageJsonAiConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/package-json-ai\",\n files: [\"**/package.json\"],\n rules: {\n // Enforce consistent property ordering in package.json\n // https://github.com/JoshuaKGoldberg/eslint-plugin-package-json\n \"package-json/order-properties\": \"error\",\n\n // Sort dependencies, scripts, exports, etc. alphabetically\n // https://github.com/JoshuaKGoldberg/eslint-plugin-package-json\n \"package-json/sort-collections\": \"error\",\n },\n },\n ]\n}\n","import perfectionistPlugin from \"eslint-plugin-perfectionist\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Perfectionist config — deterministic sorting of code elements.\n *\n * Sorts everything Prettier doesn't: imports, exports, union types,\n * object keys, interface members, etc. Especially valuable for\n * AI-generated code where ordering is arbitrary.\n *\n * Replaces `simple-import-sort` — perfectionist handles everything\n * simple-import-sort does, plus TypeScript path alias recognition\n * and named import sorting.\n *\n * Core philosophy: `partitionByNewLine: true` globally — semantic\n * grouping via blank lines is preserved, within groups natural sort.\n *\n * @see https://perfectionist.dev\n */\n\n/**\n * Mechanical sorting rules — always active.\n * These have no semantic dimension: the order of imports, named exports,\n * or union type members carries no meaning.\n */\nexport function perfectionistConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/perfectionist\",\n plugins: {\n perfectionist: perfectionistPlugin,\n },\n settings: {\n perfectionist: {\n type: \"natural\",\n order: \"asc\",\n partitionByNewLine: true,\n },\n },\n rules: {\n // Auto-sort import statements — deterministic ordering regardless of input\n // Replaces simple-import-sort/imports\n // https://perfectionist.dev/rules/sort-imports\n \"perfectionist/sort-imports\": [\n \"error\",\n {\n partitionByNewLine: false,\n },\n ],\n\n // Sort specifiers inside `import { a, b, c }` — deterministic\n // https://perfectionist.dev/rules/sort-named-imports\n \"perfectionist/sort-named-imports\": \"error\",\n\n // Sort specifiers inside `export { a, b, c }` — deterministic\n // https://perfectionist.dev/rules/sort-named-exports\n \"perfectionist/sort-named-exports\": \"error\",\n\n // Auto-sort export statements — deterministic ordering\n // Replaces simple-import-sort/exports\n // https://perfectionist.dev/rules/sort-exports\n \"perfectionist/sort-exports\": \"error\",\n\n // Sort union type members — `number | string` has no semantic order\n // https://perfectionist.dev/rules/sort-union-types\n \"perfectionist/sort-union-types\": \"error\",\n\n // Sort intersection type members — `A & B` has no semantic order\n // https://perfectionist.dev/rules/sort-intersection-types\n \"perfectionist/sort-intersection-types\": \"error\",\n },\n },\n ]\n}\n\n/**\n * Structural sorting rules — AI mode only.\n * These sort code elements that *could* have semantic ordering\n * (e.g., object keys grouped by concern). Enforcing alphabetical\n * order here is a trade-off: consistency over intent. Worth it\n * for AI-generated code where \"intent\" is often random.\n */\nexport function perfectionistAiConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/perfectionist-ai\",\n rules: {\n // Sort interface members — consistent shape definitions\n // https://perfectionist.dev/rules/sort-interfaces\n \"perfectionist/sort-interfaces\": \"error\",\n\n // Sort object type members — consistent type definitions\n // https://perfectionist.dev/rules/sort-object-types\n \"perfectionist/sort-object-types\": \"error\",\n\n // Sort enum members — consistent enum definitions\n // https://perfectionist.dev/rules/sort-enums\n \"perfectionist/sort-enums\": \"error\",\n\n // Sort JSX props — consistent component usage\n // https://perfectionist.dev/rules/sort-jsx-props\n \"perfectionist/sort-jsx-props\": \"error\",\n\n // Sort object keys — consistent object literals\n // https://perfectionist.dev/rules/sort-objects\n \"perfectionist/sort-objects\": \"error\",\n\n // Sort class members — consistent class structure\n // https://perfectionist.dev/rules/sort-classes\n \"perfectionist/sort-classes\": \"error\",\n\n // Sort switch cases — consistent case ordering\n // https://perfectionist.dev/rules/sort-switch-case\n \"perfectionist/sort-switch-case\": \"error\",\n\n // Sort Map entries — consistent Map initialization\n // https://perfectionist.dev/rules/sort-maps\n \"perfectionist/sort-maps\": \"error\",\n\n // Sort Set entries — consistent Set initialization\n // https://perfectionist.dev/rules/sort-sets\n \"perfectionist/sort-sets\": \"error\",\n\n // Sort array.includes() members — consistent membership checks\n // https://perfectionist.dev/rules/sort-array-includes\n \"perfectionist/sort-array-includes\": \"error\",\n },\n },\n ]\n}\n","import prettierConfig from \"eslint-config-prettier\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * Prettier compat config — disables all ESLint rules that conflict with Prettier.\n * Must be the last config block (before OxLint if enabled).\n *\n * Preset: eslint-config-prettier (turns off ~30 formatting rules)\n * @see https://github.com/prettier/eslint-config-prettier#readme\n */\nexport function prettierCompatConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/prettier\",\n presets: [prettierConfig],\n }).build()\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\n// @ts-expect-error -- no type declarations available\nimport jsxA11yPlugin from \"eslint-plugin-jsx-a11y\"\nimport reactPlugin from \"eslint-plugin-react\"\nimport reactHooksPlugin from \"eslint-plugin-react-hooks\"\nimport reactRefreshPlugin from \"eslint-plugin-react-refresh\"\nimport globals from \"globals\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * React config — React 19+, Hooks (incl. Compiler), and JSX accessibility.\n *\n * We hand-pick rules instead of using plugin presets because:\n * - `eslint-plugin-react`'s recommended preset includes `react-in-jsx-scope` which\n * is unnecessary since React 17 JSX transform\n * - We want explicit control over each rule and its severity\n * - jsx-a11y has no flat config preset yet\n *\n * Since React Compiler v1.0, compiler rules are included in eslint-plugin-react-hooks\n * (>= 7.0.0). The standalone eslint-plugin-react-compiler is deprecated.\n *\n * @see https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules\n * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks\n * @see https://github.com/ArnaudBarre/eslint-plugin-react-refresh\n * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#supported-rules\n */\nexport function reactConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/react\",\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n plugins: {\n react: reactPlugin,\n \"react-hooks\": reactHooksPlugin as Record<string, unknown>,\n \"react-refresh\": reactRefreshPlugin,\n \"jsx-a11y\": jsxA11yPlugin as Record<string, unknown>,\n },\n settings: {\n react: {\n version: \"detect\",\n },\n },\n rules: {\n // ── React core ────────────────────────────────────────────────\n\n // Prevent unsafe target=\"_blank\" links — requires rel=\"noreferrer\"\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": \"error\",\n\n // Prevent usage of undefined JSX components — catches typos\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // OFF: Not needed with React 17+ automatic JSX transform\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": \"off\",\n\n // OFF: Not needed with React 17+ automatic JSX transform\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": \"off\",\n\n // Warn on dangerouslySetInnerHTML — XSS risk, should be reviewed\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Prevent usage of deprecated React APIs — stay current\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": \"error\",\n\n // Prevent direct mutation of this.state — use setState instead\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent unknown DOM properties (e.g., class → className)\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Prevent unstable nested component definitions — causes remounts\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md\n \"react/no-unstable-nested-components\": \"error\",\n\n // Prevent passing children as a prop — use JSX children syntax instead\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Enforce self-closing tags for components without children — <Foo />\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Prevent void DOM elements (br, img, hr) from having children\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n // OFF: TypeScript handles prop validation\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": \"off\",\n\n // Require key prop in iterators — including fragment shorthand\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": [\"error\", { checkFragmentShorthand: true }],\n\n // Prevent comments from being inserted as text nodes in JSX\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // Prevent duplicate props — always a bug\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": \"error\",\n\n // Remove unnecessary JSX fragments — <>{x}</> → {x}\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": [\"error\", { allowExpressions: true }],\n\n // Enforce PascalCase for component names — React convention\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": \"error\",\n\n // Prefer <Foo active /> over <Foo active={true} /> — concise\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\"],\n\n // Prevent unnecessary string curly braces: title={\"foo\"} → title=\"foo\"\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\n \"error\",\n { props: \"never\", children: \"never\" },\n ],\n\n // Enforce function declarations for named components, arrows for unnamed\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"function-declaration\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Enforce destructured useState naming: const [foo, setFoo] = useState()\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md\n \"react/hook-use-state\": \"error\",\n\n // Require sandbox attribute on iframes — security best practice\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md\n \"react/iframe-missing-sandbox\": \"error\",\n\n // Prevent using array index as key — breaks reconciliation on reorder\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Prevent object/array literals as default props — creates new reference every render\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md\n \"react/no-object-type-as-default-prop\": \"error\",\n\n // Prevent `{count && <Foo />}` — renders \"0\" when count is 0\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md\n \"react/jsx-no-leaked-render\": \"error\",\n\n // Prevent inline object creation in context providers — causes re-renders\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n // Prevent `this.setState({ count: this.state.count + 1 })` — race condition\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Detect state properties that are set but never read — dead code\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md\n \"react/no-unused-state\": \"error\",\n\n // Prevent `style=\"color: red\"` — must be an object in React\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // No string refs — deprecated since React 16.3, use useRef\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Require explicit type on <button> — prevents unintended form submits\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md\n \"react/button-has-type\": \"error\",\n\n // Prevent dangerouslySetInnerHTML + children at the same time — conflict\n // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // ── React Hooks ───────────────────────────────────────────────\n\n // Enforce Rules of Hooks — hooks must be called at the top level\n // https://react.dev/reference/rules/rules-of-hooks\n \"react-hooks/rules-of-hooks\": \"error\",\n\n // Verify dependency arrays in useEffect/useMemo/useCallback\n // https://react.dev/reference/react/useEffect#specifying-reactive-dependencies\n \"react-hooks/exhaustive-deps\": \"error\",\n\n // ── React Refresh (Fast Refresh / HMR) ────────────────────────\n\n // Ensure components are exported in a way that supports Fast Refresh.\n // Mixed exports (component + constants) break HMR state preservation.\n // allowConstantExport: Vite handles constant exports without breaking HMR.\n // https://github.com/ArnaudBarre/eslint-plugin-react-refresh\n \"react-refresh/only-export-components\": [\n \"warn\",\n { allowConstantExport: true },\n ],\n\n // ── JSX Accessibility (a11y) ──────────────────────────────────\n\n // Require alt text on img, area, input[type=\"image\"], object\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/alt-text.md\n \"jsx-a11y/alt-text\": \"error\",\n\n // Require anchor content — empty links are inaccessible\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-has-content.md\n \"jsx-a11y/anchor-has-content\": \"error\",\n\n // Require valid href on anchors — no `#` or `javascript:` void\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-is-valid.md\n \"jsx-a11y/anchor-is-valid\": \"error\",\n\n // Active descendant elements must be focusable (tabindex)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-activedescendant-has-tabindex.md\n \"jsx-a11y/aria-activedescendant-has-tabindex\": \"error\",\n\n // Validate aria-* attributes exist — catches typos in ARIA props\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-props.md\n \"jsx-a11y/aria-props\": \"error\",\n\n // Validate aria-* values match their type (boolean, token, etc.)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-proptypes.md\n \"jsx-a11y/aria-proptypes\": \"error\",\n\n // Validate role attribute values — catches invalid role names\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-role.md\n \"jsx-a11y/aria-role\": \"error\",\n\n // Prevent ARIA on elements that don't support it (meta, script, style)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-unsupported-elements.md\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n\n // Click handlers must have keyboard equivalent — keyboard accessibility\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/click-events-have-key-events.md\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n\n // Heading elements must have content — screen readers need it\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md\n \"jsx-a11y/heading-has-content\": \"error\",\n\n // Require lang attribute on <html> — language identification\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/html-has-lang.md\n \"jsx-a11y/html-has-lang\": \"error\",\n\n // Prevent redundant alt text like \"image of...\" — screen readers add this\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md\n \"jsx-a11y/img-redundant-alt\": \"error\",\n\n // Every form label must be associated with a control\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md\n \"jsx-a11y/label-has-associated-control\": \"error\",\n\n // Mouse event handlers must have keyboard equivalents\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/mouse-events-have-key-events.md\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n\n // No accessKey attribute — inconsistent shortcuts confuse users\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-access-key.md\n \"jsx-a11y/no-access-key\": \"error\",\n\n // No autofocus attribute (except non-DOM) — disorienting for screen readers\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-autofocus.md\n \"jsx-a11y/no-autofocus\": [\"error\", { ignoreNonDOM: true }],\n\n // No <marquee>/<blink> — deprecated distracting elements\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-distracting-elements.md\n \"jsx-a11y/no-distracting-elements\": \"error\",\n\n // No redundant ARIA roles (e.g., <button role=\"button\">)\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-redundant-roles.md\n \"jsx-a11y/no-redundant-roles\": \"error\",\n\n // Role elements must have all required ARIA props\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-has-required-aria-props.md\n \"jsx-a11y/role-has-required-aria-props\": \"error\",\n\n // Don't use unsupported ARIA attributes for a given role\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-supports-aria-props.md\n \"jsx-a11y/role-supports-aria-props\": \"error\",\n\n // scope attribute only on <th> elements — HTML specification\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/scope.md\n \"jsx-a11y/scope\": \"error\",\n\n // No positive tabIndex values — disrupts natural tab order\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/tabindex-no-positive.md\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n\n // Validate lang attribute values — e.g. \"de\" ok, \"deutsch\" not\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/lang.md\n \"jsx-a11y/lang\": \"error\",\n\n // Validate autocomplete attribute values on form elements\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/autocomplete-valid.md\n \"jsx-a11y/autocomplete-valid\": \"error\",\n },\n },\n ]\n}\n","import reactEffectPlugin from \"eslint-plugin-react-you-might-not-need-an-effect\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * React effect config — catches unnecessary useEffect anti-patterns.\n * Codifies the patterns from the React docs article \"You Might Not Need an Effect\".\n *\n * Complements react-hooks (which checks dependency arrays are correct) by\n * detecting when the entire effect is unnecessary — derived state, chained\n * state updates, prop-triggered resets, and more.\n *\n * @see https://react.dev/learn/you-might-not-need-an-effect\n * @see https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n */\nexport function reactEffectConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/react-effect\",\n plugins: {\n \"react-you-might-not-need-an-effect\": reactEffectPlugin,\n },\n rules: {\n // Disallow storing derived state in an effect — compute at render time or useMemo\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-derived-state\": \"error\",\n\n // Disallow chaining state updates in an effect — update together instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-chain-state-updates\": \"error\",\n\n // Disallow using state + effect as an event handler — call logic directly\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-event-handler\": \"error\",\n\n // Disallow adjusting state when a prop changes — compute inline during render\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change\": \"warn\",\n\n // Disallow resetting all state when a prop changes — use the key prop instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change\": \"error\",\n\n // Disallow passing live state to parent via effect — lift state up instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-pass-live-state-to-parent\": \"error\",\n\n // Disallow passing fetched data to parent via effect — fetch in parent instead\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-pass-data-to-parent\": \"error\",\n\n // Disallow initializing state in an effect — pass initial value to useState\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-initialize-state\": \"error\",\n\n // Disallow empty effects — dead code, remove them\n // https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect\n \"react-you-might-not-need-an-effect/no-empty-effect\": \"error\",\n },\n },\n ]\n}\n","import { configs as regexpConfigs } from \"eslint-plugin-regexp\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * RegExp config — uses the full `flat/recommended` preset from eslint-plugin-regexp.\n * Validates regular expression syntax, detects common mistakes, and suggests\n * simpler patterns.\n *\n * Preset: eslint-plugin-regexp flat/recommended (all rules at their default severity)\n * @see https://ota-meshi.github.io/eslint-plugin-regexp/\n * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/\n */\nexport function regexpConfig(): FlatConfigArray {\n return createConfig({\n name: \"eslint-config-setup/regexp\",\n presets: [regexpConfigs[\"flat/recommended\"]],\n })\n\n // ── Beyond recommended ──────────────────────────────────────────\n\n // Disallow invisible control characters in regex — almost always a paste artifact\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-control-character.html\n .addRule(\"regexp/no-control-character\", \"error\")\n\n // Disallow ambiguous octal escapes — use \\x01 or named backreference instead\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-octal.html\n .addRule(\"regexp/no-octal\", \"error\")\n\n // Disallow standalone backslashes — /\\a/ silently ignores the backslash\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-standalone-backslash.html\n .addRule(\"regexp/no-standalone-backslash\", \"error\")\n\n // Detect patterns with quadratic move behavior — subtle ReDoS variant\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-move.html\n .addRule(\"regexp/no-super-linear-move\", \"error\")\n\n // Require $$ for literal dollar signs in replacement strings — prevents bugs\n // https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-escape-replacement-dollar-char.html\n .addRule(\"regexp/prefer-escape-replacement-dollar-char\", \"error\")\n\n .build()\n}\n","import type { ESLint } from \"eslint\"\n\n// @ts-expect-error -- no type declarations available\nimport securityPlugin from \"eslint-plugin-security\"\n\nimport type { FlatConfigArray } from \"../types\"\n\nconst plugin = securityPlugin as unknown as ESLint.Plugin\n\n/**\n * Security config — Node.js security patterns from eslint-plugin-security.\n * We manually select rules instead of using the preset because the preset\n * enables `detect-object-injection` which produces too many false positives.\n *\n * @see https://github.com/eslint-community/eslint-plugin-security#rules\n */\nexport function securityConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/security\",\n plugins: {\n security: plugin,\n },\n rules: {\n // ── Errors: dangerous patterns that should never appear ────────\n\n // Detect Buffer read/write without noAssert — can read out of bounds\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-buffer-noassert.md\n \"security/detect-buffer-noassert\": \"error\",\n\n // Detect child_process usage — potential command injection vector\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-child-process.md\n \"security/detect-child-process\": \"error\",\n\n // Detect disabled mustache escaping — XSS risk in templates\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-disable-mustache-escape.md\n \"security/detect-disable-mustache-escape\": \"error\",\n\n // Detect eval() with variable arguments — code injection risk\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-eval-with-expression.md\n \"security/detect-eval-with-expression\": \"error\",\n\n // Detect new Buffer(n) — deprecated, use Buffer.alloc() instead\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-new-buffer.md\n \"security/detect-new-buffer\": \"error\",\n\n // Detect CSRF middleware placed after method-override — CSRF bypass\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-no-csrf-before-method-override.md\n \"security/detect-no-csrf-before-method-override\": \"error\",\n\n // Detect Math.random() / pseudoRandomBytes — not cryptographically secure\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-pseudoRandomBytes.md\n \"security/detect-pseudoRandomBytes\": \"error\",\n\n // Detect regexes vulnerable to ReDoS (catastrophic backtracking)\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-unsafe-regex.md\n \"security/detect-unsafe-regex\": \"error\",\n\n // ── Warnings: worth reviewing but may have legitimate uses ─────\n\n // Detect dynamic fs paths — potential path traversal (many false positives)\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-fs-filename.md\n \"security/detect-non-literal-fs-filename\": \"warn\",\n\n // Detect dynamic regex construction — potential ReDoS\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-regexp.md\n \"security/detect-non-literal-regexp\": \"warn\",\n\n // Detect dynamic require() — potential code injection\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-non-literal-require.md\n \"security/detect-non-literal-require\": \"warn\",\n\n // Detect string comparisons that may leak timing info — side-channel risk\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-possible-timing-attacks.md\n \"security/detect-possible-timing-attacks\": \"warn\",\n\n // Detect Unicode bidirectional control characters — source code trojan attack\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-bidi-characters.md\n \"security/detect-bidi-characters\": \"error\",\n\n // ── Disabled: too many false positives ────────────────────────\n\n // Flags all bracket notation (obj[key]) — nearly every codebase triggers this\n // https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/detect-object-injection.md\n \"security/detect-object-injection\": \"off\",\n },\n },\n ]\n}\n","import sonarjsPlugin from \"eslint-plugin-sonarjs\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * SonarJS config — code-quality rules from SonarSource.\n * Hand-picked subset focused on bug detection and code smells.\n * We don't use the full preset because many SonarJS rules overlap with\n * typescript-eslint and unicorn.\n *\n * @see https://github.com/SonarSource/SonarJS/tree/master/packages/jsts/src/rules#readme\n */\nexport function sonarjsConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/sonarjs\",\n plugins: {\n sonarjs: sonarjsPlugin as Record<string, unknown>,\n },\n rules: {\n // Detect copy-pasted functions — extract to shared helper instead\n // https://sonarsource.github.io/rspec/#/rspec/S4144/javascript\n \"sonarjs/no-identical-functions\": \"error\",\n\n // Merge nested if-statements that can be combined — reduces nesting\n // https://sonarsource.github.io/rspec/#/rspec/S1066/javascript\n \"sonarjs/no-collapsible-if\": \"error\",\n\n // Simplify `if (x) return true; else return false;` → `return x`\n // https://sonarsource.github.io/rspec/#/rspec/S1125/javascript\n \"sonarjs/no-redundant-boolean\": \"error\",\n\n // Detect collections that are populated but never read — dead code\n // https://sonarsource.github.io/rspec/#/rspec/S4030/javascript\n \"sonarjs/no-unused-collection\": \"error\",\n\n // Return value directly instead of storing in temp variable first\n // https://sonarsource.github.io/rspec/#/rspec/S1488/javascript\n \"sonarjs/prefer-immediate-return\": \"error\",\n\n // Simplify boolean return patterns — `return cond` instead of `if/else`\n // https://sonarsource.github.io/rspec/#/rspec/S1126/javascript\n \"sonarjs/prefer-single-boolean-return\": \"error\",\n\n // Detect identical sub-expressions on both sides of operator (x && x)\n // https://sonarsource.github.io/rspec/#/rspec/S1764/javascript\n \"sonarjs/no-identical-expressions\": \"error\",\n\n // Simplify `!(a === b)` → `a !== b` — more readable\n // https://sonarsource.github.io/rspec/#/rspec/S1940/javascript\n \"sonarjs/no-inverted-boolean-check\": \"error\",\n\n // Detect size/length comparisons that are always true/false\n // https://sonarsource.github.io/rspec/#/rspec/S3981/javascript\n \"sonarjs/no-collection-size-mischeck\": \"error\",\n\n // Detect duplicate conditions in if/else-if chains — copy-paste bug\n // https://sonarsource.github.io/rspec/#/rspec/S1862/javascript\n \"sonarjs/no-identical-conditions\": \"error\",\n\n // Detect identical code in if and else branches — refactoring leftover\n // https://sonarsource.github.io/rspec/#/rspec/S1871/javascript\n \"sonarjs/no-duplicated-branches\": \"error\",\n\n // Detect .filter()/.map()/.slice() called without using the result\n // https://sonarsource.github.io/rspec/#/rspec/S2201/javascript\n \"sonarjs/no-ignored-return\": \"error\",\n\n // Detect redundant return/break/continue at end of block\n // https://sonarsource.github.io/rspec/#/rspec/S3626/javascript\n \"sonarjs/no-redundant-jump\": \"error\",\n\n // Prevent .only() from being committed — blocks CI for others\n // https://sonarsource.github.io/rspec/#/rspec/S6426/javascript\n \"sonarjs/no-exclusive-tests\": \"error\",\n\n // Detect `const sorted = arr.sort()` — .sort() mutates the original\n // https://sonarsource.github.io/rspec/#/rspec/S4043/javascript\n \"sonarjs/no-misleading-array-reverse\": \"error\",\n\n // Require initial value for .reduce() — crashes on empty arrays without it\n // https://sonarsource.github.io/rspec/#/rspec/S6959/javascript\n \"sonarjs/reduce-initial-value\": \"error\",\n\n // Disallow async operations in constructors — use factory methods\n // https://sonarsource.github.io/rspec/#/rspec/S7059/javascript\n \"sonarjs/no-async-constructor\": \"error\",\n\n // Detect `field?: string | undefined` — the `?` already implies undefined\n // https://sonarsource.github.io/rspec/#/rspec/S4782/javascript\n \"sonarjs/no-redundant-optional\": \"error\",\n\n // Detect `string | number | string` — duplicate constituents in unions\n // https://sonarsource.github.io/rspec/#/rspec/S4621/javascript\n \"sonarjs/no-duplicate-in-composite\": \"error\",\n\n // Detect hardcoded secrets (API keys, passwords, tokens) in source code\n // https://sonarsource.github.io/rspec/#/rspec/S6418/javascript\n \"sonarjs/no-hardcoded-secrets\": \"warn\",\n },\n },\n ]\n}\n","/* eslint-disable max-lines-per-function, max-statements -- Rule definition file: sequential builder calls that configure the TypeScript preset. */\nimport tseslint from \"typescript-eslint\"\n\nimport type { FlatConfig, FlatConfigArray } from \"../types\"\n\nimport { createConfig } from \"../build/config-builder\"\n\n/**\n * TypeScript config — extends typescript-eslint strict presets with project-wide type checking.\n *\n * Presets used:\n * - `tseslint.configs.strictTypeChecked` — all recommended + strict rules with type info\n * - `tseslint.configs.stylisticTypeChecked` — consistent code style with type info\n *\n * The presets already handle many core ESLint rules by disabling them and enabling\n * TS-aware equivalents (no-implied-eval, dot-notation, no-throw-literal, etc.).\n *\n * @see https://typescript-eslint.io/getting-started/\n * @see https://typescript-eslint.io/rules/\n */\nexport function typescriptConfig(): FlatConfigArray {\n const typeChecked = tseslint.configs.strictTypeChecked\n const stylistic = tseslint.configs.stylisticTypeChecked\n\n // Blocks 0+1: parser setup + ESLint-core replacements (structural, not validated)\n // Block 2 from each: the actual @typescript-eslint/* rules (validated)\n const structuralBlocks = typeChecked.slice(0, 2) as FlatConfigArray\n const ruleBlocks = [typeChecked[2], stylistic[2]] as FlatConfig[]\n\n const builder = createConfig({\n name: \"eslint-config-setup/typescript\",\n passthrough: structuralBlocks,\n presets: ruleBlocks,\n languageOptions: {\n parserOptions: {\n // Use project service for automatic tsconfig resolution\n // https://typescript-eslint.io/packages/parser#projectservice\n projectService: true,\n },\n },\n })\n\n // ── Override preset defaults ──────────────────────────────────\n\n // Override bare `error` with underscore-ignore pattern — universal convention\n // Preset sets bare `error` with no options (no ignoreRestSiblings, no _ pattern)\n // https://typescript-eslint.io/rules/no-unused-vars\n builder.overrideRule(\"@typescript-eslint/no-unused-vars\", [\n \"error\",\n {\n args: \"all\",\n argsIgnorePattern: \"^_\",\n caughtErrors: \"all\",\n caughtErrorsIgnorePattern: \"^_\",\n destructuredArrayIgnorePattern: \"^_\",\n varsIgnorePattern: \"^_\",\n ignoreRestSiblings: true,\n },\n ])\n\n // Enforce T[] for simple types, Array<T> for complex — readable array types\n // (in stylisticTypeChecked preset as bare \"error\", we add options)\n // https://typescript-eslint.io/rules/array-type\n builder.overrideRule(\"@typescript-eslint/array-type\", [\n \"error\",\n { default: \"array-simple\" },\n ])\n\n // Override return-await from \"error-handling-correctness-only\" to \"in-try-catch\"\n // https://typescript-eslint.io/rules/return-await\n builder.overrideRule(\"@typescript-eslint/return-await\", [\n \"error\",\n \"in-try-catch\",\n ])\n\n // Downgrade from error to warn — stay current but don't block\n // https://typescript-eslint.io/rules/no-deprecated\n builder.overrideRule(\"@typescript-eslint/no-deprecated\", \"warn\")\n\n // ── Beyond presets: import/export hygiene ──────────────────\n\n // Enforce `import type { T }` — ensures types are erased at compile time\n // https://typescript-eslint.io/rules/consistent-type-imports\n builder.addRule(\"@typescript-eslint/consistent-type-imports\", [\n \"error\",\n { fixStyle: \"inline-type-imports\" },\n ])\n\n // Enforce `export type { T }` — matches import convention\n // https://typescript-eslint.io/rules/consistent-type-exports\n builder.addRule(\"@typescript-eslint/consistent-type-exports\", [\n \"error\",\n { fixMixedExportsWithInlineTypeSpecifier: true },\n ])\n\n // Prevent type-only imports from triggering side effects\n // https://typescript-eslint.io/rules/no-import-type-side-effects\n builder.addRule(\"@typescript-eslint/no-import-type-side-effects\", \"error\")\n\n // Remove unnecessary namespace qualifiers — cleaner code\n // https://typescript-eslint.io/rules/no-unnecessary-qualifier\n builder.addRule(\"@typescript-eslint/no-unnecessary-qualifier\", \"error\")\n\n // Remove useless `export {}` — keeps module boundaries clean\n // https://typescript-eslint.io/rules/no-useless-empty-export\n builder.addRule(\"@typescript-eslint/no-useless-empty-export\", \"error\")\n\n // Detect redundant `this.x = x` after constructor parameter property\n // https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment\n builder.addRule(\n \"@typescript-eslint/no-unnecessary-parameter-property-assignment\",\n \"error\",\n )\n\n // Void-returning callbacks must not accidentally return values\n // Catches: `forEach(x => map.set(x, 1))` — .set() returns the map, but forEach expects void\n // https://typescript-eslint.io/rules/strict-void-return\n builder.addRule(\"@typescript-eslint/strict-void-return\", \"error\")\n\n // ── Beyond presets: safety & correctness ──────────────────────\n\n // Prevent variable shadowing — catches bugs where inner var hides outer\n // Not in any preset. TS-aware version avoids false positives with type/value merging.\n // https://typescript-eslint.io/rules/no-shadow\n builder.addRule(\"no-shadow\", \"off\")\n builder.addRule(\"@typescript-eslint/no-shadow\", [\n \"error\",\n {\n hoist: \"all\",\n allow: [\"resolve\", \"reject\", \"done\", \"next\", \"error\"],\n ignoreTypeValueShadow: true,\n ignoreFunctionTypeParameterNameValueShadow: true,\n },\n ])\n\n // Allow numbers in template literals — `${count}` is idiomatic JS\n // https://typescript-eslint.io/rules/restrict-template-expressions\n builder.overrideRule(\"@typescript-eslint/restrict-template-expressions\", [\n \"error\",\n { allowNumber: true },\n ])\n\n // Require strict boolean expressions — no implicit truthiness checks\n // Prevents bugs like `if (count)` when count is 0 (falsy but valid)\n // https://typescript-eslint.io/rules/strict-boolean-expressions\n builder.addRule(\"@typescript-eslint/strict-boolean-expressions\", [\n \"error\",\n { allowNullableBoolean: true, allowNullableObject: true },\n ])\n\n // ── File overrides ────────────────────────────────────────────\n\n // Disable type-checked rules for plain JS files (no tsconfig coverage)\n // https://typescript-eslint.io/users/configs#disable-type-checked\n builder.addFileOverride(\n \"eslint-config-setup/typescript-js-compat\",\n [\"**/*.{js,mjs,cjs}\"],\n tseslint.configs.disableTypeChecked.rules ?? {},\n )\n\n return builder.build()\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\nimport unicornPlugin from \"eslint-plugin-unicorn\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Unicorn config — modern JavaScript idioms and best practices.\n * We hand-pick rules instead of using `flat/recommended` because the\n * recommended preset includes opinionated rules we disagree with\n * (e.g., `no-null`, `no-nested-ternary`, `filename-case`).\n *\n * @see https://github.com/sindresorhus/eslint-plugin-unicorn#rules\n */\nexport function unicornConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/unicorn\",\n plugins: {\n unicorn: unicornPlugin,\n },\n rules: {\n // ── Error prevention ──────────────────────────────────────────\n\n // Forbid `/* eslint-disable */` without specific rule — too broad\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n\n // Disallow `instanceof` with built-in objects — use proper checks instead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md\n \"unicorn/no-instanceof-builtins\": \"error\",\n\n // Prevent passing non-function to removeEventListener — common mistake\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md\n \"unicorn/no-invalid-remove-event-listener\": \"error\",\n\n // Disallow invalid fetch() options — catches typos at lint time\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md\n \"unicorn/no-invalid-fetch-options\": \"error\",\n\n // Prefer direct undefined checks over typeof — cleaner with strict mode\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md\n \"unicorn/no-typeof-undefined\": \"error\",\n\n // Remove useless fallback in object spread ({ ...a, x: a.x ?? y })\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md\n \"unicorn/no-useless-fallback-in-spread\": \"error\",\n\n // Remove unnecessary .length checks before array operations\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md\n \"unicorn/no-useless-length-check\": \"error\",\n\n // Remove unnecessary spread operators ([...array] when array already exists)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md\n \"unicorn/no-useless-spread\": \"error\",\n\n // Remove useless Promise.resolve/reject wrappers — simplify async code\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md\n \"unicorn/no-useless-promise-resolve-reject\": \"error\",\n\n // Disallow `return undefined` — implicit undefined is cleaner\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md\n \"unicorn/no-useless-undefined\": \"error\",\n\n // Disallow `await` in Promise.all/race arguments — already a promise\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md\n \"unicorn/no-await-in-promise-methods\": \"error\",\n\n // Catch `!a === b` bugs — use `a !== b` instead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md\n \"unicorn/no-negation-in-equality-check\": \"error\",\n\n // Disallow objects with `.then` property — prevents accidental thenables\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md\n \"unicorn/no-thenable\": \"error\",\n\n // Disallow `(await foo).bar` — assign to variable first for clarity\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md\n \"unicorn/no-await-expression-member\": \"error\",\n\n // Disallow `const self = this` — use arrow functions instead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md\n \"unicorn/no-this-assignment\": \"error\",\n\n // Disallow `await` on non-promise values — unnecessary overhead\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md\n \"unicorn/no-unnecessary-await\": \"error\",\n\n // Disallow unnecessary slice end argument — `.length` is the default\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-slice-end.md\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n\n // OFF: Stylistic — developers should decide their own array initialization pattern\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md\n \"unicorn/no-immediate-mutation\": \"off\",\n\n // Disallow recursive access in getters/setters — infinite loop risk\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md\n \"unicorn/no-accessor-recursion\": \"error\",\n\n // Disallow anonymous default exports — hard to find and refactor\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md\n \"unicorn/no-anonymous-default-export\": \"error\",\n\n // Disallow `this` argument in array methods — use arrow functions\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md\n \"unicorn/no-array-method-this-argument\": \"error\",\n\n // Disallow passing function references directly to iterator methods\n // Prevents bugs like `['1','2'].map(parseInt)` → [1, NaN]\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md\n \"unicorn/no-array-callback-reference\": \"error\",\n\n // Disallow unreadable IIFEs — extract to named function\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md\n \"unicorn/no-unreadable-iife\": \"error\",\n\n // Require Error messages — aids debugging\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md\n \"unicorn/error-message\": \"error\",\n\n // Require `new` keyword when throwing errors — consistent pattern\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md\n \"unicorn/throw-new-error\": \"error\",\n\n // Prefer consistent types when spreading a ternary in an array literal\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md\n \"unicorn/consistent-empty-array-spread\": \"error\",\n\n // Prefer passing Date directly to constructor when cloning\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md\n \"unicorn/consistent-date-clone\": \"error\",\n\n // Enforce consistent style for indexOf/findIndex existence checks\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md\n \"unicorn/consistent-existence-index-check\": \"error\",\n\n // ── Modern API preferences ────────────────────────────────────\n\n // Prefer .flatMap() over .map().flat() — single pass, more readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md\n \"unicorn/prefer-array-flat-map\": \"error\",\n\n // Prefer .find() over .filter()[0] — stops at first match\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md\n \"unicorn/prefer-array-find\": \"error\",\n\n // Prefer .flat() over manual recursive flattening\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md\n \"unicorn/prefer-array-flat\": \"error\",\n\n // Prefer .indexOf() over manual search loops\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md\n \"unicorn/prefer-array-index-of\": \"error\",\n\n // Prefer .some() over .find() !== undefined — semantic intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md\n \"unicorn/prefer-array-some\": \"error\",\n\n // Prefer .at(-1) over arr[arr.length - 1] — cleaner negative indexing\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md\n \"unicorn/prefer-at\": \"error\",\n\n // Prefer .includes() over .indexOf() !== -1 — boolean intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md\n \"unicorn/prefer-includes\": \"error\",\n\n // Prefer .before()/.after()/.replaceWith() over parent.insertBefore()\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n\n // Prefer Math.log10/Math.hypot over manual math — accurate and readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md\n \"unicorn/prefer-modern-math-apis\": \"error\",\n\n // Prefer negative index over length-based — cleaner with .slice(-n)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md\n \"unicorn/prefer-negative-index\": \"error\",\n\n // Prefer Number.isFinite/Number.isNaN over global — no coercion\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md\n \"unicorn/prefer-number-properties\": \"error\",\n\n // Prefer Object.fromEntries() over manual reduce for key-value mapping\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md\n \"unicorn/prefer-object-from-entries\": \"error\",\n\n // Prefer Set.has() over Array.includes() for repeated lookups — O(1)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md\n \"unicorn/prefer-set-has\": \"error\",\n\n // Prefer .replaceAll() over regex with global flag — clearer intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md\n \"unicorn/prefer-string-replace-all\": \"error\",\n\n // Prefer .slice() over .substr()/.substring() — consistent, no gotchas\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md\n \"unicorn/prefer-string-slice\": \"error\",\n\n // Prefer .startsWith()/.endsWith() over regex — simpler, faster\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md\n \"unicorn/prefer-string-starts-ends-with\": \"error\",\n\n // Prefer .trimStart()/.trimEnd() over .trimLeft()/.trimRight()\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n\n // Prefer structuredClone() over JSON.parse(JSON.stringify()) — handles more types\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md\n \"unicorn/prefer-structured-clone\": \"error\",\n\n // Prefer top-level await over async IIFE — cleaner module pattern\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md\n \"unicorn/prefer-top-level-await\": \"error\",\n\n // Throw TypeError for type checks — correct error type\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md\n \"unicorn/prefer-type-error\": \"error\",\n\n // ── Regex ─────────────────────────────────────────────────────\n\n // Simplify regex patterns — auto-fixable regex optimization\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md\n \"unicorn/better-regex\": \"error\",\n\n // ── Misc ──────────────────────────────────────────────────────\n\n // Enforce `error` name in catch blocks — consistent naming\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md\n \"unicorn/catch-error-name\": [\"error\", { name: \"error\" }],\n\n // Enforce `new` for builtins that require it (Map, Set, WeakMap, etc.)\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md\n \"unicorn/new-for-builtins\": \"error\",\n\n // Prefer Array.from({length}) or fill() over new Array(n) — explicit intent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md\n \"unicorn/no-new-array\": \"error\",\n\n // Prefer Buffer.from()/Buffer.alloc() over new Buffer() — deprecated\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md\n \"unicorn/no-new-buffer\": \"error\",\n\n // Forbid unreadable destructuring like `const [,,, d] = arr`\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n\n // Remove unnecessary `.0` in numbers (1.0 → 1) — cleaner\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md\n \"unicorn/no-zero-fractions\": \"error\",\n\n // Enforce lowercase hex (0xff not 0xFF) — consistent\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md\n \"unicorn/number-literal-case\": \"error\",\n\n // Enforce numeric separators (1_000_000 not 1000000) — readable large numbers\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md\n \"unicorn/numeric-separators-style\": \"error\",\n\n // Prefer `export { x } from 'y'` over import then re-export\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md\n \"unicorn/prefer-export-from\": [\"error\", { ignoreUsedVariables: true }],\n\n // Prefer built-in coercion (String, Number, Boolean) over wrapper functions\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md\n \"unicorn/prefer-native-coercion-functions\": \"error\",\n\n // Prefer .test() over .match() for boolean regex checks\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md\n \"unicorn/prefer-regexp-test\": \"error\",\n\n // Prefer [...iterable] spread over Array.from(iterable) — concise\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md\n \"unicorn/prefer-spread\": \"error\",\n\n // Prefer relative URLs over absolute same-origin URLs\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md\n \"unicorn/relative-url-style\": \"error\",\n\n // Prefer `node:fs` over `fs` — explicit built-in module protocol\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md\n \"unicorn/prefer-node-protocol\": \"error\",\n\n // Prefer `globalThis` over `window`/`self`/`global` — universal\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md\n \"unicorn/prefer-global-this\": \"error\",\n\n // Prefer omitting unused catch binding — cleaner syntax\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md\n \"unicorn/prefer-optional-catch-binding\": \"error\",\n\n // Prefer `Date.now()` over `new Date().getTime()` — direct and readable\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md\n \"unicorn/prefer-date-now\": \"error\",\n\n // Enforce consistent `utf-8` casing for text encoding identifiers\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md\n \"unicorn/text-encoding-identifier-case\": \"error\",\n\n // Prefer `import.meta.url`/`import.meta.dirname` over `__filename`/`__dirname`\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md\n \"unicorn/prefer-import-meta-properties\": \"error\",\n\n // OFF: Sequential .push() is natural in codegen and conditional builders.\n // No real performance benefit in modern V8 — purely stylistic.\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md\n \"unicorn/prefer-single-call\": \"off\",\n },\n },\n ]\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Config file overrides — relaxed rules for tool configuration files.\n * Config files (vite, vitest, next, tailwind, postcss) have their own\n * patterns that conflict with strict app-code rules.\n *\n * File patterns: *.config.*, vite.config.*, vitest.config.*, etc.\n */\nexport function configFilesOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/config-files\",\n files: [\n \"**/*.config.{ts,mts,cts,js,mjs,cjs}\",\n \"**/vite.config.*\",\n \"**/vitest.config.*\",\n \"**/next.config.*\",\n \"**/tailwind.config.*\",\n \"**/postcss.config.*\",\n ],\n rules: {\n // Config files often require default exports (Vite, Next.js, Tailwind)\n \"import/no-default-export\": \"off\",\n\n // Config files can have complex configuration objects\n complexity: \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n\n // Config files may use require() for dynamic plugin loading\n \"@typescript-eslint/no-require-imports\": \"off\",\n\n // Config files may log build info to console\n \"no-console\": \"off\",\n\n // Config files often have magic numbers (ports, sizes, timeouts)\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": \"off\",\n },\n },\n ]\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Declaration file overrides — minimal rules for `.d.ts` files.\n * Declaration files follow their own patterns (ambient declarations,\n * interface merging, namespaces) that conflict with app-code rules.\n *\n * File pattern: *.d.ts files\n */\nexport function declarationsOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/declarations\",\n files: [\"**/*.d.ts\"],\n rules: {\n // Declaration files often have unused type parameters/variables\n \"@typescript-eslint/no-unused-vars\": \"off\",\n\n // Empty interfaces are valid for declaration merging\n \"@typescript-eslint/no-empty-interface\": \"off\",\n\n // Empty object types are used for extensible interfaces\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n\n // `any` is sometimes necessary in third-party type declarations\n \"@typescript-eslint/no-explicit-any\": \"off\",\n\n // Both `type` and `interface` are valid in declarations\n \"@typescript-eslint/consistent-type-definitions\": \"off\",\n\n // Namespaces are standard in ambient declarations\n \"@typescript-eslint/no-namespace\": \"off\",\n\n // Duplicate imports happen with declaration merging\n \"import/no-duplicates\": \"off\",\n\n // Unused imports are common in re-export declaration files\n \"unused-imports/no-unused-imports\": \"off\",\n\n // ── AI mode rules that don't apply to declaration files ────────\n\n // Declarations inherit return types from the implementation\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n\n // Third-party naming conventions must be followed as-is\n \"@typescript-eslint/naming-convention\": \"off\",\n\n // Abbreviations in third-party types are unavoidable\n \"unicorn/prevent-abbreviations\": \"off\",\n\n // .d.ts filename is dictated by the module it declares\n \"unicorn/filename-case\": \"off\",\n },\n },\n ]\n}\n","import playwrightPlugin from \"eslint-plugin-playwright\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * E2E test overrides — Playwright rules + relaxed strictness for E2E tests.\n *\n * File pattern: *.spec.ts (Playwright convention)\n *\n * @see https://github.com/playwright-community/eslint-plugin-playwright#rules\n */\nexport function e2eOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/e2e\",\n files: [\"**/*.spec.ts\"],\n plugins: {\n playwright: playwrightPlugin,\n },\n rules: {\n // ── Playwright rules ──────────────────────────────────────────\n\n // Every test must contain at least one expect()\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md\n \"playwright/expect-expect\": \"error\",\n\n // Limit describe nesting to 3 levels — keeps tests readable\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/max-nested-describe.md\n \"playwright/max-nested-describe\": [\"error\", { max: 3 }],\n\n // Detect missing await on Playwright async methods — common mistake\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/missing-playwright-await.md\n \"playwright/missing-playwright-await\": \"error\",\n\n // No expect() inside conditionals — tests should be deterministic\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-conditional-expect.md\n \"playwright/no-conditional-expect\": \"error\",\n\n // Warn on conditional logic in tests — tests should be linear\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-conditional-in-test.md\n \"playwright/no-conditional-in-test\": \"warn\",\n\n // Prefer locators over element handles — auto-retry, less flaky\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-element-handle.md\n \"playwright/no-element-handle\": \"error\",\n\n // No page.evaluate with arbitrary code — brittle, hard to debug\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-eval.md\n \"playwright/no-eval\": \"error\",\n\n // No test.only — prevents accidentally skipping tests in CI\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-focused-test.md\n \"playwright/no-focused-test\": \"error\",\n\n // Warn on { force: true } — bypasses visibility/actionability checks\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-force-option.md\n \"playwright/no-force-option\": \"warn\",\n\n // No waitUntil: \"networkidle\" — unreliable, use specific waits\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-networkidle.md\n \"playwright/no-networkidle\": \"error\",\n\n // No page.pause() — debugging artifact, breaks CI\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-page-pause.md\n \"playwright/no-page-pause\": \"error\",\n\n // Warn on test.skip — track disabled tests\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-skipped-test.md\n \"playwright/no-skipped-test\": \"warn\",\n\n // No unnecessary await on non-promise values\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-useless-await.md\n \"playwright/no-useless-await\": \"error\",\n\n // No double-negative assertions: expect(x).not.not...\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-useless-not.md\n \"playwright/no-useless-not\": \"error\",\n\n // Warn on waitForSelector — prefer locators with auto-wait\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-wait-for-selector.md\n \"playwright/no-wait-for-selector\": \"warn\",\n\n // No hardcoded timeouts — use Playwright's built-in waiting\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-wait-for-timeout.md\n \"playwright/no-wait-for-timeout\": \"error\",\n\n // Prefer web-first assertions (toBeVisible, toHaveText) — auto-retry\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-web-first-assertions.md\n \"playwright/prefer-web-first-assertions\": \"error\",\n\n // Validate expect() usage — proper matcher and argument count\n // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-expect.md\n \"playwright/valid-expect\": \"error\",\n\n // ── Relaxed rules for E2E tests ───────────────────────────────\n // E2E tests are long procedural scripts with many page interactions\n\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n },\n },\n ]\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Script file overrides — relaxed rules for build/dev scripts.\n * Scripts are CLI tools that legitimately use console.log and process.exit.\n *\n * File pattern: scripts dir (*.ts, *.mts, *.js, *.mjs)\n */\nexport function scriptsOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/scripts\",\n files: [\"**/scripts/**/*.{ts,mts,js,mjs}\"],\n rules: {\n // Scripts use console for user-facing output\n \"no-console\": \"off\",\n\n // Scripts use process.exit for clean termination\n // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-process-exit.md\n \"node/no-process-exit\": \"off\",\n\n // Scripts can be long (build pipelines, code generators)\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n\n // Scripts are often procedural without explicit return types\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n\n // Scripts legitimately call process.exit()\n // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md\n \"unicorn/no-process-exit\": \"off\",\n },\n },\n ]\n}\n","import storybookPlugin from \"eslint-plugin-storybook\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Storybook overrides — Storybook best-practice rules for story files.\n *\n * File pattern: *.stories.{ts,tsx}\n *\n * @see https://github.com/storybookjs/eslint-plugin-storybook#supported-rules\n */\nexport function storiesOverride(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/stories\",\n files: [\"**/*.stories.{ts,tsx}\"],\n plugins: {\n storybook: storybookPlugin as Record<string, unknown>,\n },\n rules: {\n // ── Storybook rules ───────────────────────────────────────────\n\n // Await play function interactions — prevents race conditions\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/await-interactions.md\n \"storybook/await-interactions\": \"error\",\n\n // Stories must have a default export (meta) — Storybook requirement\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/default-exports.md\n \"storybook/default-exports\": \"error\",\n\n // Use / for hierarchy separators, not | or . — Storybook 7+ convention\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/hierarchy-separator.md\n \"storybook/hierarchy-separator\": \"error\",\n\n // No redundant story names that match export name — DRY\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-redundant-story-name.md\n \"storybook/no-redundant-story-name\": \"error\",\n\n // No deprecated storiesOf() API — use CSF (Component Story Format)\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-stories-of.md\n \"storybook/no-stories-of\": \"error\",\n\n // Warn if title is in meta — auto-title is preferred in CSF 3\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-title-property-in-meta.md\n \"storybook/no-title-property-in-meta\": \"warn\",\n\n // Story exports should be PascalCase — component naming convention\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/prefer-pascal-case.md\n \"storybook/prefer-pascal-case\": \"error\",\n\n // File must export at least one story — prevents empty story files\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/story-exports.md\n \"storybook/story-exports\": \"error\",\n\n // Use Storybook's expect() instead of Jest/Vitest in play functions\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-expect.md\n \"storybook/use-storybook-expect\": \"error\",\n\n // Use Storybook's Testing Library, not direct import\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/use-storybook-testing-library.md\n \"storybook/use-storybook-testing-library\": \"error\",\n\n // Enforce `satisfies Meta<typeof Component>` on default export — type-safe meta\n // https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/meta-satisfies-type.md\n \"storybook/meta-satisfies-type\": \"error\",\n\n // ── Relaxed rules for stories ─────────────────────────────────\n\n // Stories require default exports (meta object)\n \"import/no-default-export\": \"off\",\n\n // Stories can be long (many variants of a component)\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n },\n },\n ]\n}\n","/* eslint-disable max-lines-per-function -- Rule definition file: one function returning a flat list of rule entries. */\nimport vitestPlugin from \"@vitest/eslint-plugin\"\nimport testingLibraryPlugin from \"eslint-plugin-testing-library\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Test file overrides — Vitest rules + Testing Library + relaxed strictness.\n *\n * File patterns: *.test.{ts,tsx}, __tests__/*.{ts,tsx}\n *\n * @see https://github.com/vitest-dev/eslint-plugin-vitest#rules\n * @see https://github.com/testing-library/eslint-plugin-testing-library#supported-rules\n */\nexport function testsOverride(): FlatConfigArray {\n const configs: FlatConfigArray = [\n {\n name: \"eslint-config-setup/tests\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n plugins: {\n vitest: vitestPlugin,\n },\n rules: {\n // ── Vitest rules ──────────────────────────────────────────────\n\n // Every test must contain at least one assertion\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md\n \"vitest/expect-expect\": \"error\",\n\n // Prevent duplicate test titles within a describe block\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md\n \"vitest/no-identical-title\": \"error\",\n\n // No it.only / describe.only — prevents accidentally skipping tests in CI\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md\n \"vitest/no-focused-tests\": \"error\",\n\n // Warn on it.skip / describe.skip — track disabled tests\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md\n \"vitest/no-disabled-tests\": \"warn\",\n\n // No duplicate beforeEach/afterEach hooks — merge them\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md\n \"vitest/no-duplicate-hooks\": \"error\",\n\n // Prefer .toBe() over .toEqual() for primitives — clearer intent\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md\n \"vitest/prefer-to-be\": \"error\",\n\n // Prefer .toHaveLength() over .toBe(arr.length) — better errors\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md\n \"vitest/prefer-to-have-length\": \"error\",\n\n // Validate expect() usage — no dangling expect without assertion\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md\n \"vitest/valid-expect\": \"error\",\n\n // Validate test/describe title format — no empty or invalid titles\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md\n \"vitest/valid-title\": \"error\",\n\n // No conditional logic (if/else) inside tests — split into separate tests\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md\n \"vitest/no-conditional-in-test\": \"error\",\n\n // No expect() inside conditional blocks — always assert unconditionally\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md\n \"vitest/no-conditional-expect\": \"error\",\n\n // No standalone expect() outside test blocks — always wrap in it/test\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md\n \"vitest/no-standalone-expect\": \"error\",\n\n // Prefer .toStrictEqual() over .toEqual() — catches undefined vs missing\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md\n \"vitest/prefer-strict-equal\": \"error\",\n\n // Prefer vi.spyOn() over vi.fn() for method mocks — preserves original\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md\n \"vitest/prefer-spy-on\": \"error\",\n\n // Require message argument in toThrow/toThrowError — verify correct error\n // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md\n \"vitest/require-to-throw-message\": \"error\",\n\n // ── Relaxed rules for tests ───────────────────────────────────\n // Tests are naturally verbose and use patterns banned in prod code\n\n // Tests can be long (setup + many assertions)\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n\n // Tests often need `any` for mocking and type assertions\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unsafe-assignment\": \"off\",\n \"@typescript-eslint/no-unsafe-member-access\": \"off\",\n },\n },\n {\n name: \"eslint-config-setup/tests-testing-library\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\"],\n plugins: {\n \"testing-library\": testingLibraryPlugin,\n },\n rules: {\n // ── Testing Library rules ───────────────────────────────────\n\n // Await async events (userEvent.click, etc.) — prevents race conditions\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-events.md\n \"testing-library/await-async-events\": \"error\",\n\n // Await async queries (findBy*) — they return promises\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-queries.md\n \"testing-library/await-async-queries\": \"error\",\n\n // Await async utilities (waitFor, waitForElementToBeRemoved)\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-utils.md\n \"testing-library/await-async-utils\": \"error\",\n\n // Don't await synchronous events — misleading\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-await-sync-events.md\n \"testing-library/no-await-sync-events\": \"error\",\n\n // Don't await synchronous queries (getBy*, queryBy*) — not promises\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-await-sync-queries.md\n \"testing-library/no-await-sync-queries\": \"error\",\n\n // Don't use container.querySelector — use queries instead\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-container.md\n \"testing-library/no-container\": \"error\",\n\n // Warn on debug()/prettyDOM() left in tests — debugging artifacts\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-debugging-utils.md\n \"testing-library/no-debugging-utils\": \"warn\",\n\n // Don't access DOM nodes directly — use queries\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-node-access.md\n \"testing-library/no-node-access\": \"error\",\n\n // Don't call render in beforeEach — call in each test\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-render-in-lifecycle.md\n \"testing-library/no-render-in-lifecycle\": \"error\",\n\n // No unnecessary act() wrappers — TL handles this internally\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-unnecessary-act.md\n \"testing-library/no-unnecessary-act\": \"error\",\n\n // One assertion per waitFor — multiple can mask failures\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-wait-for-multiple-assertions.md\n \"testing-library/no-wait-for-multiple-assertions\": \"error\",\n\n // No side effects in waitFor — only assertions\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/no-wait-for-side-effects.md\n \"testing-library/no-wait-for-side-effects\": \"error\",\n\n // Prefer findBy* over waitFor + getBy* — built-in combination\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-find-by.md\n \"testing-library/prefer-find-by\": \"error\",\n\n // Use getBy* (throws) for present elements, queryBy* for absent\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-presence-queries.md\n \"testing-library/prefer-presence-queries\": \"error\",\n\n // Use queryBy* for disappearance checks — returns null when gone\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-query-by-disappearance.md\n \"testing-library/prefer-query-by-disappearance\": \"error\",\n\n // Use screen.getBy* over destructured render result — consistent\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-screen-queries.md\n \"testing-library/prefer-screen-queries\": \"error\",\n\n // Name render result consistently (e.g., `const { getByText } = render(...)`)\n // https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/render-result-naming-convention.md\n \"testing-library/render-result-naming-convention\": \"error\",\n },\n }]\n\n\n return configs\n}\n","import type { FlatConfigArray } from \"../types\"\n\n/**\n * Complexity preset — limits for production code that encourage small,\n * focused functions and aggressive extraction of helper functions.\n * @see https://eslint.org/docs/latest/rules/#suggestions (complexity rules)\n */\nexport function standardComplexity(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/complexity\",\n rules: {\n // Max cyclomatic complexity per function — 10 branches\n // https://eslint.org/docs/latest/rules/complexity\n complexity: [\"error\", 10],\n\n // Max nesting depth — 3 levels\n // https://eslint.org/docs/latest/rules/max-depth\n \"max-depth\": [\"error\", 3],\n\n // Max nested callbacks — 2 levels\n // https://eslint.org/docs/latest/rules/max-nested-callbacks\n \"max-nested-callbacks\": [\"error\", 2],\n\n // Max function parameters — 3 before using options object\n // https://eslint.org/docs/latest/rules/max-params\n \"max-params\": [\"error\", 3],\n\n // Max statements per function — 15\n // https://eslint.org/docs/latest/rules/max-statements\n \"max-statements\": [\"error\", 15],\n\n // Max lines per function — 50 (excluding blanks and comments)\n // https://eslint.org/docs/latest/rules/max-lines-per-function\n \"max-lines-per-function\": [\n \"error\",\n { max: 50, skipBlankLines: true, skipComments: true },\n ],\n\n // Max lines per file — 300 (excluding blanks and comments)\n // https://eslint.org/docs/latest/rules/max-lines\n \"max-lines\": [\n \"error\",\n { max: 300, skipBlankLines: true, skipComments: true },\n ],\n\n // Cognitive complexity — measures how hard code is to understand\n // https://sonarsource.github.io/rspec/#/rspec/S3776/javascript\n \"sonarjs/cognitive-complexity\": [\"error\", 10],\n },\n },\n {\n name: \"eslint-config-setup/complexity-tests-relaxed\",\n files: [\"**/*.test.{ts,tsx}\", \"**/__tests__/**/*.{ts,tsx}\", \"**/*.spec.ts\"],\n rules: {\n \"max-nested-callbacks\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n },\n },\n ]\n}\n","import oxlintPlugin from \"eslint-plugin-oxlint\"\n\nimport type { ConfigOptions, FlatConfig, FlatConfigArray } from \"../types\"\n\n/**\n * Appends eslint-plugin-oxlint configs that disable all ESLint rules\n * already covered by OxLint. Must be the LAST config in the array.\n *\n * This allows running `oxlint && eslint` where OxLint handles the fast\n * checks and ESLint only runs type-aware and specialty rules.\n */\nexport function oxlintIntegration(opts: ConfigOptions): FlatConfigArray {\n const typedPlugin = oxlintPlugin as unknown as {\n configs: Record<string, FlatConfig>\n }\n\n const configs: FlatConfigArray = [\n {\n name: \"eslint-config-setup/oxlint\",\n ...typedPlugin.configs[\"flat/recommended\"],\n },\n ]\n\n // Add plugin-specific oxlint overrides if those plugins are active\n if (opts.react) {\n configs.push({\n name: \"eslint-config-setup/oxlint-react\",\n ...typedPlugin.configs[\"flat/react\"],\n }, {\n name: \"eslint-config-setup/oxlint-jsx-a11y\",\n ...typedPlugin.configs[\"flat/jsx-a11y\"],\n })\n }\n\n if (opts.node) {\n configs.push({\n name: \"eslint-config-setup/oxlint-node\",\n ...typedPlugin.configs[\"flat/node\"],\n })\n }\n\n // TypeScript and unicorn overlaps\n configs.push({\n name: \"eslint-config-setup/oxlint-typescript\",\n ...typedPlugin.configs[\"flat/typescript\"],\n }, {\n name: \"eslint-config-setup/oxlint-unicorn\",\n ...typedPlugin.configs[\"flat/unicorn\"],\n }, {\n name: \"eslint-config-setup/oxlint-import\",\n ...typedPlugin.configs[\"flat/import\"],\n }, {\n name: \"eslint-config-setup/oxlint-jsdoc\",\n ...typedPlugin.configs[\"flat/jsdoc\"],\n })\n\n return configs\n}\n","import compatPlugin from \"eslint-plugin-compat\"\n\nimport type { FlatConfigArray } from \"../types\"\n\n/**\n * Browser compatibility config — checks that browser APIs are available\n * in the project's browserslist targets. Uses MDN compatibility data.\n *\n * Activated automatically for non-Node projects (when `node: false`).\n * If no browserslist config exists, the default applies:\n * `> 0.5%, last 2 versions, Firefox ESR, not dead`\n *\n * @see https://github.com/amilajack/eslint-plugin-compat\n * @see https://browsersl.ist/\n */\nexport function compatConfig(): FlatConfigArray {\n return [\n {\n name: \"eslint-config-setup/compat\",\n plugins: {\n compat: compatPlugin,\n },\n rules: {\n // Warn when using browser APIs not supported in browserslist targets\n // https://github.com/amilajack/eslint-plugin-compat#usage\n \"compat/compat\": \"warn\",\n },\n },\n ]\n}\n","/* eslint-disable max-statements -- Composition function: sequentially pushes all config blocks. Each push is trivial but there are many configs. */\nimport type { ConfigOptions, FlatConfigArray } from \"../types\"\n\nimport { aiConfig } from \"../configs/ai\"\nimport { baseConfig } from \"../configs/base\"\nimport { compatConfig } from \"../configs/compat\"\nimport { cspellConfig } from \"../configs/cspell\"\nimport { deMorganConfig } from \"../configs/de-morgan\"\nimport { importsConfig } from \"../configs/imports\"\nimport { jsdocConfig } from \"../configs/jsdoc\"\nimport { jsonConfig } from \"../configs/json\"\nimport { markdownConfig } from \"../configs/markdown\"\nimport { nodeConfig } from \"../configs/node\"\nimport { packageJsonAiConfig, packageJsonConfig } from \"../configs/package-json\"\nimport { perfectionistAiConfig, perfectionistConfig } from \"../configs/perfectionist\"\nimport { prettierCompatConfig } from \"../configs/prettier\"\nimport { reactConfig } from \"../configs/react\"\nimport { reactEffectConfig } from \"../configs/react-effect\"\nimport { regexpConfig } from \"../configs/regexp\"\nimport { securityConfig } from \"../configs/security\"\nimport { sonarjsConfig } from \"../configs/sonarjs\"\nimport { typescriptConfig } from \"../configs/typescript\"\nimport { unicornConfig } from \"../configs/unicorn\"\nimport { configFilesOverride } from \"../overrides/config-files\"\nimport { declarationsOverride } from \"../overrides/declarations\"\nimport { e2eOverride } from \"../overrides/e2e\"\nimport { scriptsOverride } from \"../overrides/scripts\"\nimport { storiesOverride } from \"../overrides/stories\"\nimport { testsOverride } from \"../overrides/tests\"\nimport { oxlintIntegration } from \"../oxlint/integration\"\nimport { standardComplexity } from \"../presets/standard\"\n\n/**\n * Composes a full flat config array from the given options.\n * This is the core logic used by the build system to generate configs.\n */\nexport function composeConfig(opts: ConfigOptions): FlatConfigArray {\n const config: FlatConfigArray = []\n\n // 1. Base rules (always)\n config.push(...baseConfig())\n\n // 2. TypeScript (always, uses strictTypeChecked)\n config.push(...typescriptConfig())\n\n // 3. Imports (always)\n config.push(...importsConfig())\n\n // 4. Perfectionist — mechanical sorting (always)\n config.push(...perfectionistConfig())\n\n // 5. Unicorn (always)\n config.push(...unicornConfig())\n\n // 5. Regexp (always)\n config.push(...regexpConfig())\n\n // 6. JSDoc (always)\n config.push(...jsdocConfig())\n\n // 7. CSpell (always)\n config.push(...cspellConfig())\n\n // 8. SonarJS (always)\n config.push(...sonarjsConfig())\n\n // 9. Security (always)\n config.push(...securityConfig())\n\n // 10. De Morgan (always)\n config.push(...deMorganConfig())\n\n // 11. Browser compat (when not a Node.js project)\n if (!opts.node) {\n config.push(...compatConfig())\n }\n\n // 11. Complexity preset (before AI which may override)\n if (!opts.ai) {\n config.push(...standardComplexity())\n }\n\n // 12. Node.js (conditional)\n if (opts.node) {\n config.push(...nodeConfig())\n }\n\n // 13. React (conditional)\n if (opts.react) {\n config.push(...reactConfig())\n config.push(...reactEffectConfig())\n }\n\n // 14. AI mode (conditional — includes its own complexity limits)\n if (opts.ai) {\n config.push(...aiConfig())\n config.push(...perfectionistAiConfig())\n config.push(...packageJsonAiConfig())\n }\n\n // 15. File-pattern overrides (always relevant — no-op if files don't exist)\n config.push(...testsOverride())\n config.push(...e2eOverride())\n config.push(...storiesOverride())\n config.push(...configFilesOverride())\n config.push(...declarationsOverride())\n config.push(...scriptsOverride())\n\n // 16. JSON, Package.json & Markdown (always)\n config.push(...jsonConfig())\n config.push(...packageJsonConfig())\n config.push(...markdownConfig())\n\n // 18. Prettier compat (always last for TS/JS rules)\n config.push(...prettierCompatConfig())\n\n // 19. OxLint (absolute last — disables rules OxLint already covers)\n if (opts.oxlint) {\n config.push(...oxlintIntegration(opts))\n }\n\n return config\n}\n"],"mappings":";AAeO,SAAS,WAA4B;AAC1C,QAAM,UAA2B;AAAA,IAC/B;AAAA,MACE,MAAM;AAAA,MACN,OAAO;AAAA;AAAA;AAAA;AAAA,QAKL,OAAO,CAAC,SAAS,KAAK;AAAA;AAAA;AAAA,QAItB,kBAAkB,CAAC,SAAS,EAAE,aAAa,MAAM,CAAC;AAAA;AAAA;AAAA,QAIlD,qBAAqB;AAAA;AAAA;AAAA,QAIrB,uBAAuB;AAAA;AAAA;AAAA,QAIvB,wBAAwB;AAA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