@gaia-react/lint 1.3.1 → 1.5.0
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,"file":"base.d.ts","sourceRoot":"","sources":["../../src/configs/base.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAS,MAAM,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/configs/base.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAS,MAAM,EAAC,MAAM,QAAQ,CAAC;AAyT3C,eAAO,MAAM,SAAS,GAAI,WAAW,MAAM,KAAG,MAAM,CAAC,MAAM,EAS1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guardrails.d.ts","sourceRoot":"","sources":["../../src/configs/guardrails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"guardrails.d.ts","sourceRoot":"","sources":["../../src/configs/guardrails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAuMnC,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,KAAG,MAAM,CAAC,MAAM,EAOhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/configs/testing.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/configs/testing.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAkElC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -85,7 +85,16 @@ var buildTsEslintConfig = (sourceDir) => [
|
|
|
85
85
|
name: "typescript/config",
|
|
86
86
|
rules: {
|
|
87
87
|
"@typescript-eslint/array-type": ["error", { default: "array" }],
|
|
88
|
-
"@typescript-eslint/ban-ts-comment":
|
|
88
|
+
"@typescript-eslint/ban-ts-comment": [
|
|
89
|
+
"error",
|
|
90
|
+
{
|
|
91
|
+
minimumDescriptionLength: 10,
|
|
92
|
+
"ts-check": false,
|
|
93
|
+
"ts-expect-error": "allow-with-description",
|
|
94
|
+
"ts-ignore": true,
|
|
95
|
+
"ts-nocheck": true
|
|
96
|
+
}
|
|
97
|
+
],
|
|
89
98
|
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
90
99
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
91
100
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
@@ -493,6 +502,75 @@ var noSwitchConfig = [
|
|
|
493
502
|
rules: { "no-switch/no-switch": "error" }
|
|
494
503
|
}
|
|
495
504
|
];
|
|
505
|
+
var buildNoRestrictedPathsConfig = (sourceDir) => {
|
|
506
|
+
const dir = (layer) => `./${sourceDir}/${layer}`;
|
|
507
|
+
return [
|
|
508
|
+
{
|
|
509
|
+
files: [`${sourceDir}/**/!(*.test|*.stories).ts?(x)`],
|
|
510
|
+
name: "import-x/architecture-boundaries",
|
|
511
|
+
rules: {
|
|
512
|
+
"import-x/no-restricted-paths": [
|
|
513
|
+
"error",
|
|
514
|
+
{
|
|
515
|
+
zones: [
|
|
516
|
+
{
|
|
517
|
+
from: [dir("routes")],
|
|
518
|
+
message: "Pages may only be imported by routes; a page must not import a route (import direction is routes -> pages -> components).",
|
|
519
|
+
target: dir("pages")
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
from: [dir("routes"), dir("pages")],
|
|
523
|
+
message: "Reusable components must not depend on page- or route-level code (import direction is routes -> pages -> components).",
|
|
524
|
+
target: dir("components")
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
from: [dir("routes"), dir("pages"), dir("components")],
|
|
528
|
+
message: "Hooks and state sit below the UI tree; they must not import components, pages, or routes.",
|
|
529
|
+
target: [dir("hooks"), dir("state")]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
from: [
|
|
533
|
+
dir("routes"),
|
|
534
|
+
dir("pages"),
|
|
535
|
+
dir("components"),
|
|
536
|
+
dir("hooks"),
|
|
537
|
+
dir("state")
|
|
538
|
+
],
|
|
539
|
+
message: "The service/data layer sits below the UI and orchestration layers; it must not import components, pages, routes, hooks, or state.",
|
|
540
|
+
target: dir("services")
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
from: [
|
|
544
|
+
dir("routes"),
|
|
545
|
+
dir("pages"),
|
|
546
|
+
dir("components"),
|
|
547
|
+
dir("hooks"),
|
|
548
|
+
dir("state"),
|
|
549
|
+
dir("services")
|
|
550
|
+
],
|
|
551
|
+
message: "Utils are near-leaves; they may import only types and other utils.",
|
|
552
|
+
target: dir("utils")
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
from: [
|
|
556
|
+
dir("routes"),
|
|
557
|
+
dir("pages"),
|
|
558
|
+
dir("components"),
|
|
559
|
+
dir("hooks"),
|
|
560
|
+
dir("state"),
|
|
561
|
+
dir("services"),
|
|
562
|
+
dir("utils")
|
|
563
|
+
],
|
|
564
|
+
message: "Types are a pure leaf; they must not import any other app layer.",
|
|
565
|
+
target: dir("types")
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
]
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
];
|
|
573
|
+
};
|
|
496
574
|
var buildNoRelativeImportPathsConfig = (sourceDir) => [
|
|
497
575
|
{
|
|
498
576
|
name: "no-relative-import-paths",
|
|
@@ -517,6 +595,7 @@ var buildGuardrails = (sourceDir) => [
|
|
|
517
595
|
...noEnumConfig,
|
|
518
596
|
...noJsxIifeConfig,
|
|
519
597
|
...noSwitchConfig,
|
|
598
|
+
...buildNoRestrictedPathsConfig(sourceDir),
|
|
520
599
|
...buildNoRelativeImportPathsConfig(sourceDir)
|
|
521
600
|
];
|
|
522
601
|
|
|
@@ -953,7 +1032,43 @@ var testing = [
|
|
|
953
1032
|
"vitest/expect-expect": [
|
|
954
1033
|
"error",
|
|
955
1034
|
{ assertFunctionNames: ["expect", "expect*"] }
|
|
956
|
-
]
|
|
1035
|
+
],
|
|
1036
|
+
// Baseline bump: `recommended` ships no-disabled-tests at `warn`.
|
|
1037
|
+
// .skip is the single biggest gaming vector for a RED-verification
|
|
1038
|
+
// gate (it makes a failing test stop failing), so GAIA forbids it
|
|
1039
|
+
// outright. Park work with test.todo or an inline eslint-disable, not
|
|
1040
|
+
// a silent .skip.
|
|
1041
|
+
"vitest/no-disabled-tests": "error",
|
|
1042
|
+
// --- Hardening beyond the `recommended` preset ---------------------
|
|
1043
|
+
// Rule names and options verified against @vitest/eslint-plugin
|
|
1044
|
+
// v1.6.19. GAIA policy: every lint rule is `error`, never `warn`.
|
|
1045
|
+
//
|
|
1046
|
+
// Consistency: GAIA uses test() exclusively (120 vs 0 it() across the
|
|
1047
|
+
// gaia codebase). In 1.6.19 the `fn` option cascades to the
|
|
1048
|
+
// within-describe keyword, so this also governs test()/it() nested in
|
|
1049
|
+
// describe blocks. Auto-fixable.
|
|
1050
|
+
"vitest/consistent-test-it": ["error", { fn: "test" }],
|
|
1051
|
+
// Consistency: GAIA uses the `vi` mock API (37 vs 0 `vitest.` across the
|
|
1052
|
+
// gaia codebase). Auto-fixable.
|
|
1053
|
+
"vitest/consistent-vitest-vi": ["error", { fn: "vi" }],
|
|
1054
|
+
// RED-gate: a branch in a test body can assert nothing on one path.
|
|
1055
|
+
// Enable ONLY this one; `no-conditional-tests` is a byte-identical
|
|
1056
|
+
// duplicate in 1.6.19 and would double-report.
|
|
1057
|
+
"vitest/no-conditional-in-test": "error",
|
|
1058
|
+
// RED-gate: fdescribe/fit/xdescribe/xit bypass the active
|
|
1059
|
+
// no-focused-tests / no-disabled-tests rules; forbid the prefix
|
|
1060
|
+
// spellings so the focus/skip net stays airtight. Auto-fixable.
|
|
1061
|
+
"vitest/no-test-prefixes": "error",
|
|
1062
|
+
// RED-gate: a returned value/promise can resolve after the test
|
|
1063
|
+
// "passes", swallowing assertions and faking GREEN.
|
|
1064
|
+
"vitest/no-test-return-statement": "error",
|
|
1065
|
+
// RED-gate: empty test('...') stubs pass green and read as coverage;
|
|
1066
|
+
// rewrite to test.todo('...') so the gap is explicit. Contradicts
|
|
1067
|
+
// `warn-todo`, which stays off. Auto-fixable.
|
|
1068
|
+
"vitest/prefer-todo": "error",
|
|
1069
|
+
// A bare .toThrow() passes on ANY throw, masking the wrong error;
|
|
1070
|
+
// require an asserted message or matcher.
|
|
1071
|
+
"vitest/require-to-throw-message": "error"
|
|
957
1072
|
}
|
|
958
1073
|
},
|
|
959
1074
|
{
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/configs/base.ts","../src/configs/better-tailwind.ts","../src/configs/guardrails.ts","../src/plugins/no-enum.ts","../src/plugins/no-jsx-iife.ts","../src/plugins/no-switch.ts","../src/configs/ignores.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/storybook.ts","../src/configs/style-hygiene.ts","../src/configs/testing.ts","../src/index.ts"],"sourcesContent":["import eslintComments from '@eslint-community/eslint-plugin-eslint-comments';\nimport js from '@eslint/js';\nimport {configs, plugins, rules} from 'eslint-config-airbnb-extended';\nimport preferArrowFunctions from 'eslint-plugin-prefer-arrow-functions';\nimport lodashUnderscore from 'eslint-plugin-you-dont-need-lodash-underscore';\nimport type {ESLint, Linter} from 'eslint';\n\nconst jsConfig: Linter.Config[] = [\n // ESLint recommended config\n {\n name: 'js/config',\n ...js.configs.recommended,\n },\n // Stylistic plugin\n plugins.stylistic,\n // Import X plugin\n plugins.importX,\n // Airbnb base recommended config\n ...configs.base.recommended,\n // Strict import rules\n rules.base.importsStrict,\n];\n\nconst jsCustomConfig: Linter.Config[] = [\n {\n name: 'js-custom',\n rules: {\n 'consistent-return': 'off',\n curly: ['error', 'all'],\n 'max-params': 'error',\n 'no-param-reassign': 'off', // handled by sonarjs\n 'no-undef': 'off',\n 'no-unused-vars': 'off', // handled by sonarjs\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'test-files/all',\n rules: {\n 'guard-for-in': 'off',\n 'max-params': 'off',\n 'no-await-in-loop': 'off',\n 'no-plusplus': 'off',\n 'no-restricted-syntax': 'off',\n },\n },\n {\n files: ['.playwright/**/*.ts?(x)'],\n name: 'playwright/all',\n rules: {\n 'no-await-in-loop': 'off',\n 'no-restricted-syntax': 'off',\n },\n },\n];\n\nconst typescriptConfig: Linter.Config[] = [\n // TypeScript ESLint plugin\n plugins.typescriptEslint,\n // Airbnb base TypeScript config\n ...configs.base.typescript,\n // Strict TypeScript rules\n rules.typescript.typescriptEslintStrict,\n rules.typescript.stylistic,\n // Airbnb React TypeScript config\n ...configs.react.typescript,\n {\n files: ['./*.ts'],\n name: 'root-ts-files',\n rules: {\n 'global-require': 'off',\n 'no-void': 'off',\n },\n },\n {\n files: ['**/*.ts?(x)'],\n name: 'no-void',\n rules: {\n 'no-void': ['error', {allowAsStatement: true}],\n },\n },\n];\n\nconst buildTsEslintConfig = (sourceDir: string): Linter.Config[] => [\n {\n files: ['**/*.ts?(x)'],\n name: 'typescript/config',\n rules: {\n '@typescript-eslint/array-type': ['error', {default: 'array'}],\n '@typescript-eslint/ban-ts-comment': 'off',\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/consistent-type-imports': 'error',\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/method-signature-style': 'error',\n '@typescript-eslint/no-confusing-void-expression': [\n 'error',\n {ignoreArrowShorthand: true},\n ],\n '@typescript-eslint/no-floating-promises': [\n 'error',\n {ignoreIIFE: true, ignoreVoid: true},\n ],\n '@typescript-eslint/no-misused-promises': [\n 'error',\n {checksVoidReturn: false},\n ],\n '@typescript-eslint/no-non-null-assertion': 'off',\n '@typescript-eslint/no-throw-literal': 'off',\n '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',\n '@typescript-eslint/no-unnecessary-condition': 'error',\n '@typescript-eslint/no-unnecessary-type-parameters': 'off',\n '@typescript-eslint/no-unsafe-assignment': 'error',\n '@typescript-eslint/no-unsafe-return': 'error',\n '@typescript-eslint/only-throw-error': 'off',\n '@typescript-eslint/prefer-nullish-coalescing': 'error',\n '@typescript-eslint/prefer-promise-reject-errors': 'off',\n '@typescript-eslint/restrict-template-expressions': [\n 'error',\n {allowBoolean: true, allowNumber: true},\n ],\n '@typescript-eslint/return-await': 'off',\n '@typescript-eslint/unbound-method': 'off',\n },\n },\n {\n files: [\n `${sourceDir}/hooks/**/*`,\n `${sourceDir}/routes/**/*`,\n `${sourceDir}/sessions.server/**/*`,\n ],\n name: 'typescript/only-throw-error',\n rules: {\n '@typescript-eslint/only-throw-error': 'off',\n },\n },\n {\n files: [\n `${sourceDir}/utils/**`,\n `${sourceDir}/services/**`,\n `${sourceDir}/hooks/**`,\n ],\n name: 'typescript/explicit-return-types',\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'typescript/test-files',\n rules: {\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-unsafe-assignment': 'off',\n '@typescript-eslint/no-unsafe-member-access': 'off',\n },\n },\n {\n files: ['test/**/*.ts?(x)'],\n name: 'typescript/test-config',\n rules: {\n '@typescript-eslint/no-var-requires': 'off',\n 'no-plusplus': 'off',\n },\n },\n {\n files: ['**/*.d.ts'],\n name: 'typescript/type-definitions',\n rules: {\n '@typescript-eslint/consistent-type-definitions': 'off',\n '@typescript-eslint/method-signature-style': 'error',\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n];\n\nconst buildImportXConfig = (sourceDir: string): Linter.Config[] => [\n {\n name: 'import-x-all-files',\n rules: {\n 'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'],\n 'import-x/extensions': 'off',\n 'import-x/no-anonymous-default-export': [\n 'error',\n {\n allowArray: true,\n allowLiteral: true,\n allowObject: true,\n },\n ],\n 'import-x/no-namespace': 'off',\n 'import-x/no-rename-default': 'off',\n 'import-x/no-useless-path-segments': 'off',\n 'import-x/order': 'off',\n 'import-x/prefer-default-export': 'off',\n },\n },\n {\n files: ['./*.ts'],\n name: 'import-x/root-ts-files',\n rules: {\n 'import-x/no-extraneous-dependencies': 'off',\n 'import-x/no-unresolved': 'error',\n 'import-x/prefer-default-export': 'off',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'import-x/test-files',\n rules: {\n 'import-x/extensions': 'off',\n 'import-x/no-extraneous-dependencies': 'off',\n },\n },\n {\n files: [`${sourceDir}/**/!(*.test|*.stories).ts?(x)`],\n name: 'import-x/app-test-files',\n rules: {\n 'import-x/no-unresolved': 'error',\n },\n },\n {\n files: [`${sourceDir}/**/hooks/*.ts?(x)`],\n name: 'import-x/hooks',\n rules: {\n 'import-x/no-default-export': 'error',\n },\n },\n {\n files: ['test/**/*.ts?(x)'],\n name: 'import-x/test-config-files',\n rules: {\n 'import-x/no-extraneous-dependencies': 'off',\n 'import-x/prefer-default-export': 'off',\n },\n },\n {\n files: ['.storybook/**/*.ts?(x)', '.playwright/**/*.ts?(x)'],\n name: 'import-x/storybook-playwright',\n rules: {\n 'import-x/no-extraneous-dependencies': 'off',\n 'import-x/no-unresolved': 'off',\n },\n },\n];\n\nconst eslintCommentsConfig: Linter.Config[] = [\n {\n name: 'eslint-comments',\n plugins: {\n 'eslint-comments': eslintComments,\n },\n rules: {\n 'eslint-comments/disable-enable-pair': 'off',\n 'eslint-comments/no-unused-disable': 'error',\n },\n },\n];\n\nconst preferArrowFunctionsConfig: Linter.Config[] = [\n {\n name: 'prefer-arrow',\n plugins: {\n 'prefer-arrow-functions': preferArrowFunctions as unknown as ESLint.Plugin,\n },\n rules: {\n 'prefer-arrow-functions/prefer-arrow-functions': 'error',\n },\n },\n {\n // `prefer-arrow-functions` has a hardcoded exemption for named\n // default-exported declarations (`guard.js:hasNameAndIsExportedAsDefaultExport`),\n // so `export default function Foo() {}` slips through. This selector closes\n // that gap. Convert to `const Foo = () => {}; export default Foo;` instead.\n // `.d.ts` is ignored because ambient `export default function …(): T;`\n // declarations have no body to convert.\n ignores: ['**/*.d.ts'],\n name: 'prefer-arrow/no-default-exported-function',\n rules: {\n 'no-restricted-syntax': [\n 'error',\n {\n message:\n 'Use `const Name = () => {}; export default Name;` instead. The prefer-arrow-functions plugin exempts named default-exported declarations upstream.',\n selector: 'ExportDefaultDeclaration > FunctionDeclaration',\n },\n ],\n },\n },\n {\n files: ['**/*.d.ts'],\n name: 'ts-definition-files/prefer-arrow-off',\n rules: {\n 'prefer-arrow-functions/prefer-arrow-functions': 'off',\n },\n },\n];\n\nconst lodashUnderscoreConfig: Linter.Config[] = [\n {\n name: 'you-dont-need-lodash-underscore',\n plugins: {\n 'you-dont-need-lodash-underscore':\n lodashUnderscore as unknown as ESLint.Plugin,\n },\n rules: {\n ...(lodashUnderscore.configs.compatible.rules as Linter.RulesRecord),\n },\n },\n];\n\nexport const buildBase = (sourceDir: string): Linter.Config[] => [\n ...jsConfig,\n ...jsCustomConfig,\n ...typescriptConfig,\n ...buildTsEslintConfig(sourceDir),\n ...buildImportXConfig(sourceDir),\n ...eslintCommentsConfig,\n ...preferArrowFunctionsConfig,\n ...lodashUnderscoreConfig,\n];\n","import betterTailwindPlugin from 'eslint-plugin-better-tailwindcss';\nimport type {Linter} from 'eslint';\n\nexport type GaiaLintBetterTailwindOptions = {\n /** Path to the Tailwind entry CSS file (e.g. './app/styles/tailwind.css'). */\n entryPoint: string;\n /** Class names to ignore in `better-tailwindcss/no-unknown-classes`. */\n ignore?: string[];\n};\n\n/**\n * Better-Tailwind flat-config factory.\n *\n * Ports `betterTailwindConfig` from GAIA's `eslint.config.mjs`. The\n * `entryPoint` (consumer's Tailwind CSS entry) and `ignore` list are\n * project-specific, so this is shipped as a factory rather than a static\n * array.\n */\nexport const betterTailwind = (\n opts: GaiaLintBetterTailwindOptions,\n): Linter.Config[] => [\n {\n name: 'better-tailwindcss',\n plugins: {\n 'better-tailwindcss': betterTailwindPlugin,\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': 'error',\n 'better-tailwindcss/enforce-consistent-important-position': 'error',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'error',\n 'better-tailwindcss/enforce-shorthand-classes': 'error',\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-unknown-classes': [\n 'error',\n {ignore: opts.ignore ?? []},\n ],\n },\n settings: {\n 'better-tailwindcss': {\n detectComponentClasses: true,\n entryPoint: opts.entryPoint,\n },\n },\n },\n];\n","import type {Linter} from 'eslint';\nimport noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';\nimport sonarjs from 'eslint-plugin-sonarjs';\nimport noEnumPlugin from '../plugins/no-enum.js';\nimport noJsxIifePlugin from '../plugins/no-jsx-iife.js';\nimport noSwitchPlugin from '../plugins/no-switch.js';\n\nconst buildSonarConfig = (sourceDir: string): Linter.Config[] => [\n sonarjs.configs!.recommended as Linter.Config,\n {\n name: 'sonarjs',\n rules: {\n 'sonarjs/cognitive-complexity': 'error',\n 'sonarjs/fixme-tag': 'off',\n 'sonarjs/no-commented-code': 'off',\n 'sonarjs/no-nested-conditional': 'off',\n 'sonarjs/no-nested-functions': 'off',\n 'sonarjs/no-selector-parameter': 'off',\n 'sonarjs/regex-complexity': 'off',\n 'sonarjs/todo-tag': 'off',\n },\n },\n {\n files: ['**/*.tsx', '**/hooks/*.ts?(x)'],\n name: 'sonarjs/react-files',\n rules: {\n 'sonarjs/cognitive-complexity': 'off',\n 'sonarjs/function-return-type': 'off',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'sonarjs/test-files',\n rules: {\n 'sonarjs/no-duplicate-string': 'off',\n 'sonarjs/no-identical-functions': 'off',\n },\n },\n {\n files: [`${sourceDir}/languages/**/*.ts`, 'eslint.config.mjs'],\n name: 'sonarjs/credential-checks',\n rules: {\n 'sonarjs/no-hardcoded-credentials': 'off',\n 'sonarjs/no-hardcoded-passwords': 'off',\n },\n },\n];\n\nconst noEnumConfig: Linter.Config[] = [\n {\n files: ['**/*.ts?(x)'],\n name: 'no-enum',\n plugins: {'no-enum': noEnumPlugin},\n rules: {\n 'no-enum/no-enum': 'error',\n },\n },\n];\n\nconst noJsxIifeConfig: Linter.Config[] = [\n {\n files: ['**/*.tsx', '**/*.jsx'],\n name: 'no-jsx-iife',\n plugins: {'no-jsx-iife': noJsxIifePlugin},\n rules: {'no-jsx-iife/no-jsx-iife': 'error'},\n },\n];\n\nconst noSwitchConfig: Linter.Config[] = [\n {\n files: ['**/*.ts?(x)', '**/*.js?(x)'],\n name: 'no-switch',\n plugins: {'no-switch': noSwitchPlugin},\n rules: {'no-switch/no-switch': 'error'},\n },\n];\n\nconst buildNoRelativeImportPathsConfig = (\n sourceDir: string,\n): Linter.Config[] => [\n {\n name: 'no-relative-import-paths',\n plugins: {\n 'no-relative-import-paths': noRelativeImportPaths,\n },\n rules: {\n 'no-relative-import-paths/no-relative-import-paths': [\n 'error',\n {\n allowedDepth: 2,\n allowSameFolder: true,\n prefix: '~',\n rootDir: sourceDir,\n },\n ],\n },\n },\n];\n\nexport const buildGuardrails = (sourceDir: string): Linter.Config[] => [\n ...buildSonarConfig(sourceDir),\n ...noEnumConfig,\n ...noJsxIifeConfig,\n ...noSwitchConfig,\n ...buildNoRelativeImportPathsConfig(sourceDir),\n];\n","import type {ESLint, Rule} from 'eslint';\n\nconst noEnumRule: Rule.RuleModule = {\n create: (context) => ({\n TSEnumDeclaration: (node: Rule.Node) => {\n context.report({messageId: 'noEnum', node});\n },\n }),\n meta: {\n docs: {description: 'Disallow TypeScript enums'},\n messages: {\n noEnum:\n 'Do not use TypeScript enums. Use an object with `as const` instead.',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: 'no-enum',\n version: '0.1.0',\n },\n rules: {\n 'no-enum': noEnumRule,\n },\n};\n\nexport default plugin;\n","import type {ESLint, Rule} from 'eslint';\n\nconst noJsxIifeRule: Rule.RuleModule = {\n create: (context) => ({\n 'JSXExpressionContainer > CallExpression > ArrowFunctionExpression.callee':\n (node: Rule.Node) => {\n context.report({messageId: 'noJsxIife', node});\n },\n 'JSXExpressionContainer > CallExpression > FunctionExpression.callee': (\n node: Rule.Node,\n ) => {\n context.report({messageId: 'noJsxIife', node});\n },\n }),\n meta: {\n docs: {description: 'Disallow IIFEs in JSX expressions'},\n messages: {\n noJsxIife:\n 'Do not use IIFEs in JSX. Use a computed variable before the return or extract a component instead.',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: 'no-jsx-iife',\n version: '0.1.0',\n },\n rules: {\n 'no-jsx-iife': noJsxIifeRule,\n },\n};\n\nexport default plugin;\n","import type {ESLint, Rule} from 'eslint';\n\nconst noSwitchRule: Rule.RuleModule = {\n create: (context) => ({\n SwitchStatement: (node: Rule.Node) => {\n context.report({messageId: 'noSwitch', node});\n },\n }),\n meta: {\n docs: {description: 'Disallow switch statements'},\n messages: {\n noSwitch:\n 'Do not use switch statements. Use an object map or if/else instead.',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: 'no-switch',\n version: '0.1.0',\n },\n rules: {\n 'no-switch': noSwitchRule,\n },\n};\n\nexport default plugin;\n","import {includeIgnoreFile} from '@eslint/config-helpers';\nimport type {Linter} from 'eslint';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nexport type GaiaLintIgnoresOptions = {\n /**\n * Path to a `.gitignore` file to merge in. Resolved from `process.cwd()`\n * if relative. Pass `false` to skip the gitignore merge entirely.\n *\n * If the resolved path does not exist, the merge is silently skipped —\n * projects without a `.gitignore` don't need to opt out explicitly.\n *\n * @default '.gitignore'\n */\n gitignore?: string | false;\n /** Extra ignore globs to merge with GAIA defaults. */\n extra?: string[];\n};\n\n/**\n * GAIA's default ignore globs — matches the static `ignored-files` block in\n * GAIA's `eslint.config.mjs`. Consumer's `extra` ignores get concatenated\n * onto this list.\n */\nconst defaultIgnores = [\n '.storybook',\n '.playwright',\n '/.react-router/**',\n '.claude/**/*.js',\n '.claude/**/*.cjs',\n 'scripts',\n 'public/**',\n '**/*.css',\n '**/*.svg',\n '**/*.md',\n];\n\n/**\n * Ignores flat-config factory.\n *\n * Ports the `includeIgnoreFile(gitignorePath)` + static `ignored-files`\n * block from GAIA's `eslint.config.mjs`. The `gitignore` path must be\n * resolved at the consumer's cwd (config-load time), not at gaia-lint's\n * install location, so this is shipped as a factory.\n */\nexport const ignores = (opts?: GaiaLintIgnoresOptions): Linter.Config[] => {\n const out: Linter.Config[] = [];\n\n const gitignore = opts?.gitignore ?? '.gitignore';\n if (gitignore !== false) {\n const resolved = path.isAbsolute(gitignore)\n ? gitignore\n : path.resolve(process.cwd(), gitignore);\n if (fs.existsSync(resolved)) {\n out.push(includeIgnoreFile(resolved) as Linter.Config);\n }\n }\n\n out.push({\n ignores: [...defaultIgnores, ...(opts?.extra ?? [])],\n name: 'ignored-files',\n });\n\n return out;\n};\n","import playwrightPlugin from 'eslint-plugin-playwright';\nimport type {Linter} from 'eslint';\n\n/**\n * Playwright flat-config block.\n *\n * Ports `playwrightConfig` from GAIA's `eslint.config.mjs` — scopes\n * `eslint-plugin-playwright`'s `flat/recommended` config to `.playwright/`\n * test files (GAIA's e2e directory convention).\n */\nexport const playwright: Linter.Config[] = [\n {\n name: 'playwright',\n ...(playwrightPlugin.configs['flat/recommended'] as Linter.Config),\n files: ['.playwright/**/*.ts?(x)'],\n rules: {\n ...playwrightPlugin.configs['flat/recommended'].rules,\n 'playwright/expect-expect': [\n 'warn',\n {assertFunctionPatterns: ['^expect[A-Z]']},\n ],\n },\n },\n];\n","import {rules as prettierConfigRules} from 'eslint-config-prettier';\nimport prettierPlugin from 'eslint-plugin-prettier';\nimport type {Linter} from 'eslint';\n\n/**\n * Prettier flat-config block.\n *\n * Ports `prettierConfig` from GAIA's `eslint.config.mjs`. Layers\n * `eslint-config-prettier`'s rule disablers, then re-enables a few\n * `@stylistic/*` rules GAIA wants to keep (padding lines, single quotes),\n * and finally turns on the `prettier/prettier` rule itself.\n */\nexport const prettier: Linter.Config[] = [\n {\n name: 'prettier/plugin/config',\n plugins: {prettier: prettierPlugin},\n },\n {\n name: 'prettier/config',\n rules: {\n ...prettierConfigRules,\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: ['block-like', 'export', 'return', 'throw'],\n prev: '*',\n },\n ],\n '@stylistic/quotes': [\n 'error',\n 'single',\n {\n allowTemplateLiterals: 'avoidEscape',\n avoidEscape: true,\n },\n ],\n '@stylistic/spaced-comment': 'off',\n 'prettier/prettier': ['error', {endOfLine: 'auto'}],\n },\n },\n];\n","import {configs, plugins} from 'eslint-config-airbnb-extended';\nimport type {Linter} from 'eslint';\n\n/**\n * React flat-config block.\n *\n * Ports `reactConfig` + `reactCustomConfig` from GAIA's `eslint.config.mjs`.\n * Pulls React, React Hooks, and JSX A11y plugins plus Airbnb's recommended\n * React config, then layers GAIA's project-wide React rule overrides.\n *\n * The `react-router/routes` override targets `**\\/routes/**\\/*.tsx` — a GAIA\n * convention that's harmless for consumers without that folder structure\n * (the override only fires when files match).\n */\nexport const react: Linter.Config[] = [\n // React plugin\n plugins.react,\n // React hooks plugin\n plugins.reactHooks,\n // React JSX A11y plugin\n plugins.reactA11y,\n // Airbnb React recommended config\n ...configs.react.recommended,\n {\n name: 'react-custom',\n rules: {\n 'jsx-a11y/control-has-associated-label': 'off',\n 'jsx-a11y/no-autofocus': 'off',\n 'react/boolean-prop-naming': [\n 'error',\n {\n propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'],\n rule: '^((can|has|hide|is|show)[A-Z]([A-Za-z0-9]?)+|(checked|disabled|hide|required|show))',\n },\n ],\n 'react/function-component-definition': 'off',\n 'react/jsx-boolean-value': ['error', 'always'],\n 'react/jsx-curly-brace-presence': 'error',\n 'react/jsx-filename-extension': 'off',\n 'react/jsx-fragments': 'error',\n // off by default because it doesn't handle props onXyz function names correctly\n // turn this on from time to time to check for misnamed handlers elsewhere\n 'react/jsx-handler-names': ['off', {checkLocalVariables: true}],\n 'react/jsx-newline': ['error', {prevent: true}],\n 'react/jsx-no-useless-fragment': ['error', {allowExpressions: true}],\n 'react/no-children-prop': 'off',\n 'react/no-danger': 'off',\n 'react/prop-types': 'off',\n 'react/react-in-jsx-scope': 'off',\n 'react/require-default-props': 'off',\n },\n },\n {\n files: ['**/routes/**/*.tsx'],\n name: 'react-router/routes',\n rules: {\n 'no-empty-pattern': 'off',\n 'react/display-name': 'off',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'react/test-files',\n rules: {\n 'react/jsx-props-no-spreading': 'off',\n },\n },\n];\n","import storybookPlugin from 'eslint-plugin-storybook';\nimport type {Linter} from 'eslint';\n\n/**\n * Storybook flat-config block.\n *\n * Ports `storybookConfig` from GAIA's `eslint.config.mjs` — applies the\n * official `flat/recommended` config from `eslint-plugin-storybook`.\n */\nexport const storybook: Linter.Config[] = [\n ...(storybookPlugin.configs['flat/recommended'] as Linter.Config[]),\n];\n","import type {Linter} from 'eslint';\nimport canonical from 'eslint-plugin-canonical';\nimport checkFile from 'eslint-plugin-check-file';\nimport perfectionist from 'eslint-plugin-perfectionist';\nimport unicorn from 'eslint-plugin-unicorn';\nimport unusedImports from 'eslint-plugin-unused-imports';\n\nconst buildCanonicalConfig = (sourceDir: string): Linter.Config[] => [\n canonical.configs['flat/recommended'] as Linter.Config,\n {\n name: 'canonical',\n rules: {\n 'canonical/destructuring-property-newline': 'off',\n 'canonical/filename-match-exported': 'error',\n 'canonical/id-match': 'off',\n 'canonical/import-specifier-newline': 'off',\n },\n },\n {\n files: ['**/*.tsx', '**/hooks/*.ts?(x)'],\n name: 'canonical/sort-react-dependencies',\n rules: {\n 'canonical/sort-react-dependencies': 'error',\n },\n },\n {\n files: [\n `${sourceDir}/root.tsx`,\n `${sourceDir}/entry.server.tsx`,\n `${sourceDir}/**/tests/*`,\n 'test/**/*.ts?(x)',\n '**/*.stories.tsx',\n '**/routes/**/*.tsx',\n '**/hooks/*.ts?(x)',\n '.storybook/**/*.ts?(x)',\n '.playwright/**/*.ts?(x)',\n ],\n name: 'canonical/filename-match-exported-disabled',\n rules: {\n 'canonical/filename-match-exported': 'off',\n },\n },\n];\n\nconst perfectionistConfig: Linter.Config[] = [\n perfectionist.configs['recommended-natural'] as Linter.Config,\n {\n name: 'perfectionist',\n rules: {\n 'perfectionist/sort-imports': [\n 'error',\n {\n customGroups: [\n {\n elementNamePattern: '^react$',\n groupName: 'react-type',\n selector: 'type',\n },\n {\n elementNamePattern: '^react$',\n groupName: 'react',\n },\n {\n elementNamePattern: '^react-.+',\n groupName: 'react-other-type',\n selector: 'type',\n },\n {\n elementNamePattern: '^react-.+',\n groupName: 'react-other',\n },\n ],\n groups: [\n 'react-type',\n 'react',\n 'react-other-type',\n 'react-other',\n ['type-external', 'external'],\n ['type-builtin', 'builtin'],\n ['type-internal', 'internal'],\n ['type-parent', 'parent'],\n ['type-sibling', 'sibling'],\n ['type-index', 'index'],\n 'unknown',\n 'style',\n 'side-effect',\n 'side-effect-style',\n ],\n newlinesBetween: 0,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-jsx-props': [\n 'error',\n {\n customGroups: [\n {\n elementNamePattern: ['^key$', '^ref$'],\n groupName: 'reserved',\n },\n ],\n groups: ['reserved'],\n type: 'natural',\n },\n ],\n },\n },\n];\n\nconst unicornConfig: Linter.Config[] = [\n unicorn.configs.recommended as Linter.Config,\n {\n name: 'unicorn',\n rules: {\n 'unicorn/consistent-destructuring': 'error',\n 'unicorn/consistent-template-literal-escape': 'off',\n 'unicorn/filename-case': 'off',\n 'unicorn/new-for-builtins': 'off',\n 'unicorn/no-array-callback-reference': 'off',\n 'unicorn/no-array-for-each': 'off',\n 'unicorn/no-array-reduce': 'off',\n 'unicorn/no-nested-ternary': 'off',\n 'unicorn/no-null': 'off',\n 'unicorn/no-useless-undefined': 'off',\n 'unicorn/prefer-export-from': 'off',\n 'unicorn/prefer-global-this': 'off',\n 'unicorn/prefer-set-has': 'off',\n 'unicorn/prefer-switch': 'off',\n 'unicorn/prefer-ternary': 'off',\n 'unicorn/prevent-abbreviations': [\n 'error',\n {\n ignore: [\n 'acc',\n 'ctx',\n 'e2e',\n 'env',\n 'obj',\n 'prev',\n 'req',\n 'res',\n /args/i,\n /fn/i,\n /param/i,\n /params/i,\n /props/i,\n /ref/i,\n /src/i,\n /utils/i,\n ],\n },\n ],\n 'unicorn/text-encoding-identifier-case': 'off',\n },\n },\n {\n files: ['./*.ts'],\n name: 'unicorn/root-ts-files',\n rules: {\n 'unicorn/prefer-module': 'off',\n 'unicorn/prevent-abbreviations': 'off',\n },\n },\n];\n\nconst unusedImportsConfig: Linter.Config[] = [\n {\n name: 'unused-imports',\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n '@typescript-eslint/no-unused-vars': 'off',\n 'no-unused-vars': 'off',\n 'sonarjs/no-unused-vars': 'off',\n 'sonarjs/unused-import': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^_',\n ignoreRestSiblings: true,\n vars: 'all',\n varsIgnorePattern: '^_',\n },\n ],\n },\n },\n {\n files: ['**/*.d.ts'],\n name: 'unused-imports/ts-definition-files',\n rules: {\n 'unused-imports/no-unused-vars': 'off',\n },\n },\n];\n\nconst buildCheckFileConfig = (sourceDir: string): Linter.Config[] => [\n {\n plugins: {\n 'check-file': checkFile,\n },\n },\n {\n files: [`${sourceDir}/**/*`],\n name: 'check-file',\n rules: {\n 'check-file/filename-naming-convention': [\n 'error',\n {\n // React hook files must be camelCase (to match the hook name)\n '**/hooks/*.{ts,tsx}': 'CAMEL_CASE',\n [`${sourceDir}/state/*.tsx`]: 'KEBAB_CASE',\n // React component files must be named index.tsx\n [`${sourceDir}/{components,pages}/**/!(assets|hooks|state|tests|utils)/*.tsx`]:\n 'index+()',\n // Generally, non-component files must be named kebab-case\n [`${sourceDir}/{components,pages}/**/!(hooks)/*.ts`]: 'KEBAB_CASE',\n // Non-component files inside specific components folders must be kebab-case\n [`${sourceDir}/{components,pages}/**/(assets|state|tests|utils)/*.{ts,tsx}`]:\n 'KEBAB_CASE',\n 'test/**/*.ts?(x)': 'KEBAB_CASE',\n },\n {\n ignoreMiddleExtensions: true,\n },\n ],\n 'check-file/folder-match-with-fex': [\n 'error',\n {\n // require stories and test files to be inside tests folders\n '*.(stories|test).{ts,tsx}': `${sourceDir}/**/tests/`,\n },\n ],\n 'check-file/folder-naming-convention': [\n 'error',\n {\n // enforce PascalCase component folders, and allow assets, hooks, tests, and utils subfolders\n [`${sourceDir}/components/**/`]:\n '(assets|hooks|state|tests|utils|[A-Z][a-zA-Z0-9]*)',\n },\n ],\n },\n },\n {\n files: ['test/**/*.*'],\n name: 'check-file/test-files',\n rules: {\n 'check-file/filename-naming-convention': [\n 'error',\n {\n 'test/**/*.ts?(x)': 'KEBAB_CASE',\n },\n {\n ignoreMiddleExtensions: true,\n },\n ],\n },\n },\n];\n\nexport const buildStyleHygiene = (sourceDir: string): Linter.Config[] => [\n ...buildCanonicalConfig(sourceDir),\n ...perfectionistConfig,\n ...unicornConfig,\n ...unusedImportsConfig,\n ...buildCheckFileConfig(sourceDir),\n];\n","import vitest from '@vitest/eslint-plugin';\nimport jestDom from 'eslint-plugin-jest-dom';\nimport testingLibrary from 'eslint-plugin-testing-library';\nimport type {Linter} from 'eslint';\n\n/**\n * Testing flat-config block.\n *\n * Ports `testHarnessConfig` + `testingLibraryConfig` from GAIA's\n * `eslint.config.mjs`. Wires up Vitest, jest-dom, and Testing Library\n * recommended rules across test/story/test-harness files.\n */\nexport const testing: Linter.Config[] = [\n {\n files: [\n '**/*.test.ts?(x)',\n '**/*.stories.ts?(x)',\n 'test/**/*.ts?(x)',\n ],\n name: 'vitest',\n plugins: {\n 'jest-dom': jestDom,\n vitest,\n },\n rules: {\n ...jestDom.configs['flat/recommended'].rules,\n ...vitest.configs.recommended.rules,\n 'import-x/no-useless-path-segments': [\n 'error',\n {noUselessIndex: true},\n ],\n 'vitest/expect-expect': [\n 'error',\n {assertFunctionNames: ['expect', 'expect*']},\n ],\n },\n },\n {\n ...testingLibrary.configs['flat/react'],\n files: ['**/*.test.ts?(x)'],\n name: 'testing-library',\n },\n];\n","import type {Linter} from 'eslint';\nimport {buildBase} from './configs/base.js';\nimport {\n betterTailwind,\n type GaiaLintBetterTailwindOptions,\n} from './configs/better-tailwind.js';\nimport {buildGuardrails} from './configs/guardrails.js';\nimport {ignores, type GaiaLintIgnoresOptions} from './configs/ignores.js';\nimport {playwright} from './configs/playwright.js';\nimport {prettier} from './configs/prettier.js';\nimport {react} from './configs/react.js';\nimport {storybook} from './configs/storybook.js';\nimport {buildStyleHygiene} from './configs/style-hygiene.js';\nimport {testing} from './configs/testing.js';\n\nexport type {GaiaLintBetterTailwindOptions, GaiaLintIgnoresOptions};\n\nexport type GaiaLintOptions = {\n /**\n * Application source directory (relative to project root). Used to scope\n * file-path-based rules — filename conventions, hook-folder scoping,\n * `no-relative-import-paths` root, etc.\n *\n * @default 'app'\n */\n sourceDir?: string;\n};\n\n/**\n * Dual-shape `ignores` accessor. Spread it directly for the default\n * configuration (`...lint.ignores`) or call it to override\n * (`...lint.ignores({extra: ['coverage/**']})`).\n */\nexport type GaiaLintIgnores = ((\n opts?: GaiaLintIgnoresOptions,\n) => Linter.Config[]) &\n Iterable<Linter.Config>;\n\nexport type GaiaLintBundle = {\n base: Linter.Config[];\n betterTailwind: (opts: GaiaLintBetterTailwindOptions) => Linter.Config[];\n guardrails: Linter.Config[];\n ignores: GaiaLintIgnores;\n playwright: Linter.Config[];\n prettier: Linter.Config[];\n react: Linter.Config[];\n storybook: Linter.Config[];\n styleHygiene: Linter.Config[];\n testing: Linter.Config[];\n};\n\nconst buildIgnoresAccessor = (): GaiaLintIgnores => {\n const defaults = ignores();\n const accessor = ((opts?: GaiaLintIgnoresOptions) => ignores(opts)) as\n | ((opts?: GaiaLintIgnoresOptions) => Linter.Config[]) &\n Iterable<Linter.Config> & {[Symbol.iterator]?: () => Iterator<Linter.Config>};\n accessor[Symbol.iterator] = () => defaults[Symbol.iterator]();\n return accessor as GaiaLintIgnores;\n};\n\n/**\n * GAIA lint configuration factory.\n *\n * Call once at the top of your `eslint.config.mjs` to bind a `sourceDir`,\n * then spread the returned configs into `defineConfig`. Defaults to GAIA's\n * `'app'` layout; pass `{sourceDir: 'src'}` (or any other value) for\n * projects that store source elsewhere.\n *\n * @example\n * const lint = gaiaLint(); // GAIA / app/\n * const lint = gaiaLint({sourceDir: 'src'}); // src/\n */\nconst gaiaLint = (opts?: GaiaLintOptions): GaiaLintBundle => {\n const sourceDir = opts?.sourceDir ?? 'app';\n return {\n base: buildBase(sourceDir),\n betterTailwind,\n guardrails: buildGuardrails(sourceDir),\n ignores: buildIgnoresAccessor(),\n playwright,\n prettier,\n react,\n storybook,\n styleHygiene: buildStyleHygiene(sourceDir),\n testing,\n };\n};\n\nexport default gaiaLint;\n"],"mappings":";AAAA,OAAO,oBAAoB;AAC3B,OAAO,QAAQ;AACf,SAAQ,SAAS,SAAS,aAAY;AACtC,OAAO,0BAA0B;AACjC,OAAO,sBAAsB;AAG7B,IAAM,WAA4B;AAAA;AAAA,EAEhC;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["plugin","plugin","configs","plugins"]}
|
|
1
|
+
{"version":3,"sources":["../src/configs/base.ts","../src/configs/better-tailwind.ts","../src/configs/guardrails.ts","../src/plugins/no-enum.ts","../src/plugins/no-jsx-iife.ts","../src/plugins/no-switch.ts","../src/configs/ignores.ts","../src/configs/playwright.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/storybook.ts","../src/configs/style-hygiene.ts","../src/configs/testing.ts","../src/index.ts"],"sourcesContent":["import eslintComments from '@eslint-community/eslint-plugin-eslint-comments';\nimport js from '@eslint/js';\nimport {configs, plugins, rules} from 'eslint-config-airbnb-extended';\nimport preferArrowFunctions from 'eslint-plugin-prefer-arrow-functions';\nimport lodashUnderscore from 'eslint-plugin-you-dont-need-lodash-underscore';\nimport type {ESLint, Linter} from 'eslint';\n\nconst jsConfig: Linter.Config[] = [\n // ESLint recommended config\n {\n name: 'js/config',\n ...js.configs.recommended,\n },\n // Stylistic plugin\n plugins.stylistic,\n // Import X plugin\n plugins.importX,\n // Airbnb base recommended config\n ...configs.base.recommended,\n // Strict import rules\n rules.base.importsStrict,\n];\n\nconst jsCustomConfig: Linter.Config[] = [\n {\n name: 'js-custom',\n rules: {\n 'consistent-return': 'off',\n curly: ['error', 'all'],\n 'max-params': 'error',\n 'no-param-reassign': 'off', // handled by sonarjs\n 'no-undef': 'off',\n 'no-unused-vars': 'off', // handled by sonarjs\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'test-files/all',\n rules: {\n 'guard-for-in': 'off',\n 'max-params': 'off',\n 'no-await-in-loop': 'off',\n 'no-plusplus': 'off',\n 'no-restricted-syntax': 'off',\n },\n },\n {\n files: ['.playwright/**/*.ts?(x)'],\n name: 'playwright/all',\n rules: {\n 'no-await-in-loop': 'off',\n 'no-restricted-syntax': 'off',\n },\n },\n];\n\nconst typescriptConfig: Linter.Config[] = [\n // TypeScript ESLint plugin\n plugins.typescriptEslint,\n // Airbnb base TypeScript config\n ...configs.base.typescript,\n // Strict TypeScript rules\n rules.typescript.typescriptEslintStrict,\n rules.typescript.stylistic,\n // Airbnb React TypeScript config\n ...configs.react.typescript,\n {\n files: ['./*.ts'],\n name: 'root-ts-files',\n rules: {\n 'global-require': 'off',\n 'no-void': 'off',\n },\n },\n {\n files: ['**/*.ts?(x)'],\n name: 'no-void',\n rules: {\n 'no-void': ['error', {allowAsStatement: true}],\n },\n },\n];\n\nconst buildTsEslintConfig = (sourceDir: string): Linter.Config[] => [\n {\n files: ['**/*.ts?(x)'],\n name: 'typescript/config',\n rules: {\n '@typescript-eslint/array-type': ['error', {default: 'array'}],\n '@typescript-eslint/ban-ts-comment': [\n 'error',\n {\n minimumDescriptionLength: 10,\n 'ts-check': false,\n 'ts-expect-error': 'allow-with-description',\n 'ts-ignore': true,\n 'ts-nocheck': true,\n },\n ],\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/consistent-type-imports': 'error',\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/method-signature-style': 'error',\n '@typescript-eslint/no-confusing-void-expression': [\n 'error',\n {ignoreArrowShorthand: true},\n ],\n '@typescript-eslint/no-floating-promises': [\n 'error',\n {ignoreIIFE: true, ignoreVoid: true},\n ],\n '@typescript-eslint/no-misused-promises': [\n 'error',\n {checksVoidReturn: false},\n ],\n '@typescript-eslint/no-non-null-assertion': 'off',\n '@typescript-eslint/no-throw-literal': 'off',\n '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',\n '@typescript-eslint/no-unnecessary-condition': 'error',\n '@typescript-eslint/no-unnecessary-type-parameters': 'off',\n '@typescript-eslint/no-unsafe-assignment': 'error',\n '@typescript-eslint/no-unsafe-return': 'error',\n '@typescript-eslint/only-throw-error': 'off',\n '@typescript-eslint/prefer-nullish-coalescing': 'error',\n '@typescript-eslint/prefer-promise-reject-errors': 'off',\n '@typescript-eslint/restrict-template-expressions': [\n 'error',\n {allowBoolean: true, allowNumber: true},\n ],\n '@typescript-eslint/return-await': 'off',\n '@typescript-eslint/unbound-method': 'off',\n },\n },\n {\n files: [\n `${sourceDir}/hooks/**/*`,\n `${sourceDir}/routes/**/*`,\n `${sourceDir}/sessions.server/**/*`,\n ],\n name: 'typescript/only-throw-error',\n rules: {\n '@typescript-eslint/only-throw-error': 'off',\n },\n },\n {\n files: [\n `${sourceDir}/utils/**`,\n `${sourceDir}/services/**`,\n `${sourceDir}/hooks/**`,\n ],\n name: 'typescript/explicit-return-types',\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'typescript/test-files',\n rules: {\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-unsafe-assignment': 'off',\n '@typescript-eslint/no-unsafe-member-access': 'off',\n },\n },\n {\n files: ['test/**/*.ts?(x)'],\n name: 'typescript/test-config',\n rules: {\n '@typescript-eslint/no-var-requires': 'off',\n 'no-plusplus': 'off',\n },\n },\n {\n files: ['**/*.d.ts'],\n name: 'typescript/type-definitions',\n rules: {\n '@typescript-eslint/consistent-type-definitions': 'off',\n '@typescript-eslint/method-signature-style': 'error',\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n];\n\nconst buildImportXConfig = (sourceDir: string): Linter.Config[] => [\n {\n name: 'import-x-all-files',\n rules: {\n 'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'],\n 'import-x/extensions': 'off',\n 'import-x/no-anonymous-default-export': [\n 'error',\n {\n allowArray: true,\n allowLiteral: true,\n allowObject: true,\n },\n ],\n 'import-x/no-namespace': 'off',\n 'import-x/no-rename-default': 'off',\n 'import-x/no-useless-path-segments': 'off',\n 'import-x/order': 'off',\n 'import-x/prefer-default-export': 'off',\n },\n },\n {\n files: ['./*.ts'],\n name: 'import-x/root-ts-files',\n rules: {\n 'import-x/no-extraneous-dependencies': 'off',\n 'import-x/no-unresolved': 'error',\n 'import-x/prefer-default-export': 'off',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'import-x/test-files',\n rules: {\n 'import-x/extensions': 'off',\n 'import-x/no-extraneous-dependencies': 'off',\n },\n },\n {\n files: [`${sourceDir}/**/!(*.test|*.stories).ts?(x)`],\n name: 'import-x/app-test-files',\n rules: {\n 'import-x/no-unresolved': 'error',\n },\n },\n {\n files: [`${sourceDir}/**/hooks/*.ts?(x)`],\n name: 'import-x/hooks',\n rules: {\n 'import-x/no-default-export': 'error',\n },\n },\n {\n files: ['test/**/*.ts?(x)'],\n name: 'import-x/test-config-files',\n rules: {\n 'import-x/no-extraneous-dependencies': 'off',\n 'import-x/prefer-default-export': 'off',\n },\n },\n {\n files: ['.storybook/**/*.ts?(x)', '.playwright/**/*.ts?(x)'],\n name: 'import-x/storybook-playwright',\n rules: {\n 'import-x/no-extraneous-dependencies': 'off',\n 'import-x/no-unresolved': 'off',\n },\n },\n];\n\nconst eslintCommentsConfig: Linter.Config[] = [\n {\n name: 'eslint-comments',\n plugins: {\n 'eslint-comments': eslintComments,\n },\n rules: {\n 'eslint-comments/disable-enable-pair': 'off',\n 'eslint-comments/no-unused-disable': 'error',\n },\n },\n];\n\nconst preferArrowFunctionsConfig: Linter.Config[] = [\n {\n name: 'prefer-arrow',\n plugins: {\n 'prefer-arrow-functions': preferArrowFunctions as unknown as ESLint.Plugin,\n },\n rules: {\n 'prefer-arrow-functions/prefer-arrow-functions': 'error',\n },\n },\n {\n // `prefer-arrow-functions` has a hardcoded exemption for named\n // default-exported declarations (`guard.js:hasNameAndIsExportedAsDefaultExport`),\n // so `export default function Foo() {}` slips through. This selector closes\n // that gap. Convert to `const Foo = () => {}; export default Foo;` instead.\n // `.d.ts` is ignored because ambient `export default function …(): T;`\n // declarations have no body to convert.\n ignores: ['**/*.d.ts'],\n name: 'prefer-arrow/no-default-exported-function',\n rules: {\n 'no-restricted-syntax': [\n 'error',\n {\n message:\n 'Use `const Name = () => {}; export default Name;` instead. The prefer-arrow-functions plugin exempts named default-exported declarations upstream.',\n selector: 'ExportDefaultDeclaration > FunctionDeclaration',\n },\n ],\n },\n },\n {\n files: ['**/*.d.ts'],\n name: 'ts-definition-files/prefer-arrow-off',\n rules: {\n 'prefer-arrow-functions/prefer-arrow-functions': 'off',\n },\n },\n];\n\nconst lodashUnderscoreConfig: Linter.Config[] = [\n {\n name: 'you-dont-need-lodash-underscore',\n plugins: {\n 'you-dont-need-lodash-underscore':\n lodashUnderscore as unknown as ESLint.Plugin,\n },\n rules: {\n ...(lodashUnderscore.configs.compatible.rules as Linter.RulesRecord),\n },\n },\n];\n\nexport const buildBase = (sourceDir: string): Linter.Config[] => [\n ...jsConfig,\n ...jsCustomConfig,\n ...typescriptConfig,\n ...buildTsEslintConfig(sourceDir),\n ...buildImportXConfig(sourceDir),\n ...eslintCommentsConfig,\n ...preferArrowFunctionsConfig,\n ...lodashUnderscoreConfig,\n];\n","import betterTailwindPlugin from 'eslint-plugin-better-tailwindcss';\nimport type {Linter} from 'eslint';\n\nexport type GaiaLintBetterTailwindOptions = {\n /** Path to the Tailwind entry CSS file (e.g. './app/styles/tailwind.css'). */\n entryPoint: string;\n /** Class names to ignore in `better-tailwindcss/no-unknown-classes`. */\n ignore?: string[];\n};\n\n/**\n * Better-Tailwind flat-config factory.\n *\n * Ports `betterTailwindConfig` from GAIA's `eslint.config.mjs`. The\n * `entryPoint` (consumer's Tailwind CSS entry) and `ignore` list are\n * project-specific, so this is shipped as a factory rather than a static\n * array.\n */\nexport const betterTailwind = (\n opts: GaiaLintBetterTailwindOptions,\n): Linter.Config[] => [\n {\n name: 'better-tailwindcss',\n plugins: {\n 'better-tailwindcss': betterTailwindPlugin,\n },\n rules: {\n 'better-tailwindcss/enforce-canonical-classes': 'error',\n 'better-tailwindcss/enforce-consistent-important-position': 'error',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'error',\n 'better-tailwindcss/enforce-shorthand-classes': 'error',\n 'better-tailwindcss/no-conflicting-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'error',\n 'better-tailwindcss/no-unknown-classes': [\n 'error',\n {ignore: opts.ignore ?? []},\n ],\n },\n settings: {\n 'better-tailwindcss': {\n detectComponentClasses: true,\n entryPoint: opts.entryPoint,\n },\n },\n },\n];\n","import type {Linter} from 'eslint';\nimport noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';\nimport sonarjs from 'eslint-plugin-sonarjs';\nimport noEnumPlugin from '../plugins/no-enum.js';\nimport noJsxIifePlugin from '../plugins/no-jsx-iife.js';\nimport noSwitchPlugin from '../plugins/no-switch.js';\n\nconst buildSonarConfig = (sourceDir: string): Linter.Config[] => [\n sonarjs.configs!.recommended as Linter.Config,\n {\n name: 'sonarjs',\n rules: {\n 'sonarjs/cognitive-complexity': 'error',\n 'sonarjs/fixme-tag': 'off',\n 'sonarjs/no-commented-code': 'off',\n 'sonarjs/no-nested-conditional': 'off',\n 'sonarjs/no-nested-functions': 'off',\n 'sonarjs/no-selector-parameter': 'off',\n 'sonarjs/regex-complexity': 'off',\n 'sonarjs/todo-tag': 'off',\n },\n },\n {\n files: ['**/*.tsx', '**/hooks/*.ts?(x)'],\n name: 'sonarjs/react-files',\n rules: {\n 'sonarjs/cognitive-complexity': 'off',\n 'sonarjs/function-return-type': 'off',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'sonarjs/test-files',\n rules: {\n 'sonarjs/no-duplicate-string': 'off',\n 'sonarjs/no-identical-functions': 'off',\n },\n },\n {\n files: [`${sourceDir}/languages/**/*.ts`, 'eslint.config.mjs'],\n name: 'sonarjs/credential-checks',\n rules: {\n 'sonarjs/no-hardcoded-credentials': 'off',\n 'sonarjs/no-hardcoded-passwords': 'off',\n },\n },\n];\n\nconst noEnumConfig: Linter.Config[] = [\n {\n files: ['**/*.ts?(x)'],\n name: 'no-enum',\n plugins: {'no-enum': noEnumPlugin},\n rules: {\n 'no-enum/no-enum': 'error',\n },\n },\n];\n\nconst noJsxIifeConfig: Linter.Config[] = [\n {\n files: ['**/*.tsx', '**/*.jsx'],\n name: 'no-jsx-iife',\n plugins: {'no-jsx-iife': noJsxIifePlugin},\n rules: {'no-jsx-iife/no-jsx-iife': 'error'},\n },\n];\n\nconst noSwitchConfig: Linter.Config[] = [\n {\n files: ['**/*.ts?(x)', '**/*.js?(x)'],\n name: 'no-switch',\n plugins: {'no-switch': noSwitchPlugin},\n rules: {'no-switch/no-switch': 'error'},\n },\n];\n\n/**\n * Architecture-boundary enforcement for GAIA's canonical `app/` layout.\n *\n * Imports may only flow from a higher layer to a lower one:\n *\n * routes -> pages -> components -> { hooks, state } -> services -> utils -> types\n *\n * `types/` is a pure leaf importable by everyone. Each zone names a lower\n * layer as `target` and the higher layers it must not import as `from`, so a\n * lower-importing-higher edge (the wrong direction) is reported. `routes`\n * appears in every `from` set, which encodes \"nothing may import a route\".\n *\n * Zone `target`/`from` paths resolve against `process.cwd()` (the consuming\n * project's root where eslint runs), not this package's location in\n * node_modules, so `./${sourceDir}/...` correctly points at the consumer's\n * source tree. `import-x@4.16.2` accepts `from`/`target` as string arrays,\n * which collapses the higher->lower pairs into one zone per target layer.\n *\n * `app/middleware`, `app/sessions.server`, `app/assets`, `app/languages`, and\n * `app/styles` are intentionally left unconstrained (server/asset dirs).\n */\nconst buildNoRestrictedPathsConfig = (\n sourceDir: string,\n): Linter.Config[] => {\n const dir = (layer: string): string => `./${sourceDir}/${layer}`;\n\n return [\n {\n files: [`${sourceDir}/**/!(*.test|*.stories).ts?(x)`],\n name: 'import-x/architecture-boundaries',\n rules: {\n 'import-x/no-restricted-paths': [\n 'error',\n {\n zones: [\n {\n from: [dir('routes')],\n message:\n 'Pages may only be imported by routes; a page must not import a route (import direction is routes -> pages -> components).',\n target: dir('pages'),\n },\n {\n from: [dir('routes'), dir('pages')],\n message:\n 'Reusable components must not depend on page- or route-level code (import direction is routes -> pages -> components).',\n target: dir('components'),\n },\n {\n from: [dir('routes'), dir('pages'), dir('components')],\n message:\n 'Hooks and state sit below the UI tree; they must not import components, pages, or routes.',\n target: [dir('hooks'), dir('state')],\n },\n {\n from: [\n dir('routes'),\n dir('pages'),\n dir('components'),\n dir('hooks'),\n dir('state'),\n ],\n message:\n 'The service/data layer sits below the UI and orchestration layers; it must not import components, pages, routes, hooks, or state.',\n target: dir('services'),\n },\n {\n from: [\n dir('routes'),\n dir('pages'),\n dir('components'),\n dir('hooks'),\n dir('state'),\n dir('services'),\n ],\n message:\n 'Utils are near-leaves; they may import only types and other utils.',\n target: dir('utils'),\n },\n {\n from: [\n dir('routes'),\n dir('pages'),\n dir('components'),\n dir('hooks'),\n dir('state'),\n dir('services'),\n dir('utils'),\n ],\n message:\n 'Types are a pure leaf; they must not import any other app layer.',\n target: dir('types'),\n },\n ],\n },\n ],\n },\n },\n ];\n};\n\nconst buildNoRelativeImportPathsConfig = (\n sourceDir: string,\n): Linter.Config[] => [\n {\n name: 'no-relative-import-paths',\n plugins: {\n 'no-relative-import-paths': noRelativeImportPaths,\n },\n rules: {\n 'no-relative-import-paths/no-relative-import-paths': [\n 'error',\n {\n allowedDepth: 2,\n allowSameFolder: true,\n prefix: '~',\n rootDir: sourceDir,\n },\n ],\n },\n },\n];\n\nexport const buildGuardrails = (sourceDir: string): Linter.Config[] => [\n ...buildSonarConfig(sourceDir),\n ...noEnumConfig,\n ...noJsxIifeConfig,\n ...noSwitchConfig,\n ...buildNoRestrictedPathsConfig(sourceDir),\n ...buildNoRelativeImportPathsConfig(sourceDir),\n];\n","import type {ESLint, Rule} from 'eslint';\n\nconst noEnumRule: Rule.RuleModule = {\n create: (context) => ({\n TSEnumDeclaration: (node: Rule.Node) => {\n context.report({messageId: 'noEnum', node});\n },\n }),\n meta: {\n docs: {description: 'Disallow TypeScript enums'},\n messages: {\n noEnum:\n 'Do not use TypeScript enums. Use an object with `as const` instead.',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: 'no-enum',\n version: '0.1.0',\n },\n rules: {\n 'no-enum': noEnumRule,\n },\n};\n\nexport default plugin;\n","import type {ESLint, Rule} from 'eslint';\n\nconst noJsxIifeRule: Rule.RuleModule = {\n create: (context) => ({\n 'JSXExpressionContainer > CallExpression > ArrowFunctionExpression.callee':\n (node: Rule.Node) => {\n context.report({messageId: 'noJsxIife', node});\n },\n 'JSXExpressionContainer > CallExpression > FunctionExpression.callee': (\n node: Rule.Node,\n ) => {\n context.report({messageId: 'noJsxIife', node});\n },\n }),\n meta: {\n docs: {description: 'Disallow IIFEs in JSX expressions'},\n messages: {\n noJsxIife:\n 'Do not use IIFEs in JSX. Use a computed variable before the return or extract a component instead.',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: 'no-jsx-iife',\n version: '0.1.0',\n },\n rules: {\n 'no-jsx-iife': noJsxIifeRule,\n },\n};\n\nexport default plugin;\n","import type {ESLint, Rule} from 'eslint';\n\nconst noSwitchRule: Rule.RuleModule = {\n create: (context) => ({\n SwitchStatement: (node: Rule.Node) => {\n context.report({messageId: 'noSwitch', node});\n },\n }),\n meta: {\n docs: {description: 'Disallow switch statements'},\n messages: {\n noSwitch:\n 'Do not use switch statements. Use an object map or if/else instead.',\n },\n schema: [],\n type: 'problem',\n },\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: 'no-switch',\n version: '0.1.0',\n },\n rules: {\n 'no-switch': noSwitchRule,\n },\n};\n\nexport default plugin;\n","import {includeIgnoreFile} from '@eslint/config-helpers';\nimport type {Linter} from 'eslint';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nexport type GaiaLintIgnoresOptions = {\n /**\n * Path to a `.gitignore` file to merge in. Resolved from `process.cwd()`\n * if relative. Pass `false` to skip the gitignore merge entirely.\n *\n * If the resolved path does not exist, the merge is silently skipped —\n * projects without a `.gitignore` don't need to opt out explicitly.\n *\n * @default '.gitignore'\n */\n gitignore?: string | false;\n /** Extra ignore globs to merge with GAIA defaults. */\n extra?: string[];\n};\n\n/**\n * GAIA's default ignore globs — matches the static `ignored-files` block in\n * GAIA's `eslint.config.mjs`. Consumer's `extra` ignores get concatenated\n * onto this list.\n */\nconst defaultIgnores = [\n '.storybook',\n '.playwright',\n '/.react-router/**',\n '.claude/**/*.js',\n '.claude/**/*.cjs',\n 'scripts',\n 'public/**',\n '**/*.css',\n '**/*.svg',\n '**/*.md',\n];\n\n/**\n * Ignores flat-config factory.\n *\n * Ports the `includeIgnoreFile(gitignorePath)` + static `ignored-files`\n * block from GAIA's `eslint.config.mjs`. The `gitignore` path must be\n * resolved at the consumer's cwd (config-load time), not at gaia-lint's\n * install location, so this is shipped as a factory.\n */\nexport const ignores = (opts?: GaiaLintIgnoresOptions): Linter.Config[] => {\n const out: Linter.Config[] = [];\n\n const gitignore = opts?.gitignore ?? '.gitignore';\n if (gitignore !== false) {\n const resolved = path.isAbsolute(gitignore)\n ? gitignore\n : path.resolve(process.cwd(), gitignore);\n if (fs.existsSync(resolved)) {\n out.push(includeIgnoreFile(resolved) as Linter.Config);\n }\n }\n\n out.push({\n ignores: [...defaultIgnores, ...(opts?.extra ?? [])],\n name: 'ignored-files',\n });\n\n return out;\n};\n","import playwrightPlugin from 'eslint-plugin-playwright';\nimport type {Linter} from 'eslint';\n\n/**\n * Playwright flat-config block.\n *\n * Ports `playwrightConfig` from GAIA's `eslint.config.mjs` — scopes\n * `eslint-plugin-playwright`'s `flat/recommended` config to `.playwright/`\n * test files (GAIA's e2e directory convention).\n */\nexport const playwright: Linter.Config[] = [\n {\n name: 'playwright',\n ...(playwrightPlugin.configs['flat/recommended'] as Linter.Config),\n files: ['.playwright/**/*.ts?(x)'],\n rules: {\n ...playwrightPlugin.configs['flat/recommended'].rules,\n 'playwright/expect-expect': [\n 'warn',\n {assertFunctionPatterns: ['^expect[A-Z]']},\n ],\n },\n },\n];\n","import {rules as prettierConfigRules} from 'eslint-config-prettier';\nimport prettierPlugin from 'eslint-plugin-prettier';\nimport type {Linter} from 'eslint';\n\n/**\n * Prettier flat-config block.\n *\n * Ports `prettierConfig` from GAIA's `eslint.config.mjs`. Layers\n * `eslint-config-prettier`'s rule disablers, then re-enables a few\n * `@stylistic/*` rules GAIA wants to keep (padding lines, single quotes),\n * and finally turns on the `prettier/prettier` rule itself.\n */\nexport const prettier: Linter.Config[] = [\n {\n name: 'prettier/plugin/config',\n plugins: {prettier: prettierPlugin},\n },\n {\n name: 'prettier/config',\n rules: {\n ...prettierConfigRules,\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: ['block-like', 'export', 'return', 'throw'],\n prev: '*',\n },\n ],\n '@stylistic/quotes': [\n 'error',\n 'single',\n {\n allowTemplateLiterals: 'avoidEscape',\n avoidEscape: true,\n },\n ],\n '@stylistic/spaced-comment': 'off',\n 'prettier/prettier': ['error', {endOfLine: 'auto'}],\n },\n },\n];\n","import {configs, plugins} from 'eslint-config-airbnb-extended';\nimport type {Linter} from 'eslint';\n\n/**\n * React flat-config block.\n *\n * Ports `reactConfig` + `reactCustomConfig` from GAIA's `eslint.config.mjs`.\n * Pulls React, React Hooks, and JSX A11y plugins plus Airbnb's recommended\n * React config, then layers GAIA's project-wide React rule overrides.\n *\n * The `react-router/routes` override targets `**\\/routes/**\\/*.tsx` — a GAIA\n * convention that's harmless for consumers without that folder structure\n * (the override only fires when files match).\n */\nexport const react: Linter.Config[] = [\n // React plugin\n plugins.react,\n // React hooks plugin\n plugins.reactHooks,\n // React JSX A11y plugin\n plugins.reactA11y,\n // Airbnb React recommended config\n ...configs.react.recommended,\n {\n name: 'react-custom',\n rules: {\n 'jsx-a11y/control-has-associated-label': 'off',\n 'jsx-a11y/no-autofocus': 'off',\n 'react/boolean-prop-naming': [\n 'error',\n {\n propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'],\n rule: '^((can|has|hide|is|show)[A-Z]([A-Za-z0-9]?)+|(checked|disabled|hide|required|show))',\n },\n ],\n 'react/function-component-definition': 'off',\n 'react/jsx-boolean-value': ['error', 'always'],\n 'react/jsx-curly-brace-presence': 'error',\n 'react/jsx-filename-extension': 'off',\n 'react/jsx-fragments': 'error',\n // off by default because it doesn't handle props onXyz function names correctly\n // turn this on from time to time to check for misnamed handlers elsewhere\n 'react/jsx-handler-names': ['off', {checkLocalVariables: true}],\n 'react/jsx-newline': ['error', {prevent: true}],\n 'react/jsx-no-useless-fragment': ['error', {allowExpressions: true}],\n 'react/no-children-prop': 'off',\n 'react/no-danger': 'off',\n 'react/prop-types': 'off',\n 'react/react-in-jsx-scope': 'off',\n 'react/require-default-props': 'off',\n },\n },\n {\n files: ['**/routes/**/*.tsx'],\n name: 'react-router/routes',\n rules: {\n 'no-empty-pattern': 'off',\n 'react/display-name': 'off',\n },\n },\n {\n files: ['**/*.test.ts?(x)', '**/*.stories.ts?(x)'],\n name: 'react/test-files',\n rules: {\n 'react/jsx-props-no-spreading': 'off',\n },\n },\n];\n","import storybookPlugin from 'eslint-plugin-storybook';\nimport type {Linter} from 'eslint';\n\n/**\n * Storybook flat-config block.\n *\n * Ports `storybookConfig` from GAIA's `eslint.config.mjs` — applies the\n * official `flat/recommended` config from `eslint-plugin-storybook`.\n */\nexport const storybook: Linter.Config[] = [\n ...(storybookPlugin.configs['flat/recommended'] as Linter.Config[]),\n];\n","import type {Linter} from 'eslint';\nimport canonical from 'eslint-plugin-canonical';\nimport checkFile from 'eslint-plugin-check-file';\nimport perfectionist from 'eslint-plugin-perfectionist';\nimport unicorn from 'eslint-plugin-unicorn';\nimport unusedImports from 'eslint-plugin-unused-imports';\n\nconst buildCanonicalConfig = (sourceDir: string): Linter.Config[] => [\n canonical.configs['flat/recommended'] as Linter.Config,\n {\n name: 'canonical',\n rules: {\n 'canonical/destructuring-property-newline': 'off',\n 'canonical/filename-match-exported': 'error',\n 'canonical/id-match': 'off',\n 'canonical/import-specifier-newline': 'off',\n },\n },\n {\n files: ['**/*.tsx', '**/hooks/*.ts?(x)'],\n name: 'canonical/sort-react-dependencies',\n rules: {\n 'canonical/sort-react-dependencies': 'error',\n },\n },\n {\n files: [\n `${sourceDir}/root.tsx`,\n `${sourceDir}/entry.server.tsx`,\n `${sourceDir}/**/tests/*`,\n 'test/**/*.ts?(x)',\n '**/*.stories.tsx',\n '**/routes/**/*.tsx',\n '**/hooks/*.ts?(x)',\n '.storybook/**/*.ts?(x)',\n '.playwright/**/*.ts?(x)',\n ],\n name: 'canonical/filename-match-exported-disabled',\n rules: {\n 'canonical/filename-match-exported': 'off',\n },\n },\n];\n\nconst perfectionistConfig: Linter.Config[] = [\n perfectionist.configs['recommended-natural'] as Linter.Config,\n {\n name: 'perfectionist',\n rules: {\n 'perfectionist/sort-imports': [\n 'error',\n {\n customGroups: [\n {\n elementNamePattern: '^react$',\n groupName: 'react-type',\n selector: 'type',\n },\n {\n elementNamePattern: '^react$',\n groupName: 'react',\n },\n {\n elementNamePattern: '^react-.+',\n groupName: 'react-other-type',\n selector: 'type',\n },\n {\n elementNamePattern: '^react-.+',\n groupName: 'react-other',\n },\n ],\n groups: [\n 'react-type',\n 'react',\n 'react-other-type',\n 'react-other',\n ['type-external', 'external'],\n ['type-builtin', 'builtin'],\n ['type-internal', 'internal'],\n ['type-parent', 'parent'],\n ['type-sibling', 'sibling'],\n ['type-index', 'index'],\n 'unknown',\n 'style',\n 'side-effect',\n 'side-effect-style',\n ],\n newlinesBetween: 0,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-jsx-props': [\n 'error',\n {\n customGroups: [\n {\n elementNamePattern: ['^key$', '^ref$'],\n groupName: 'reserved',\n },\n ],\n groups: ['reserved'],\n type: 'natural',\n },\n ],\n },\n },\n];\n\nconst unicornConfig: Linter.Config[] = [\n unicorn.configs.recommended as Linter.Config,\n {\n name: 'unicorn',\n rules: {\n 'unicorn/consistent-destructuring': 'error',\n 'unicorn/consistent-template-literal-escape': 'off',\n 'unicorn/filename-case': 'off',\n 'unicorn/new-for-builtins': 'off',\n 'unicorn/no-array-callback-reference': 'off',\n 'unicorn/no-array-for-each': 'off',\n 'unicorn/no-array-reduce': 'off',\n 'unicorn/no-nested-ternary': 'off',\n 'unicorn/no-null': 'off',\n 'unicorn/no-useless-undefined': 'off',\n 'unicorn/prefer-export-from': 'off',\n 'unicorn/prefer-global-this': 'off',\n 'unicorn/prefer-set-has': 'off',\n 'unicorn/prefer-switch': 'off',\n 'unicorn/prefer-ternary': 'off',\n 'unicorn/prevent-abbreviations': [\n 'error',\n {\n ignore: [\n 'acc',\n 'ctx',\n 'e2e',\n 'env',\n 'obj',\n 'prev',\n 'req',\n 'res',\n /args/i,\n /fn/i,\n /param/i,\n /params/i,\n /props/i,\n /ref/i,\n /src/i,\n /utils/i,\n ],\n },\n ],\n 'unicorn/text-encoding-identifier-case': 'off',\n },\n },\n {\n files: ['./*.ts'],\n name: 'unicorn/root-ts-files',\n rules: {\n 'unicorn/prefer-module': 'off',\n 'unicorn/prevent-abbreviations': 'off',\n },\n },\n];\n\nconst unusedImportsConfig: Linter.Config[] = [\n {\n name: 'unused-imports',\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n '@typescript-eslint/no-unused-vars': 'off',\n 'no-unused-vars': 'off',\n 'sonarjs/no-unused-vars': 'off',\n 'sonarjs/unused-import': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^_',\n ignoreRestSiblings: true,\n vars: 'all',\n varsIgnorePattern: '^_',\n },\n ],\n },\n },\n {\n files: ['**/*.d.ts'],\n name: 'unused-imports/ts-definition-files',\n rules: {\n 'unused-imports/no-unused-vars': 'off',\n },\n },\n];\n\nconst buildCheckFileConfig = (sourceDir: string): Linter.Config[] => [\n {\n plugins: {\n 'check-file': checkFile,\n },\n },\n {\n files: [`${sourceDir}/**/*`],\n name: 'check-file',\n rules: {\n 'check-file/filename-naming-convention': [\n 'error',\n {\n // React hook files must be camelCase (to match the hook name)\n '**/hooks/*.{ts,tsx}': 'CAMEL_CASE',\n [`${sourceDir}/state/*.tsx`]: 'KEBAB_CASE',\n // React component files must be named index.tsx\n [`${sourceDir}/{components,pages}/**/!(assets|hooks|state|tests|utils)/*.tsx`]:\n 'index+()',\n // Generally, non-component files must be named kebab-case\n [`${sourceDir}/{components,pages}/**/!(hooks)/*.ts`]: 'KEBAB_CASE',\n // Non-component files inside specific components folders must be kebab-case\n [`${sourceDir}/{components,pages}/**/(assets|state|tests|utils)/*.{ts,tsx}`]:\n 'KEBAB_CASE',\n 'test/**/*.ts?(x)': 'KEBAB_CASE',\n },\n {\n ignoreMiddleExtensions: true,\n },\n ],\n 'check-file/folder-match-with-fex': [\n 'error',\n {\n // require stories and test files to be inside tests folders\n '*.(stories|test).{ts,tsx}': `${sourceDir}/**/tests/`,\n },\n ],\n 'check-file/folder-naming-convention': [\n 'error',\n {\n // enforce PascalCase component folders, and allow assets, hooks, tests, and utils subfolders\n [`${sourceDir}/components/**/`]:\n '(assets|hooks|state|tests|utils|[A-Z][a-zA-Z0-9]*)',\n },\n ],\n },\n },\n {\n files: ['test/**/*.*'],\n name: 'check-file/test-files',\n rules: {\n 'check-file/filename-naming-convention': [\n 'error',\n {\n 'test/**/*.ts?(x)': 'KEBAB_CASE',\n },\n {\n ignoreMiddleExtensions: true,\n },\n ],\n },\n },\n];\n\nexport const buildStyleHygiene = (sourceDir: string): Linter.Config[] => [\n ...buildCanonicalConfig(sourceDir),\n ...perfectionistConfig,\n ...unicornConfig,\n ...unusedImportsConfig,\n ...buildCheckFileConfig(sourceDir),\n];\n","import vitest from '@vitest/eslint-plugin';\nimport jestDom from 'eslint-plugin-jest-dom';\nimport testingLibrary from 'eslint-plugin-testing-library';\nimport type {Linter} from 'eslint';\n\n/**\n * Testing flat-config block.\n *\n * Ports `testHarnessConfig` + `testingLibraryConfig` from GAIA's\n * `eslint.config.mjs`. Wires up Vitest, jest-dom, and Testing Library\n * recommended rules across test/story/test-harness files.\n */\nexport const testing: Linter.Config[] = [\n {\n files: [\n '**/*.test.ts?(x)',\n '**/*.stories.ts?(x)',\n 'test/**/*.ts?(x)',\n ],\n name: 'vitest',\n plugins: {\n 'jest-dom': jestDom,\n vitest,\n },\n rules: {\n ...jestDom.configs['flat/recommended'].rules,\n ...vitest.configs.recommended.rules,\n 'import-x/no-useless-path-segments': [\n 'error',\n {noUselessIndex: true},\n ],\n 'vitest/expect-expect': [\n 'error',\n {assertFunctionNames: ['expect', 'expect*']},\n ],\n // Baseline bump: `recommended` ships no-disabled-tests at `warn`.\n // .skip is the single biggest gaming vector for a RED-verification\n // gate (it makes a failing test stop failing), so GAIA forbids it\n // outright. Park work with test.todo or an inline eslint-disable, not\n // a silent .skip.\n 'vitest/no-disabled-tests': 'error',\n // --- Hardening beyond the `recommended` preset ---------------------\n // Rule names and options verified against @vitest/eslint-plugin\n // v1.6.19. GAIA policy: every lint rule is `error`, never `warn`.\n //\n // Consistency: GAIA uses test() exclusively (120 vs 0 it() across the\n // gaia codebase). In 1.6.19 the `fn` option cascades to the\n // within-describe keyword, so this also governs test()/it() nested in\n // describe blocks. Auto-fixable.\n 'vitest/consistent-test-it': ['error', {fn: 'test'}],\n // Consistency: GAIA uses the `vi` mock API (37 vs 0 `vitest.` across the\n // gaia codebase). Auto-fixable.\n 'vitest/consistent-vitest-vi': ['error', {fn: 'vi'}],\n // RED-gate: a branch in a test body can assert nothing on one path.\n // Enable ONLY this one; `no-conditional-tests` is a byte-identical\n // duplicate in 1.6.19 and would double-report.\n 'vitest/no-conditional-in-test': 'error',\n // RED-gate: fdescribe/fit/xdescribe/xit bypass the active\n // no-focused-tests / no-disabled-tests rules; forbid the prefix\n // spellings so the focus/skip net stays airtight. Auto-fixable.\n 'vitest/no-test-prefixes': 'error',\n // RED-gate: a returned value/promise can resolve after the test\n // \"passes\", swallowing assertions and faking GREEN.\n 'vitest/no-test-return-statement': 'error',\n // RED-gate: empty test('...') stubs pass green and read as coverage;\n // rewrite to test.todo('...') so the gap is explicit. Contradicts\n // `warn-todo`, which stays off. Auto-fixable.\n 'vitest/prefer-todo': 'error',\n // A bare .toThrow() passes on ANY throw, masking the wrong error;\n // require an asserted message or matcher.\n 'vitest/require-to-throw-message': 'error',\n },\n },\n {\n ...testingLibrary.configs['flat/react'],\n files: ['**/*.test.ts?(x)'],\n name: 'testing-library',\n },\n];\n","import type {Linter} from 'eslint';\nimport {buildBase} from './configs/base.js';\nimport {\n betterTailwind,\n type GaiaLintBetterTailwindOptions,\n} from './configs/better-tailwind.js';\nimport {buildGuardrails} from './configs/guardrails.js';\nimport {ignores, type GaiaLintIgnoresOptions} from './configs/ignores.js';\nimport {playwright} from './configs/playwright.js';\nimport {prettier} from './configs/prettier.js';\nimport {react} from './configs/react.js';\nimport {storybook} from './configs/storybook.js';\nimport {buildStyleHygiene} from './configs/style-hygiene.js';\nimport {testing} from './configs/testing.js';\n\nexport type {GaiaLintBetterTailwindOptions, GaiaLintIgnoresOptions};\n\nexport type GaiaLintOptions = {\n /**\n * Application source directory (relative to project root). Used to scope\n * file-path-based rules — filename conventions, hook-folder scoping,\n * `no-relative-import-paths` root, etc.\n *\n * @default 'app'\n */\n sourceDir?: string;\n};\n\n/**\n * Dual-shape `ignores` accessor. Spread it directly for the default\n * configuration (`...lint.ignores`) or call it to override\n * (`...lint.ignores({extra: ['coverage/**']})`).\n */\nexport type GaiaLintIgnores = ((\n opts?: GaiaLintIgnoresOptions,\n) => Linter.Config[]) &\n Iterable<Linter.Config>;\n\nexport type GaiaLintBundle = {\n base: Linter.Config[];\n betterTailwind: (opts: GaiaLintBetterTailwindOptions) => Linter.Config[];\n guardrails: Linter.Config[];\n ignores: GaiaLintIgnores;\n playwright: Linter.Config[];\n prettier: Linter.Config[];\n react: Linter.Config[];\n storybook: Linter.Config[];\n styleHygiene: Linter.Config[];\n testing: Linter.Config[];\n};\n\nconst buildIgnoresAccessor = (): GaiaLintIgnores => {\n const defaults = ignores();\n const accessor = ((opts?: GaiaLintIgnoresOptions) => ignores(opts)) as\n | ((opts?: GaiaLintIgnoresOptions) => Linter.Config[]) &\n Iterable<Linter.Config> & {[Symbol.iterator]?: () => Iterator<Linter.Config>};\n accessor[Symbol.iterator] = () => defaults[Symbol.iterator]();\n return accessor as GaiaLintIgnores;\n};\n\n/**\n * GAIA lint configuration factory.\n *\n * Call once at the top of your `eslint.config.mjs` to bind a `sourceDir`,\n * then spread the returned configs into `defineConfig`. Defaults to GAIA's\n * `'app'` layout; pass `{sourceDir: 'src'}` (or any other value) for\n * projects that store source elsewhere.\n *\n * @example\n * const lint = gaiaLint(); // GAIA / app/\n * const lint = gaiaLint({sourceDir: 'src'}); // src/\n */\nconst gaiaLint = (opts?: GaiaLintOptions): GaiaLintBundle => {\n const sourceDir = opts?.sourceDir ?? 'app';\n return {\n base: buildBase(sourceDir),\n betterTailwind,\n guardrails: buildGuardrails(sourceDir),\n ignores: buildIgnoresAccessor(),\n playwright,\n prettier,\n react,\n storybook,\n styleHygiene: buildStyleHygiene(sourceDir),\n testing,\n };\n};\n\nexport default gaiaLint;\n"],"mappings":";AAAA,OAAO,oBAAoB;AAC3B,OAAO,QAAQ;AACf,SAAQ,SAAS,SAAS,aAAY;AACtC,OAAO,0BAA0B;AACjC,OAAO,sBAAsB;AAG7B,IAAM,WAA4B;AAAA;AAAA,EAEhC;AAAA,IACE,MAAM;AAAA,IACN,GAAG,GAAG,QAAQ;AAAA,EAChB;AAAA;AAAA,EAEA,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,GAAG,QAAQ,KAAK;AAAA;AAAA,EAEhB,MAAM,KAAK;AACb;AAEA,IAAM,iBAAkC;AAAA,EACtC;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,MACL,qBAAqB;AAAA,MACrB,OAAO,CAAC,SAAS,KAAK;AAAA,MACtB,cAAc;AAAA,MACd,qBAAqB;AAAA;AAAA,MACrB,YAAY;AAAA,MACZ,kBAAkB;AAAA;AAAA,IACpB;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,oBAAoB,qBAAqB;AAAA,IACjD,MAAM;AAAA,IACN,OAA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