js-style-kit 0.2.9 → 0.2.11
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.
- package/LICENSE +1 -1
- package/dist/eslint/base/config.js +453 -5
- package/dist/eslint/base/config.js.map +1 -1
- package/dist/eslint/base/rules.js +421 -3
- package/dist/eslint/base/rules.js.map +1 -1
- package/dist/eslint/constants.d.ts +15 -14
- package/dist/eslint/constants.js +21 -3
- package/dist/eslint/constants.js.map +1 -1
- package/dist/eslint/ignores.js +38 -4
- package/dist/eslint/ignores.js.map +1 -1
- package/dist/eslint/index.d.ts +5 -0
- package/dist/eslint/index.js +1406 -27
- package/dist/eslint/index.js.map +1 -1
- package/dist/eslint/jsdoc/config.js +105 -5
- package/dist/eslint/jsdoc/config.js.map +1 -1
- package/dist/eslint/jsdoc/rules.js +69 -3
- package/dist/eslint/jsdoc/rules.js.map +1 -1
- package/dist/eslint/nextjs/config.d.ts +12 -0
- package/dist/eslint/nextjs/config.js +62 -0
- package/dist/eslint/nextjs/config.js.map +1 -0
- package/dist/eslint/nextjs/rules.d.ts +8 -0
- package/dist/eslint/nextjs/rules.js +28 -0
- package/dist/eslint/nextjs/rules.js.map +1 -0
- package/dist/eslint/nextjs/types.d.ts +29 -0
- package/dist/eslint/nextjs/types.js +1 -0
- package/dist/eslint/nextjs/types.js.map +1 -0
- package/dist/eslint/perfectionist/config.js +61 -5
- package/dist/eslint/perfectionist/config.js.map +1 -1
- package/dist/eslint/perfectionist/rules.js +27 -3
- package/dist/eslint/perfectionist/rules.js.map +1 -1
- package/dist/eslint/prefer-arrow-function/config.js +41 -4
- package/dist/eslint/prefer-arrow-function/config.js.map +1 -1
- package/dist/eslint/react/config.js +182 -5
- package/dist/eslint/react/config.js.map +1 -1
- package/dist/eslint/react/rules.js +128 -3
- package/dist/eslint/react/rules.js.map +1 -1
- package/dist/eslint/react-compiler/config.js +35 -4
- package/dist/eslint/react-compiler/config.js.map +1 -1
- package/dist/eslint/react-refresh/config.js +51 -5
- package/dist/eslint/react-refresh/config.js.map +1 -1
- package/dist/eslint/react-refresh/rules.js +15 -3
- package/dist/eslint/react-refresh/rules.js.map +1 -1
- package/dist/eslint/storybook/config.js +63 -4
- package/dist/eslint/storybook/config.js.map +1 -1
- package/dist/eslint/testing/config.js +165 -6
- package/dist/eslint/testing/config.js.map +1 -1
- package/dist/eslint/testing/jest-rules.js +40 -3
- package/dist/eslint/testing/jest-rules.js.map +1 -1
- package/dist/eslint/testing/vitest-rules.js +46 -3
- package/dist/eslint/testing/vitest-rules.js.map +1 -1
- package/dist/eslint/turbo/config.js +35 -4
- package/dist/eslint/turbo/config.js.map +1 -1
- package/dist/eslint/types.d.ts +1 -1
- package/dist/eslint/typescript/config.js +182 -5
- package/dist/eslint/typescript/config.js.map +1 -1
- package/dist/eslint/typescript/rules.js +131 -3
- package/dist/eslint/typescript/rules.js.map +1 -1
- package/dist/eslint/unicorn/config.js +109 -5
- package/dist/eslint/unicorn/config.js.map +1 -1
- package/dist/eslint/unicorn/rules.js +75 -3
- package/dist/eslint/unicorn/rules.js.map +1 -1
- package/dist/index.js +1527 -31
- package/dist/index.js.map +1 -1
- package/dist/prettier/index.js +128 -5
- package/dist/prettier/index.js.map +1 -1
- package/dist/prettier/patch-tailwind-plugin.js +68 -3
- package/dist/prettier/patch-tailwind-plugin.js.map +1 -1
- package/dist/utils/is-type.js +19 -8
- package/dist/utils/is-type.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-26SVGV32.js +0 -133
- package/dist/chunk-26SVGV32.js.map +0 -1
- package/dist/chunk-2PDDRRZG.js +0 -21
- package/dist/chunk-2PDDRRZG.js.map +0 -1
- package/dist/chunk-3SHRYTUT.js +0 -32
- package/dist/chunk-3SHRYTUT.js.map +0 -1
- package/dist/chunk-6L7EDNAG.js +0 -20
- package/dist/chunk-6L7EDNAG.js.map +0 -1
- package/dist/chunk-76XASR6Z.js +0 -25
- package/dist/chunk-76XASR6Z.js.map +0 -1
- package/dist/chunk-7FTTMVPP.js +0 -20
- package/dist/chunk-7FTTMVPP.js.map +0 -1
- package/dist/chunk-7OLD3L3V.js +0 -64
- package/dist/chunk-7OLD3L3V.js.map +0 -1
- package/dist/chunk-7ZDM3TOO.js +0 -141
- package/dist/chunk-7ZDM3TOO.js.map +0 -1
- package/dist/chunk-A6AJGHPQ.js +0 -20
- package/dist/chunk-A6AJGHPQ.js.map +0 -1
- package/dist/chunk-CNYUGKH5.js +0 -38
- package/dist/chunk-CNYUGKH5.js.map +0 -1
- package/dist/chunk-HLIJN23S.js +0 -23
- package/dist/chunk-HLIJN23S.js.map +0 -1
- package/dist/chunk-HMC2O35U.js +0 -25
- package/dist/chunk-HMC2O35U.js.map +0 -1
- package/dist/chunk-HOZDQJWG.js +0 -51
- package/dist/chunk-HOZDQJWG.js.map +0 -1
- package/dist/chunk-LITSWCYQ.js +0 -135
- package/dist/chunk-LITSWCYQ.js.map +0 -1
- package/dist/chunk-N7AG2EKX.js +0 -48
- package/dist/chunk-N7AG2EKX.js.map +0 -1
- package/dist/chunk-PSSB4TGO.js +0 -29
- package/dist/chunk-PSSB4TGO.js.map +0 -1
- package/dist/chunk-SWT2QOL3.js +0 -21
- package/dist/chunk-SWT2QOL3.js.map +0 -1
- package/dist/chunk-U7AFEGMK.js +0 -23
- package/dist/chunk-U7AFEGMK.js.map +0 -1
- package/dist/chunk-UHCQX54J.js +0 -68
- package/dist/chunk-UHCQX54J.js.map +0 -1
- package/dist/chunk-UV6CA4PE.js +0 -45
- package/dist/chunk-UV6CA4PE.js.map +0 -1
- package/dist/chunk-X7JRY6MS.js +0 -41
- package/dist/chunk-X7JRY6MS.js.map +0 -1
- package/dist/chunk-XBITZIAZ.js +0 -21
- package/dist/chunk-XBITZIAZ.js.map +0 -1
- package/dist/chunk-XCPOAYGQ.js +0 -80
- package/dist/chunk-XCPOAYGQ.js.map +0 -1
- package/dist/chunk-XICOWKSV.js +0 -426
- package/dist/chunk-XICOWKSV.js.map +0 -1
- package/dist/chunk-YFJ363HR.js +0 -26
- package/dist/chunk-YFJ363HR.js.map +0 -1
- package/dist/chunk-YZG34ZNI.js +0 -80
- package/dist/chunk-YZG34ZNI.js.map +0 -1
- package/dist/chunk-ZED5DLW7.js +0 -73
- package/dist/chunk-ZED5DLW7.js.map +0 -1
package/dist/eslint/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/is-type.ts","../../src/eslint/constants.ts","../../src/eslint/base/rules.ts","../../src/eslint/base/config.ts","../../src/eslint/ignores.ts","../../src/eslint/jsdoc/config.ts","../../src/eslint/jsdoc/rules.ts","../../src/eslint/nextjs/config.ts","../../src/eslint/nextjs/rules.ts","../../src/eslint/perfectionist/config.ts","../../src/eslint/perfectionist/rules.ts","../../src/eslint/prefer-arrow-function/config.ts","../../src/eslint/react-compiler/config.ts","../../src/eslint/react-refresh/config.ts","../../src/eslint/react-refresh/rules.ts","../../src/eslint/react/config.ts","../../src/eslint/react/rules.ts","../../src/eslint/storybook/config.ts","../../src/eslint/testing/config.ts","../../src/eslint/testing/jest-rules.ts","../../src/eslint/testing/vitest-rules.ts","../../src/eslint/turbo/config.ts","../../src/eslint/typescript/config.ts","../../src/eslint/typescript/rules.ts","../../src/eslint/unicorn/config.ts","../../src/eslint/unicorn/rules.ts","../../src/eslint/index.ts"],"sourcesContent":["/**\n * Type predicate for string values\n *\n * @param value - The value to check\n * @returns True if the value is a string, false otherwise\n */\nexport const isString = (value: unknown): value is string => {\n return typeof value === \"string\";\n};\n\n/**\n * Type predicate for number values\n *\n * @param value - The value to check\n * @returns True if the value is a number and not NaN, false otherwise\n */\nexport const isNumber = (value: unknown): value is number => {\n return typeof value === \"number\" && !Number.isNaN(value);\n};\n\n/**\n * Type predicate for boolean values\n *\n * @param value - The value to check\n * @returns True if the value is a boolean, false otherwise\n */\nexport const isBoolean = (value: unknown): value is boolean => {\n return typeof value === \"boolean\";\n};\n\n/**\n * Type predicate for array values\n *\n * @param value - The value to check\n * @returns True if the value is an array, false otherwise\n */\nexport const isArray = <T = unknown>(value: unknown): value is T[] => {\n return Array.isArray(value);\n};\n\n/**\n * Type predicate for object values (excluding null and arrays)\n *\n * @param value - The value to check\n * @returns True if the value is an object (not null and not an array), false otherwise\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> => {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n};\n\n/**\n * Type predicate for function values\n *\n * @param value - The value to check\n * @returns True if the value is a function, false otherwise\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport const isFunction = (value: unknown): value is Function => {\n return typeof value === \"function\";\n};\n","/**\n * Debug names for ESLint configuration objects.\n * These names help identify different configuration sections in ESLint's debug output\n * and error messages, making it easier to track which rules come from which config.\n */\nexport const configNames = {\n base: \"base\",\n disableTypeChecked: \"typescript-eslint/disable-type-checked\",\n ignores: \"ignores\",\n jsdoc: \"jsdoc\",\n markdown: \"markdown\",\n nextjs: \"nextjs\",\n perfectionist: \"perfectionist\",\n preferArrowFunction: \"prefer-arrow-function\",\n react: \"react\",\n reactCompiler: \"react-compiler\",\n reactRefresh: \"react-refresh\",\n storybook: \"storybook:stories\",\n storybookConfig: \"storybook:config\",\n testing: \"testing\",\n turbo: \"turbo\",\n typescript: \"tseslint\",\n typescriptTesting: \"tseslint-testing\",\n unicorn: \"unicorn\",\n} as const;\n\nexport type ConfigName = (typeof configNames)[keyof typeof configNames];\n","import type { FunctionStyle } from \"../types.js\";\nimport type { BaseRules } from \"./types.js\";\n\n/**\n * Generates the base set of ESLint rules with configurable function style enforcement.\n *\n * @param functionStyle - Controls how functions should be written. Can be:\n * - \"off\": Disables function style enforcement\n * - \"arrow\": Enforces arrow function expressions\n * - \"declaration\": Enforces function declarations\n * - \"expression\": Enforces function expressions\n * @returns An object containing ESLint rule configurations\n */\nexport const baseEslintRules = (\n functionStyle: \"off\" | FunctionStyle,\n): BaseRules => ({\n /**\n * Require return statements in array methods callbacks.\n *\n * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return\n */\n \"array-callback-return\": [\n \"warn\",\n { allowImplicit: true, checkForEach: true },\n ],\n /**\n * Treat `var` statements as if they were block scoped.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var\n */\n \"block-scoped-var\": \"warn\",\n /**\n * Require camel case names.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/camelcase\n */\n camelcase: [\n \"warn\",\n {\n allow: [\"^UNSAFE_\"],\n ignoreDestructuring: false,\n ignoreImports: true,\n properties: \"never\",\n },\n ],\n /**\n * Require curly braces for multiline blocks.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/curly\n */\n curly: [\"warn\", \"multi-line\"],\n /**\n * Require default clauses in switch statements to be last (if used).\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last\n */\n \"default-case-last\": \"warn\",\n /**\n * Require triple equals (`===` and `!==`).\n *å\n * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq\n */\n eqeqeq: \"warn\",\n \"for-direction\": \"warn\",\n /**\n * Require function expressions to have a name.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/func-names\n */\n \"func-names\": [\"warn\", \"as-needed\"],\n \"func-style\":\n // if arrow function, we use the prefer-arrow-functions plugin\n functionStyle === \"off\" || functionStyle === \"arrow\" ?\n \"off\"\n : [\"warn\", functionStyle, { allowArrowFunctions: true }],\n /**\n * Require grouped accessor pairs in object literals and classes.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs\n */\n \"grouped-accessor-pairs\": \"warn\",\n /**\n * Require a capital letter for constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/new-cap\n */\n \"new-cap\": [\"warn\", { capIsNew: false }],\n /**\n * Disallow use of `alert()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert\n */\n \"no-alert\": \"warn\",\n \"no-async-promise-executor\": \"warn\",\n /**\n * Disallow use of bitwise operators.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-bitwise\n */\n \"no-bitwise\": \"warn\",\n /**\n * Disallow use of `caller`/`callee`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller\n */\n \"no-caller\": \"warn\",\n \"no-case-declarations\": \"warn\",\n \"no-compare-neg-zero\": \"warn\",\n \"no-cond-assign\": \"warn\",\n /**\n * Disallow the use of console.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-console\": [\"warn\", { allow: [\"info\", \"warn\", \"error\"] }],\n /**\n * Disallow expressions where the operation doesn't affect the value.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-constant-binary-expression\": \"warn\",\n \"no-constant-condition\": \"warn\",\n /**\n * Disallow returning value in constructor.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return\n */\n \"no-constructor-return\": \"warn\",\n \"no-control-regex\": \"warn\",\n \"no-debugger\": \"warn\",\n \"no-delete-var\": \"warn\",\n \"no-dupe-else-if\": \"warn\",\n \"no-duplicate-case\": \"warn\",\n /**\n * Disallow using an `else` if the `if` block contains a return.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return\n */\n \"no-else-return\": \"warn\",\n \"no-empty\": \"warn\",\n \"no-empty-character-class\": \"warn\",\n \"no-empty-pattern\": \"warn\",\n \"no-empty-static-block\": \"warn\",\n /**\n * Disallow `eval()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval\n */\n \"no-eval\": \"warn\",\n \"no-ex-assign\": \"warn\",\n /**\n * Disallow extending native objects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native\n */\n \"no-extend-native\": \"warn\",\n /**\n * Disallow unnecessary function binding.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind\n */\n \"no-extra-bind\": \"warn\",\n \"no-extra-boolean-cast\": \"warn\",\n /**\n * Disallow unnecessary labels.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label\n */\n \"no-extra-label\": \"warn\",\n \"no-fallthrough\": \"warn\",\n \"no-global-assign\": \"warn\",\n /**\n * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.\n *\n * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion\n */\n \"no-implicit-coercion\": \"warn\",\n \"no-invalid-regexp\": \"warn\",\n \"no-irregular-whitespace\": \"warn\",\n /**\n * Disallow usage of `__iterator__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator\n */\n \"no-iterator\": \"warn\",\n /**\n * Disallow labels that share a name with a variable.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var\n */\n \"no-label-var\": \"warn\",\n /**\n * Disallow use of labels for anything other than loops and switches.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels\n */\n \"no-labels\": [\"warn\"],\n /**\n * Disallow unnecessary nested blocks.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks\n */\n \"no-lone-blocks\": \"warn\",\n /**\n * Disallow if as the only statement in an else block.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-lonely-if\n */\n \"no-lonely-if\": \"warn\",\n \"no-loss-of-precision\": \"warn\",\n \"no-misleading-character-class\": \"warn\",\n /**\n * Disallow use of chained assignment expressions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign\n */\n \"no-multi-assign\": [\"warn\"],\n /**\n * Disallow `new` for side effects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new\n */\n \"no-new\": \"warn\",\n /**\n * Disallow function constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func\n */\n \"no-new-func\": \"warn\",\n /**\n * Disallow primitive wrapper instances, such as `new String('foo')`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers\n */\n \"no-new-wrappers\": \"warn\",\n \"no-nonoctal-decimal-escape\": \"warn\",\n \"no-octal\": \"warn\",\n /**\n * Disallow use of octal escape sequences in string literals.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape\n */\n \"no-octal-escape\": \"warn\",\n /**\n * Disallow reassignment of function parameters.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign\n */\n \"no-param-reassign\": \"warn\",\n /**\n * Disallow returning values from Promise executor functions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return\n */\n \"no-promise-executor-return\": \"warn\",\n /**\n * Disallow usage of the deprecated `__proto__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto\n */\n \"no-proto\": \"warn\",\n \"no-prototype-builtins\": \"warn\",\n \"no-regex-spaces\": \"warn\",\n /**\n * Disallow assignment in `return` statement.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign\n */\n \"no-return-assign\": \"warn\",\n /**\n * Disallow use of `javascript:` urls.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url\n */\n \"no-script-url\": \"warn\",\n \"no-self-assign\": \"warn\",\n /**\n * Disallow comparisons where both sides are exactly the same.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare\n */\n \"no-self-compare\": \"warn\",\n /**\n * Disallow use of comma operator.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences\n */\n \"no-sequences\": \"warn\",\n \"no-shadow-restricted-names\": \"warn\",\n \"no-sparse-arrays\": \"warn\",\n /**\n * Disallow template literal placeholder syntax in regular strings, as\n * these are likely errors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string\n */\n \"no-template-curly-in-string\": \"warn\",\n /**\n * Disallow initializing variables to `undefined`.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init\n */\n \"no-undef-init\": \"warn\",\n \"no-unexpected-multiline\": \"warn\",\n /**\n * Disallow ternary operators when simpler alternatives exist.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unneeded-ternary\n */\n \"no-unneeded-ternary\": \"warn\",\n /**\n * Disallow loops with a body that allows only one iteration.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop\n */\n \"no-unreachable-loop\": \"warn\",\n \"no-unsafe-finally\": \"warn\",\n \"no-unsafe-optional-chaining\": \"warn\",\n \"no-unused-labels\": \"warn\",\n \"no-unused-private-class-members\": \"warn\",\n \"no-useless-backreference\": \"warn\",\n /**\n * Disallow unnecessary `.call()` and `.apply()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call\n */\n \"no-useless-call\": \"warn\",\n \"no-useless-catch\": \"warn\",\n /**\n * Disallow useless computed property keys.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-computed-key\n */\n \"no-useless-computed-key\": \"warn\",\n /**\n * Disallow unnecessary concatenation of strings.\n *\n * � Not fixable - https://eslint.org/docs/rules/no-useless-concat\n */\n \"no-useless-concat\": \"warn\",\n \"no-useless-escape\": \"warn\",\n /**\n * Disallow renaming import, export, and destructured assignments to the\n * same name.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-rename\n */\n \"no-useless-rename\": \"warn\",\n /**\n * Disallow redundant return statements.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-return\n */\n \"no-useless-return\": \"warn\",\n /**\n * Require `let` or `const` instead of `var`.\n * ts transpiles let/const to var, so no need for vars any more\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-var\n */\n \"no-var\": \"warn\",\n \"no-with\": \"warn\",\n /**\n * Require object literal shorthand syntax.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand\n */\n \"object-shorthand\": \"warn\",\n /**\n * Require default to `const` instead of `let`.\n * ts provides better types with const\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-const\n */\n \"prefer-const\": \"warn\",\n /**\n * Require using named capture groups in regular expressions.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group\n */\n \"prefer-named-capture-group\": \"warn\",\n /**\n * Disallow parseInt() in favor of binary, octal, and hexadecimal literals.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals\n */\n \"prefer-numeric-literals\": \"warn\",\n /**\n * Require use of an object spread over Object.assign.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-object-spread\n */\n \"prefer-object-spread\": \"warn\",\n /**\n * Disallow use of the RegExp constructor in favor of regular expression\n * literals.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-regex-literals\n */\n \"prefer-regex-literals\": \"warn\",\n /**\n * Require using rest parameters instead of `arguments`.\n * ts provides better types with rest args over arguments\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params\n */\n \"prefer-rest-params\": \"warn\",\n /**\n * Require using spread syntax instead of `.apply()`.\n * ts transpiles spread to apply, so no need for manual apply\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread\n */\n \"prefer-spread\": \"warn\",\n /**\n * Require using template literals instead of string concatenation.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-template\n */\n \"prefer-template\": \"warn\",\n \"require-yield\": \"warn\",\n /**\n * Require a `Symbol` description.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description\n */\n \"symbol-description\": \"warn\",\n \"use-isnan\": \"warn\",\n \"valid-typeof\": \"warn\",\n /**\n * Disallow \"Yoda conditions\", ensuring the comparison.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/yoda\n */\n yoda: \"warn\",\n});\n","import type { EslintConfigObject, FunctionStyle } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { baseEslintRules } from \"./rules.js\";\n\n/**\n * Creates a base ESLint configuration object with specified function style rules.\n *\n * @param functionStyle - Controls how functions should be written. Can be:\n * - \"off\": Disables function style enforcement\n * - \"arrow\": Enforces arrow function expressions\n * - \"declaration\": Enforces function declarations\n * - \"expression\": Enforces function expressions\n * @returns ESLint configuration object\n */\nexport const baseEslintConfig = (\n functionStyle: \"off\" | FunctionStyle,\n): EslintConfigObject => ({\n languageOptions: {\n ecmaVersion: 2022,\n },\n linterOptions: { reportUnusedDisableDirectives: true },\n name: configNames.base,\n rules: baseEslintRules(functionStyle),\n});\n","import type { Linter } from \"eslint\";\n\nimport { configNames } from \"./constants.js\";\n\n/**\n * Creates an ESLint configuration for file and directory ignores.\n * By default, ignores node_modules, dist directories, and .git directories.\n *\n * @param options - Object with options to control the ignores configuration\n * @param options.userIgnores - Additional glob patterns to ignore in ESLint checks\n * @param options.next - Whether to include .next directory in ignores\n * @param options.storybook - Whether to include .storybook directory in ignores\n * @returns ESLint configuration object with ignore patterns\n */\nexport const ignoresConfig = ({\n next = false,\n storybook = false,\n userIgnores = [],\n}: {\n next?: boolean;\n storybook?: boolean;\n userIgnores?: string[];\n} = {}): Linter.Config => ({\n ignores: [\n \"**/node_modules/\",\n \"**/dist/\",\n \".git/\",\n ...(next ? [\".next\"] : []),\n ...(storybook ? [\"!.storybook\"] : []),\n ...userIgnores,\n ],\n name: configNames.ignores,\n});\n","import jsdoc from \"eslint-plugin-jsdoc\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { jsdocRules } from \"./rules.js\";\n\n/**\n * Generates ESLint configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An ESLint configuration object for JSDoc comments.\n */\nexport const jsdocConfig = (\n requireJsdoc = false,\n typescript = true,\n): EslintConfigObject => ({\n files: [\"**/*.{js,jsx,ts,tsx,cjs,mjs}\"],\n ignores: [\"**/*.{test,spec}.{js,jsx,ts,tsx,cjs,mjs}\"],\n name: configNames.jsdoc,\n plugins: {\n jsdoc,\n },\n rules: jsdocRules(requireJsdoc, typescript),\n});\n","import type { JsdocRules } from \"./types.js\";\n\n/**\n * Generates ESLint rules configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An object containing ESLint rules configuration for JSDoc validation and formatting.\n */\nexport const jsdocRules = (\n requireJsdoc = false,\n typescript = true,\n): JsdocRules => ({\n \"jsdoc/check-access\": \"warn\",\n \"jsdoc/check-alignment\": \"warn\",\n \"jsdoc/check-param-names\": [\n \"warn\",\n {\n checkDestructured: true,\n enableFixer: true,\n },\n ],\n \"jsdoc/check-property-names\": \"warn\",\n \"jsdoc/check-tag-names\": [\n \"warn\",\n {\n typed: true,\n },\n ],\n \"jsdoc/check-types\": \"warn\",\n \"jsdoc/check-values\": \"warn\",\n \"jsdoc/empty-tags\": \"warn\",\n \"jsdoc/implements-on-classes\": \"warn\",\n \"jsdoc/multiline-blocks\": \"warn\",\n \"jsdoc/no-blank-block-descriptions\": \"off\",\n \"jsdoc/no-defaults\": \"warn\",\n \"jsdoc/no-multi-asterisks\": \"warn\",\n \"jsdoc/no-types\": typescript ? \"warn\" : \"off\",\n \"jsdoc/no-undefined-types\": typescript ? \"off\" : \"warn\",\n \"jsdoc/require-asterisk-prefix\": \"warn\",\n \"jsdoc/require-description\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-jsdoc\":\n requireJsdoc ?\n [\n \"warn\",\n {\n require: {\n ArrowFunctionExpression: true,\n ClassDeclaration: true,\n ClassExpression: true,\n FunctionDeclaration: true,\n FunctionExpression: true,\n MethodDefinition: true,\n },\n },\n ]\n : \"off\",\n \"jsdoc/require-param\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-param-description\": \"warn\",\n \"jsdoc/require-param-name\": \"warn\",\n \"jsdoc/require-property\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-property-description\": \"warn\",\n \"jsdoc/require-property-name\": \"warn\",\n \"jsdoc/require-returns\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-returns-check\": \"warn\",\n \"jsdoc/require-returns-description\": \"warn\",\n \"jsdoc/require-yields\": \"warn\",\n \"jsdoc/require-yields-check\": \"warn\",\n \"jsdoc/tag-lines\": [\n \"warn\",\n \"never\",\n {\n startLines: 1, // Allow 1 line between description and first tag\n tags: {\n param: { lines: \"never\" }, // Enforce no lines between param tags\n },\n },\n ],\n \"jsdoc/text-escaping\": \"off\",\n \"jsdoc/valid-types\": \"warn\",\n});\n","import nextjs from \"eslint-plugin-nextjs\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { nextjsRules } from \"./rules.js\";\n\n/**\n * Creates an ESLint configuration for Next.js.\n *\n * @returns ESLint configuration object for Next.js\n */\nexport const nextjsConfig = (): EslintConfigObject => ({\n name: configNames.nextjs,\n plugins: {\n nextjs,\n },\n rules: nextjsRules,\n});\n","import type { NextjsRules } from \"./types.js\";\n\nexport const nextjsRules: NextjsRules = {\n \"nextjs/google-font-display\": \"warn\",\n \"nextjs/google-font-preconnect\": \"warn\",\n \"nextjs/inline-script-id\": \"warn\",\n \"nextjs/next-script-for-ga\": \"warn\",\n \"nextjs/no-assign-module-variable\": \"warn\",\n \"nextjs/no-async-client-component\": \"warn\",\n \"nextjs/no-before-interactive-script-outside-document\": \"warn\",\n \"nextjs/no-css-tags\": \"warn\",\n \"nextjs/no-document-import-in-page\": \"warn\",\n \"nextjs/no-duplicate-head\": \"warn\",\n \"nextjs/no-head-element\": \"warn\",\n \"nextjs/no-head-import-in-document\": \"warn\",\n \"nextjs/no-html-link-for-pages\": \"warn\",\n \"nextjs/no-img-element\": \"warn\",\n \"nextjs/no-page-custom-font\": \"warn\",\n \"nextjs/no-script-component-in-head\": \"warn\",\n \"nextjs/no-styled-jsx-in-document\": \"warn\",\n \"nextjs/no-sync-scripts\": \"warn\",\n \"nextjs/no-title-in-document-head\": \"warn\",\n \"nextjs/no-typos\": \"warn\",\n \"nextjs/no-unwanted-polyfillio\": \"warn\",\n};\n","import perfectionist from \"eslint-plugin-perfectionist\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { perfectionistRules } from \"./rules.js\";\n\nexport const perfectionistConfig: EslintConfigObject = {\n name: configNames.perfectionist,\n plugins: {\n perfectionist,\n },\n rules: perfectionistRules,\n};\n","import type { EslintRuleConfig } from \"../types.js\";\n\ninterface PerfectionistRuleOptions {\n order: \"asc\" | \"desc\";\n type: \"alphabetical\" | \"custom\" | \"line-length\" | \"natural\";\n}\n\nconst defaultOptions: PerfectionistRuleOptions = {\n order: \"asc\",\n type: \"natural\",\n};\n\ntype PerfectionRules = Record<\n `perfectionist/${string}`,\n EslintRuleConfig<PerfectionistRuleOptions>\n>;\n\nexport const perfectionistRules: PerfectionRules = {\n \"perfectionist/sort-array-includes\": [\"warn\", defaultOptions],\n \"perfectionist/sort-classes\": [\"warn\", defaultOptions],\n \"perfectionist/sort-decorators\": [\"warn\", defaultOptions],\n \"perfectionist/sort-enums\": [\"warn\", defaultOptions],\n \"perfectionist/sort-exports\": [\"warn\", defaultOptions],\n \"perfectionist/sort-heritage-clauses\": [\"warn\", defaultOptions],\n \"perfectionist/sort-imports\": [\"warn\", defaultOptions],\n \"perfectionist/sort-interfaces\": [\"warn\", defaultOptions],\n \"perfectionist/sort-intersection-types\": [\"warn\", defaultOptions],\n \"perfectionist/sort-jsx-props\": [\"warn\", defaultOptions],\n \"perfectionist/sort-maps\": [\"warn\", defaultOptions],\n \"perfectionist/sort-modules\": [\"off\", defaultOptions],\n \"perfectionist/sort-named-exports\": [\"warn\", defaultOptions],\n \"perfectionist/sort-named-imports\": [\"warn\", defaultOptions],\n \"perfectionist/sort-object-types\": [\"warn\", defaultOptions],\n \"perfectionist/sort-objects\": [\"warn\", defaultOptions],\n \"perfectionist/sort-sets\": [\"warn\", defaultOptions],\n \"perfectionist/sort-switch-case\": [\"warn\", defaultOptions],\n \"perfectionist/sort-union-types\": [\"warn\", defaultOptions],\n \"perfectionist/sort-variable-declarations\": [\"warn\", defaultOptions],\n};\n","import type { ESLint } from \"eslint\";\n\nimport preferArrowFunctions from \"eslint-plugin-prefer-arrow-functions\";\n\nimport type { EslintConfigObject } from \"../types.js\";\nimport type { PreferArrowFunctionsRules } from \"./types.js\";\n\nimport { configNames } from \"../constants.js\";\n\n/**\n * Creates an ESLint configuration for Prefer Arrow Functions.\n *\n * @returns ESLint configuration object for Prefer Arrow Functions\n */\nexport const preferArrowFunctionConfig = (): EslintConfigObject => ({\n name: configNames.preferArrowFunction,\n plugins: {\n \"prefer-arrow-functions\": preferArrowFunctions as ESLint.Plugin,\n },\n rules: {\n \"prefer-arrow-functions/prefer-arrow-functions\": [\n \"warn\",\n {\n returnStyle: \"unchanged\",\n singleReturnOnly: false,\n },\n ],\n } satisfies PreferArrowFunctionsRules,\n});\n","import reactCompiler from \"eslint-plugin-react-compiler\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\n\n/**\n * Creates an ESLint configuration for React Compiler.\n *\n * @returns ESLint configuration object for React Compiler\n */\nexport const reactCompilerEslintConfig: EslintConfigObject = {\n name: configNames.reactCompiler,\n plugins: {\n \"react-compiler\": reactCompiler,\n },\n rules: {\n \"react-compiler/react-compiler\": \"warn\",\n },\n};\n","import reactRefresh from \"eslint-plugin-react-refresh\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { reactRefreshRules } from \"./rules.js\";\n\n/**\n * Generates ESLint configuration for React Refresh.\n *\n * This plugin validates that components can safely be updated with Fast Refresh.\n * It enforces that components are structured in a way that integrations like\n * react-refresh expect.\n *\n * @returns An ESLint configuration object for React Refresh.\n */\nexport const reactRefreshEslintConfig = (): EslintConfigObject => {\n return {\n name: configNames.reactRefresh,\n plugins: {\n \"react-refresh\": reactRefresh,\n },\n rules: reactRefreshRules,\n };\n};\n","import type { EslintRuleConfig } from \"../types.js\";\n\nexport type ReactRefreshRules = Record<string, EslintRuleConfig> & {\n \"react-refresh/only-export-components\"?: EslintRuleConfig<{\n /**\n * Don't warn when a constant (string, number, boolean, templateLiteral)\n * is exported aside one or more components.\n */\n allowConstantExport?: boolean;\n /**\n * If you use a framework that handles HMR of some specific exports,\n * you can use this option to avoid warning for them.\n */\n allowExportNames?: string[];\n /**\n * If you're using JSX inside .js files, you can enable this option.\n * To reduce false positives, only files importing 'react' are checked.\n */\n checkJS?: boolean;\n /**\n * If you're exporting a component wrapped in a custom HOC,\n * you can use this option to avoid false positives.\n */\n customHOCs?: string[];\n }>;\n};\n\n/**\n * Generates ESLint rules configuration for React Refresh.\n *\n * This plugin validates that components can safely be updated with Fast Refresh.\n *\n * @returns Configuration object containing ESLint rules for React Refresh\n */\nexport const reactRefreshRules: ReactRefreshRules = {\n /**\n * Validate that your components can safely be updated with Fast Refresh.\n *\n * This rule enforces that components are structured in a way that integrations\n * like react-refresh expect.\n *\n * 🚫 Not fixable - https://github.com/ArnaudBarre/eslint-plugin-react-refresh\n */\n \"react-refresh/only-export-components\": [\n \"warn\",\n { allowConstantExport: true },\n ],\n};\n","import react from \"eslint-plugin-react\";\nimport pluginReactHooks from \"eslint-plugin-react-hooks\";\nimport globals from \"globals\";\n\nimport type { EslintConfigObject, FunctionStyle } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { reactRules } from \"./rules.js\";\n\n/**\n * Generates ESLint configuration for React.\n *\n * @param functionStyle - Controls how functions (components) should be written. Can be:\n * - \"off\": Disables function style enforcement\n * - \"arrow\": Enforces arrow function expressions\n * - \"declaration\": Enforces function declarations\n * - \"expression\": Enforces function expressions\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An ESLint configuration object for React.\n */\nexport const reactEslintConfig = (\n functionStyle: \"off\" | FunctionStyle,\n typescript: boolean,\n): EslintConfigObject => {\n return {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n name: configNames.react,\n plugins: {\n react,\n \"react-hooks\": pluginReactHooks,\n },\n rules: reactRules(functionStyle, typescript),\n settings: {\n react: {\n version: \"detect\",\n },\n },\n };\n};\n","import type { EslintRuleConfig, FunctionStyle } from \"../types.js\";\n\ntype ReactFunctionDefinitions =\n | \"arrow-function\"\n | \"function-declaration\"\n | \"function-expression\";\n\ntype ReactRules = Record<\n `${\"react\" | \"react-hooks\"}/${string}`,\n EslintRuleConfig\n> & {\n \"react/destructuring-assignment\"?: EslintRuleConfig<\n \"always\" | \"never\",\n {\n destructureInSignature?: \"always\" | \"ignore\";\n ignoreClassFields?: boolean;\n }\n >;\n \"react/function-component-definition\"?: EslintRuleConfig<{\n namedComponents?: ReactFunctionDefinitions | ReactFunctionDefinitions[];\n unnamedComponents?:\n | \"arrow-function\"\n | \"function-expression\"\n | (\"arrow-function\" | \"function-expression\")[];\n }>;\n};\n\n/**\n * Generates ESLint rules configuration for React and React Hooks.\n * Includes settings for function component style enforcement and TypeScript-specific rules.\n *\n * @param functionStyle - The preferred style for React function components: 'arrow' for arrow functions, 'declaration' for function declarations, 'expression' for function expressions, or 'off' to disable style enforcement\n * @param typescript - Whether TypeScript-specific React rules should be enabled\n * @returns Configuration object containing ESLint rules for React and React Hooks\n */\nexport const reactRules = (\n functionStyle: \"off\" | FunctionStyle,\n typescript: boolean,\n): ReactRules => {\n const functionStyleMap: Record<FunctionStyle, ReactFunctionDefinitions> = {\n arrow: \"arrow-function\",\n declaration: \"function-declaration\",\n expression: \"function-expression\",\n };\n\n return {\n /**\n * Disabled in favor of TypeScript for type checking\n */\n ...(typescript ? {} : { \"react/prop-types\": \"warn\" }),\n \"react-hooks/exhaustive-deps\": \"warn\",\n \"react-hooks/rules-of-hooks\": \"warn\",\n /**\n * Require an explicit type when using button elements.\n *\n * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md\n */\n \"react/button-has-type\": \"warn\",\n \"react/destructuring-assignment\": [\"warn\", \"always\"],\n \"react/display-name\": \"warn\",\n /**\n * Require consistent function type for function components.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/docs/rules/function-component-definition.md\n */\n \"react/function-component-definition\":\n functionStyle === \"off\" ? \"off\" : (\n [\n \"warn\",\n {\n namedComponents: functionStyleMap[functionStyle],\n unnamedComponents:\n functionStyle === \"arrow\" ? \"arrow-function\" : (\n \"function-expression\"\n ),\n },\n ]\n ),\n /**\n * Require destructuring and symmetric naming of `useState` hook value and setter variables.\n *\n * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md\n */\n \"react/hook-use-state\": \"warn\",\n /**\n * Require consistent boolean attributes notation in JSX.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n */\n \"react/jsx-boolean-value\": \"warn\",\n /**\n * Disallow unnecessary curly braces in JSX props and children.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n */\n \"react/jsx-curly-brace-presence\": \"warn\",\n /**\n * Require using shorthand form for React fragments, unless required.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md\n */\n \"react/jsx-fragments\": \"warn\",\n \"react/jsx-key\": \"warn\",\n \"react/jsx-no-comment-textnodes\": \"warn\",\n \"react/jsx-no-duplicate-props\": \"warn\",\n /**\n * Prevent problematic leaked values from being rendered.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md\n */\n \"react/jsx-no-leaked-render\": \"warn\",\n /**\n * Prevents usage of unsafe `target='_blank'`.\n *\n * This rule is a part of `react/recommended`, but we've modified it to\n * allow referrer.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md\n */\n \"react/jsx-no-target-blank\": [\n \"warn\",\n {\n allowReferrer: true,\n },\n ],\n \"react/jsx-no-undef\": \"warn\",\n /**\n * Disallow empty React fragments.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n */\n \"react/jsx-no-useless-fragment\": [\"warn\", { allowExpressions: true }],\n /**\n * Require the use of PascalCase for user-defined JSX components.\n *\n * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n */\n \"react/jsx-pascal-case\": \"warn\",\n \"react/jsx-uses-react\": \"warn\",\n \"react/jsx-uses-vars\": \"warn\",\n /**\n * Disallow usage of Array index in keys.\n *\n * � Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n */\n \"react/no-array-index-key\": \"warn\",\n \"react/no-children-prop\": \"warn\",\n \"react/no-danger-with-children\": \"warn\",\n \"react/no-deprecated\": \"warn\",\n \"react/no-direct-mutation-state\": \"warn\",\n \"react/no-find-dom-node\": \"warn\",\n \"react/no-is-mounted\": \"warn\",\n \"react/no-render-return-value\": \"warn\",\n \"react/no-string-refs\": \"warn\",\n \"react/no-unescaped-entities\": \"warn\",\n \"react/no-unknown-property\": \"warn\",\n \"react/no-unsafe\": \"warn\",\n /**\n * Disallow creating unstable components inside components.\n *\n * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md\n */\n \"react/no-unstable-nested-components\": \"warn\",\n \"react/require-render-return\": \"warn\",\n /**\n * Disallow closing tags for components without children.\n *\n * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n */\n \"react/self-closing-comp\": \"warn\",\n };\n};\n","import type { ESLint } from \"eslint\";\n\nimport storybookPlugin from \"eslint-plugin-storybook\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\n\n/**\n * ESLint configuration for Storybook.\n * Contains rules for best practices when working with Storybook.\n *\n * @returns Storybook ESLint config\n */\nexport const storybookConfig: EslintConfigObject[] = [\n {\n files: [\n \"**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)\",\n \"**/*.story.@(ts|tsx|js|jsx|mjs|cjs)\",\n ],\n name: configNames.storybook,\n plugins: {\n storybook: storybookPlugin as unknown as ESLint.Plugin,\n },\n rules: {\n \"import/no-anonymous-default-export\": \"off\",\n \"react-hooks/rules-of-hooks\": \"off\",\n \"storybook/await-interactions\": \"warn\",\n \"storybook/context-in-play-function\": \"warn\",\n \"storybook/csf-component\": \"warn\",\n \"storybook/default-exports\": \"warn\",\n \"storybook/hierarchy-separator\": \"warn\",\n \"storybook/meta-inline-properties\": \"warn\",\n \"storybook/no-redundant-story-name\": \"warn\",\n \"storybook/prefer-pascal-case\": \"warn\",\n \"storybook/story-exports\": \"warn\",\n \"storybook/use-storybook-expect\": \"warn\",\n \"storybook/use-storybook-testing-library\": \"warn\",\n },\n },\n {\n files: [\".storybook/main.@(js|cjs|mjs|ts)\"],\n name: configNames.storybookConfig,\n plugins: {\n storybook: storybookPlugin as unknown as ESLint.Plugin,\n },\n rules: {\n \"storybook/no-uninstalled-addons\": \"warn\",\n },\n },\n];\n","import jest from \"eslint-plugin-jest\";\nimport vitest from \"eslint-plugin-vitest\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { jestRules } from \"./jest-rules.js\";\nimport { vitestRules } from \"./vitest-rules.js\";\n\nexport interface TestingConfig {\n filenamePattern?: \"spec\" | \"test\";\n files?: string[];\n formattingRules?: boolean;\n framework?: \"bun\" | \"jest\" | \"node\" | \"vitest\";\n itOrTest?: \"it\" | \"test\";\n}\n\n/**\n * Creates an ESLint configuration object for testing.\n *\n * @param options - Configuration options\n * @param options.files - Files to include in the configuration\n * @param options.filenamePattern - \".test\" or \".spec\" filename pattern\n * @param options.itOrTest - \"it\" or \"test\"\n * @param options.framework - \"jest\" or \"vitest\"\n * @param options.formattingRules - Whether to include formatting rules like padding around blocks\n * @returns ESLint configuration object\n */\nexport const testingConfig = (\n {\n filenamePattern,\n files,\n formattingRules,\n framework,\n itOrTest,\n }: TestingConfig = {\n filenamePattern: \"test\",\n formattingRules: true,\n framework: \"vitest\",\n itOrTest: \"test\",\n },\n): EslintConfigObject => ({\n files: files ?? [\"**/*.{test,spec}.{ts,tsx,js,jsx}\"],\n languageOptions: {\n globals:\n framework === \"vitest\" ?\n { ...vitest.environments.env.globals }\n : jest.environments.globals.globals,\n },\n name: configNames.testing,\n plugins: {\n jest,\n vitest,\n },\n rules: {\n // jest doesn't have a file name rule, so we'll use this one for both\n \"@typescript-eslint/unbound-method\": \"off\",\n \"vitest/consistent-test-filename\": [\n \"warn\",\n {\n allTestPattern: \".*\\\\.(test|spec)\\\\.[tj]sx?$\",\n pattern: `.*\\\\.${filenamePattern}\\\\.[tj]sx?$`,\n },\n ],\n ...(framework === \"vitest\" ? vitestRules(itOrTest) : jestRules(itOrTest)),\n ...(formattingRules ?\n {\n \"jest/padding-around-after-all-blocks\": \"warn\",\n \"jest/padding-around-after-each-blocks\": \"warn\",\n \"jest/padding-around-before-all-blocks\": \"warn\",\n \"jest/padding-around-before-each-blocks\": \"warn\",\n \"jest/padding-around-describe-blocks\": \"warn\",\n \"jest/padding-around-expect-groups\": \"warn\",\n \"jest/padding-around-test-blocks\": \"warn\",\n }\n : {}),\n },\n ...(framework !== \"jest\" && framework !== \"vitest\" ?\n {\n settings: {\n jest: {\n globalPackage: framework === \"node\" ? \"node:test\" : \"bun:test\",\n },\n },\n }\n : {}),\n});\n","import type { EslintRuleConfig } from \"../types.js\";\n\ntype JestRules = Record<`jest/${string}`, EslintRuleConfig>;\n\n/**\n * Creates an object containing the ESLint rules for jest.\n *\n * @param itOrTest - \"it\" or \"test\"\n * @returns An object containing the ESLint rules for jest.\n */\nexport const jestRules = (itOrTest: \"it\" | \"test\" = \"test\"): JestRules => ({\n \"jest/consistent-test-it\": [\n \"warn\",\n { fn: itOrTest, withinDescribe: itOrTest },\n ],\n \"jest/expect-expect\": \"warn\",\n \"jest/no-commented-out-tests\": \"warn\",\n \"jest/no-conditional-expect\": \"warn\",\n \"jest/no-conditional-in-test\": \"warn\",\n \"jest/no-disabled-tests\": \"warn\",\n \"jest/no-duplicate-hooks\": \"warn\",\n \"jest/no-focused-tests\": \"warn\",\n \"jest/no-identical-title\": \"warn\",\n \"jest/no-interpolation-in-snapshots\": \"warn\",\n \"jest/no-large-snapshots\": [\"warn\", { inlineMaxSize: 50, maxSize: 100 }],\n \"jest/no-mocks-import\": \"warn\", // Discourage manually importing from __mocks__\n \"jest/no-standalone-expect\": \"warn\",\n \"jest/no-test-prefixes\": \"warn\", // Prefer .only and .skip over f and x\n \"jest/no-test-return-statement\": \"warn\",\n \"jest/prefer-comparison-matcher\": \"warn\",\n \"jest/prefer-equality-matcher\": \"warn\",\n \"jest/prefer-expect-resolves\": \"warn\",\n \"jest/prefer-hooks-in-order\": \"warn\",\n \"jest/prefer-hooks-on-top\": \"warn\",\n \"jest/prefer-lowercase-title\": [\"warn\", { ignoreTopLevelDescribe: true }],\n \"jest/prefer-snapshot-hint\": \"warn\",\n \"jest/prefer-spy-on\": \"warn\",\n \"jest/prefer-strict-equal\": \"warn\",\n \"jest/prefer-to-be\": \"warn\",\n \"jest/prefer-to-contain\": \"warn\",\n \"jest/prefer-to-have-length\": \"warn\",\n \"jest/require-top-level-describe\": \"warn\",\n \"jest/valid-describe-callback\": \"warn\",\n \"jest/valid-expect\": \"warn\",\n \"jest/valid-expect-in-promise\": \"warn\",\n \"jest/valid-title\": \"warn\",\n});\n","import type { EslintRuleConfig } from \"../types.js\";\n\ntype VitestRules = Record<`vitest/${string}`, EslintRuleConfig>;\n\n/**\n * Creates an object containing the ESLint rules for vitest.\n *\n * @param itOrTest - \"it\" or \"test\"\n * @returns An object containing the ESLint rules for vitest.\n */\nexport const vitestRules = (itOrTest: \"it\" | \"test\" = \"test\"): VitestRules => ({\n \"vitest/consistent-test-it\": [\n \"warn\",\n { fn: itOrTest, withinDescribe: itOrTest },\n ],\n \"vitest/expect-expect\": \"warn\",\n \"vitest/no-commented-out-tests\": \"warn\",\n \"vitest/no-conditional-in-test\": \"warn\",\n \"vitest/no-disabled-tests\": \"warn\",\n \"vitest/no-duplicate-hooks\": \"warn\",\n \"vitest/no-focused-tests\": \"warn\",\n \"vitest/no-identical-title\": \"warn\",\n \"vitest/no-import-node-test\": \"warn\",\n \"vitest/no-interpolation-in-snapshots\": \"warn\", // Avoid dynamic snapshots\n \"vitest/no-large-snapshots\": [\"warn\", { inlineMaxSize: 50, maxSize: 100 }], // Keep snapshots manageable\n \"vitest/no-standalone-expect\": \"warn\",\n \"vitest/no-test-return-statement\": \"warn\", // Tests shouldn't return values\n \"vitest/prefer-comparison-matcher\": \"warn\", // Use comparison matchers\n \"vitest/prefer-equality-matcher\": \"warn\", // Use equality matchers\n \"vitest/prefer-hooks-in-order\": \"warn\", // Keep hooks in a predictable order\n \"vitest/prefer-hooks-on-top\": \"warn\", // Keep hooks organized\n \"vitest/prefer-lowercase-title\": [\"warn\", { ignoreTopLevelDescribe: true }], // Consistent casing\n \"vitest/prefer-strict-equal\": \"warn\", // Prefer .toStrictEqual() over .toEqual()\n \"vitest/prefer-to-be\": \"warn\", // Use .toBe() for primitives\n \"vitest/prefer-to-contain\": \"warn\", // Use .toContain() for array/string includes\n \"vitest/prefer-to-have-length\": \"warn\", // Use .toHaveLength() for checking length\n \"vitest/require-local-test-context-for-concurrent-snapshots\": \"warn\",\n \"vitest/require-top-level-describe\": \"warn\", // Group tests in describe blocks\n \"vitest/valid-describe-callback\": \"warn\",\n \"vitest/valid-expect\": \"warn\",\n \"vitest/valid-title\": \"warn\",\n});\n","import turbo from \"eslint-plugin-turbo\";\n\nimport type { EslintConfigObject } from \"../types.js\";\nimport type { TurboRules } from \"./types.js\";\n\nimport { configNames } from \"../constants.js\";\n\n/**\n * Creates an ESLint configuration for Turbo.\n *\n * @returns ESLint configuration object for Turbo\n */\nexport const turboConfig = (): EslintConfigObject => ({\n name: configNames.turbo,\n plugins: {\n turbo,\n },\n rules: {\n \"turbo/no-undeclared-env-vars\": \"warn\",\n } satisfies TurboRules,\n});\n","import tseslint, { type Config } from \"typescript-eslint\";\n\nimport { configNames } from \"../constants.js\";\nimport { tseslintRules } from \"./rules.js\";\n\n/**\n * Creates a TypeScript ESLint configuration object.\n *\n * @param tsconfigPath - Path to the TypeScript configuration file\n * @returns TypeScript ESLint configuration object\n */\nexport const tseslintConfig = (tsconfigPath?: string): Config => {\n const userCwd = process.cwd();\n\n return tseslint.config(\n {\n files: [\"**/*.{js,cjs,mjs,ts,jsx,tsx}\"],\n languageOptions: {\n parser: tseslint.parser,\n parserOptions: {\n ...(tsconfigPath ?\n { project: tsconfigPath, tsconfigRootDir: userCwd }\n : { projectService: true, tsconfigRootDir: import.meta.dirname }),\n },\n },\n name: configNames.typescript,\n plugins: {\n \"@typescript-eslint\": tseslint.plugin,\n },\n rules: tseslintRules,\n },\n {\n // disable type-aware linting on JS files\n extends: [tseslint.configs.disableTypeChecked],\n files: [\"**/*.js\"],\n },\n );\n};\n","import type { TypescriptRules } from \"./types.js\";\n\nexport const tseslintRules: TypescriptRules = {\n \"@typescript-eslint/adjacent-overload-signatures\": \"warn\",\n \"@typescript-eslint/array-type\": \"warn\",\n \"@typescript-eslint/await-thenable\": \"warn\",\n \"@typescript-eslint/ban-ts-comment\": [\n \"warn\",\n { minimumDescriptionLength: 10 },\n ],\n \"@typescript-eslint/ban-tslint-comment\": \"warn\",\n \"@typescript-eslint/class-literal-property-style\": \"warn\",\n \"@typescript-eslint/consistent-generic-constructors\": \"warn\",\n \"@typescript-eslint/consistent-indexed-object-style\": \"warn\",\n \"@typescript-eslint/consistent-type-assertions\": \"warn\",\n \"@typescript-eslint/consistent-type-definitions\": \"warn\",\n \"@typescript-eslint/consistent-type-exports\": [\n \"warn\",\n { fixMixedExportsWithInlineTypeSpecifier: true },\n ],\n \"@typescript-eslint/consistent-type-imports\": [\n \"warn\",\n {\n fixStyle: \"inline-type-imports\",\n prefer: \"type-imports\",\n },\n ],\n \"@typescript-eslint/dot-notation\": \"warn\",\n \"@typescript-eslint/no-array-constructor\": \"warn\",\n \"@typescript-eslint/no-array-delete\": \"warn\",\n \"@typescript-eslint/no-base-to-string\": \"warn\",\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-confusing-void-expression\": \"warn\",\n \"@typescript-eslint/no-deprecated\": \"warn\",\n \"@typescript-eslint/no-duplicate-enum-values\": \"warn\",\n \"@typescript-eslint/no-duplicate-type-constituents\": \"warn\",\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n \"@typescript-eslint/no-empty-function\": \"warn\",\n \"@typescript-eslint/no-empty-object-type\": \"warn\",\n \"@typescript-eslint/no-explicit-any\": \"warn\",\n \"@typescript-eslint/no-extra-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-extraneous-class\": \"warn\",\n \"@typescript-eslint/no-floating-promises\": \"warn\",\n \"@typescript-eslint/no-for-in-array\": \"warn\",\n \"@typescript-eslint/no-implied-eval\": \"warn\",\n \"@typescript-eslint/no-import-type-side-effects\": \"warn\",\n \"@typescript-eslint/no-inferrable-types\": \"warn\",\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n \"@typescript-eslint/no-meaningless-void-operator\": \"warn\",\n \"@typescript-eslint/no-misused-new\": \"warn\",\n \"@typescript-eslint/no-misused-promises\": \"warn\",\n \"@typescript-eslint/no-mixed-enums\": \"warn\",\n \"@typescript-eslint/no-namespace\": \"warn\",\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"warn\",\n \"@typescript-eslint/no-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-redundant-type-constituents\": \"warn\",\n \"@typescript-eslint/no-require-imports\": \"warn\",\n \"@typescript-eslint/no-this-alias\": \"warn\",\n \"@typescript-eslint/no-unnecessary-boolean-literal-compare\": \"warn\",\n \"@typescript-eslint/no-unnecessary-condition\": \"warn\",\n \"@typescript-eslint/no-unnecessary-template-expression\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-parameters\": \"warn\",\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"warn\",\n \"@typescript-eslint/no-unsafe-enum-comparison\": \"warn\",\n \"@typescript-eslint/no-unsafe-function-type\": \"warn\",\n \"@typescript-eslint/no-unsafe-unary-minus\": \"warn\",\n \"@typescript-eslint/no-unused-expressions\": \"warn\",\n \"@typescript-eslint/no-unused-vars\": [\n \"warn\",\n {\n args: \"after-used\",\n argsIgnorePattern: \"^_\",\n ignoreRestSiblings: false,\n vars: \"all\",\n varsIgnorePattern: \"^_\",\n },\n ],\n \"@typescript-eslint/no-useless-constructor\": \"warn\",\n \"@typescript-eslint/no-wrapper-object-types\": \"warn\",\n // TODO: Investiate non-null vs type-cast rules\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n \"@typescript-eslint/only-throw-error\": \"warn\",\n \"@typescript-eslint/prefer-as-const\": \"warn\",\n \"@typescript-eslint/prefer-find\": \"warn\",\n \"@typescript-eslint/prefer-for-of\": \"warn\",\n \"@typescript-eslint/prefer-function-type\": \"warn\",\n \"@typescript-eslint/prefer-includes\": \"warn\",\n \"@typescript-eslint/prefer-literal-enum-member\": \"warn\",\n \"@typescript-eslint/prefer-namespace-keyword\": \"warn\",\n \"@typescript-eslint/prefer-nullish-coalescing\": \"warn\",\n \"@typescript-eslint/prefer-optional-chain\": \"warn\",\n \"@typescript-eslint/prefer-promise-reject-errors\": \"warn\",\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"warn\",\n \"@typescript-eslint/prefer-regexp-exec\": \"warn\",\n \"@typescript-eslint/prefer-return-this-type\": \"warn\",\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"warn\",\n \"@typescript-eslint/related-getter-setter-pairs\": \"warn\",\n \"@typescript-eslint/require-await\": \"warn\",\n \"@typescript-eslint/restrict-plus-operands\": [\n \"warn\",\n {\n allowAny: false,\n allowBoolean: false,\n allowNullish: false,\n allowNumberAndString: false,\n allowRegExp: false,\n },\n ],\n \"@typescript-eslint/restrict-template-expressions\": [\n \"warn\",\n {\n allow: [{ from: \"lib\", name: [\"Error\", \"URL\", \"URLSearchParams\"] }],\n allowAny: true,\n allowBoolean: true,\n allowNullish: true,\n allowNumber: true,\n allowRegExp: true,\n },\n ],\n \"@typescript-eslint/return-await\": [\n \"warn\",\n \"error-handling-correctness-only\",\n ],\n \"@typescript-eslint/triple-slash-reference\": \"warn\",\n \"@typescript-eslint/unbound-method\": \"warn\",\n \"@typescript-eslint/unified-signatures\": \"warn\",\n \"@typescript-eslint/use-unknown-in-catch-callback-variable\": \"warn\",\n};\n","import unicorn from \"eslint-plugin-unicorn\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { rules } from \"./rules.js\";\n\n/**\n * ESLint configuration for unicorn plugin.\n * This plugin provides a set of rules to enforce consistent code style and catch common errors.\n */\nexport const unicornConfig: EslintConfigObject = {\n name: configNames.unicorn,\n plugins: {\n unicorn,\n },\n rules,\n};\n","import type { EslintRuleConfig } from \"../types.js\";\n\ntype UnicornRules = Record<`unicorn/${string}`, EslintRuleConfig>;\n\nexport const rules: UnicornRules = {\n /**\n * Enforce better string content.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md\n */\n \"unicorn/better-regex\": \"warn\",\n /**\n * Enforce passing a message value when creating a built-in error.\n *\n * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md\n */\n \"unicorn/error-message\": \"warn\",\n /**\n * Require consistent filename case for all linted files.\n *\n * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md\n */\n \"unicorn/filename-case\": [\n \"warn\",\n {\n case: \"kebabCase\",\n },\n ],\n /**\n * Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md\n */\n \"unicorn/new-for-builtins\": \"warn\",\n \"unicorn/no-console-spaces\": \"warn\",\n /**\n * Enforce using for-loop instead of while-loop.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md\n */\n \"unicorn/no-for-loop\": \"warn\",\n /**\n * Enforce the use of addEventListener and removeEventListener over on-functions.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md\n */\n \"unicorn/prefer-add-event-listener\": \"warn\",\n /**\n * Require using the `node:` protocol when importing Node.js built-in modules.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md\n */\n \"unicorn/prefer-node-protocol\": \"warn\",\n /**\n * Prefer String#replaceAll() over String#replace() with a global regExp.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md\n */\n \"unicorn/prefer-string-replace-all\": \"warn\",\n /**\n * Enforce throwing TypeError in type checking conditions.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md\n */\n \"unicorn/prefer-type-error\": \"warn\",\n /**\n * Enforce consistent brace style for case clauses.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md\n */\n \"unicorn/switch-case-braces\": [\"warn\", \"always\"],\n /**\n * Enforce consistent case for text encoding identifiers.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md\n */\n \"unicorn/text-encoding-identifier-case\": \"warn\",\n};\n","import type { Linter } from \"eslint\";\n\nimport type { FunctionStyle } from \"./types.js\";\n\nimport { isObject, isString } from \"../utils/is-type.js\";\nimport { baseEslintConfig } from \"./base/config.js\";\nimport { ignoresConfig } from \"./ignores.js\";\nimport { jsdocConfig } from \"./jsdoc/config.js\";\nimport { nextjsConfig } from \"./nextjs/config.js\";\nimport { perfectionistConfig } from \"./perfectionist/config.js\";\nimport { preferArrowFunctionConfig } from \"./prefer-arrow-function/config.js\";\nimport { reactCompilerEslintConfig } from \"./react-compiler/config.js\";\nimport { reactRefreshEslintConfig } from \"./react-refresh/config.js\";\nimport { reactEslintConfig } from \"./react/config.js\";\nimport { storybookConfig } from \"./storybook/config.js\";\nimport { testingConfig, type TestingConfig } from \"./testing/config.js\";\nimport { turboConfig } from \"./turbo/config.js\";\nimport { tseslintConfig } from \"./typescript/config.js\";\nimport { unicornConfig } from \"./unicorn/config.js\";\n\nexport interface EslintConfigOptions {\n functionStyle?: \"off\" | FunctionStyle;\n ignores?: string[];\n jsdoc?:\n | false\n | {\n requireJsdoc?: boolean;\n };\n react?:\n | boolean\n | {\n framework?: \"next\" | \"none\" | \"vite\";\n next?: boolean | undefined;\n reactCompiler?: boolean | undefined;\n reactRefresh?: boolean | undefined;\n };\n sorting?: boolean;\n storybook?: boolean;\n testing?: false | TestingConfig;\n turbo?: boolean;\n typescript?: boolean | string;\n unicorn?: boolean;\n}\n\n/**\n * Configures ESLint based on provided options.\n *\n * @param options - The optional configuration object.\n * @param options.functionStyle - The function style to enforce. Defaults to \"arrow\".\n * @param options.ignores - Additional paths to ignore. Already excludes `node_modules` and `dist`.\n * @param options.jsdoc - Whether to include JSDoc rules. Set to false to disable, or provide an object to configure.\n * @param options.react - Whether to include React rules. When true, reactCompiler is enabled by default.\n * Can be configured with an object to control next.js support and reactCompiler.\n * Also controls reactRefresh, which is enabled by default when react is true.\n * Can specify framework as \"next\", \"none\", or \"vite\" to control related configs:\n * - \"next\": Includes Next.js config, excludes React Refresh.\n * - \"vite\" or \"none\": Includes React Refresh, excludes Next.js.\n * - The reactRefresh property can override this framework-based behavior.\n * @param options.sorting - Whether to include sorting rules from Perfectionist. Defaults to true.\n * @param options.storybook - Whether to include Storybook rules. Defaults to false.\n * @param options.testing - An object with the following properties:\n * - `filenamePattern`: One of \"spec\" or \"test\" to determine which filename pattern to use.\n * - `files`: Array of file patterns to include in the configuration.\n * - `framework`: One of \"vitest\" or \"jest\" to determine which testing library to use.\n * - `formattingRules`: Whether to include formatting rules like padding around blocks.\n * - `itOrTest`: One of \"it\" or \"test\" to determine which test function to use.\n * @param options.typescript - Whether to include TypeScript rules. Can be a boolean or a string with path to tsconfig.\n * @param options.turbo - Whether to include Turborepo rules. Defaults to false.\n * @param options.unicorn - Whether to include Unicorn rules. Defaults to true.\n * @param additionalConfigs - Additional ESLint config objects to be merged into the final configuration.\n * @returns An array of ESLint configuration objects.\n */\nexport const eslintConfig = (\n {\n functionStyle = \"arrow\",\n ignores = [],\n jsdoc = { requireJsdoc: false },\n react = false,\n sorting = true,\n storybook = false,\n testing,\n /**\n * Some preceding documentation...\n *\n * @param options.turbo - Whether to include Turborepo rules. Defaults to false.\n *\n * Some following documentation...\n */\n turbo = false,\n typescript = true,\n unicorn = true,\n }: EslintConfigOptions = {},\n ...additionalConfigs: Linter.Config[]\n): Linter.Config[] => {\n const configs: Linter.Config[] = [\n ignoresConfig({\n next:\n isObject(react) && (react.framework === \"next\" || react.next === true),\n storybook,\n userIgnores: ignores,\n }),\n baseEslintConfig(functionStyle),\n ];\n\n if (jsdoc !== false) {\n configs.push(jsdocConfig(jsdoc.requireJsdoc ?? false));\n }\n\n if (typescript) {\n configs.push(\n ...(tseslintConfig(\n isString(typescript) ? typescript : undefined,\n ) as Linter.Config[]),\n );\n }\n\n if (react) {\n configs.push(reactEslintConfig(functionStyle, Boolean(typescript)));\n\n // Apply reactCompiler by default if react is true or if react.reactCompiler isn't explicitly false\n const shouldUseReactCompiler =\n react === true || (isObject(react) && react.reactCompiler !== false);\n\n if (shouldUseReactCompiler) {\n configs.push(reactCompilerEslintConfig);\n }\n\n // Determine if we should use Next.js config\n const isNextFramework =\n isObject(react) &&\n (react.framework === \"next\" ||\n (react.next === true && react.framework === undefined));\n\n if (isNextFramework) {\n configs.push(nextjsConfig());\n }\n\n // Determine if we should use React Refresh\n // Apply reactRefresh based on framework setting or explicit override\n const shouldUseReactRefresh =\n // Explicit setting takes precedence\n (isObject(react) && react.reactRefresh === true) ||\n // Framework-based default (vite/none use reactRefresh by default)\n (isObject(react) &&\n (react.framework === \"vite\" || react.framework === \"none\") &&\n react.reactRefresh !== false);\n\n if (shouldUseReactRefresh) {\n configs.push(reactRefreshEslintConfig());\n }\n }\n\n if (testing !== false) {\n const defaultTestingConfig: TestingConfig = {\n filenamePattern: \"test\",\n files: [\"**/*.{test,spec}.{ts,tsx,js,jsx}\"],\n formattingRules: true,\n framework: \"vitest\",\n itOrTest: \"it\",\n };\n\n // Merge the user's testing config with defaults\n const mergedTestingConfig: TestingConfig = {\n ...defaultTestingConfig,\n ...(isObject(testing) ? testing : {}),\n };\n\n // Destructure from the merged config\n const { filenamePattern, files, formattingRules, framework, itOrTest } =\n mergedTestingConfig;\n\n configs.push(\n testingConfig({\n filenamePattern,\n files,\n formattingRules,\n framework,\n itOrTest,\n }),\n );\n }\n\n if (sorting) {\n configs.push(perfectionistConfig);\n }\n\n if (unicorn) {\n configs.push(unicornConfig);\n }\n\n if (functionStyle === \"arrow\") {\n configs.push(preferArrowFunctionConfig());\n }\n\n if (storybook) {\n configs.push(...storybookConfig);\n }\n\n if (turbo) {\n configs.push(turboConfig());\n }\n\n // Add any additional config objects provided by the user\n if (additional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A,EAC1C;AAEA,MAAI,WAAW;AACb,YAAQ,KAAK,GAAG,eAAe;AAAA,EACjC;AAEA,MAAID,QAAO;AACT,YAAQ,KAAK,YAAY,CAAC;AAAA,EAC5B;AAGA,MAAI,kBAAkB,SAAS,GAAG;AAChC,YAAQ,KAAK,GAAG,iBAAiB;AAAA,EACnC;AAEA,SAAO;AACT;","names":["jsdoc","react","turbo","unicorn"]}
|
|
@@ -1,8 +1,108 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// src/eslint/jsdoc/config.ts
|
|
2
|
+
import jsdoc from "eslint-plugin-jsdoc";
|
|
3
|
+
|
|
4
|
+
// src/eslint/constants.ts
|
|
5
|
+
var configNames = {
|
|
6
|
+
base: "base",
|
|
7
|
+
disableTypeChecked: "typescript-eslint/disable-type-checked",
|
|
8
|
+
ignores: "ignores",
|
|
9
|
+
jsdoc: "jsdoc",
|
|
10
|
+
markdown: "markdown",
|
|
11
|
+
nextjs: "nextjs",
|
|
12
|
+
perfectionist: "perfectionist",
|
|
13
|
+
preferArrowFunction: "prefer-arrow-function",
|
|
14
|
+
react: "react",
|
|
15
|
+
reactCompiler: "react-compiler",
|
|
16
|
+
reactRefresh: "react-refresh",
|
|
17
|
+
storybook: "storybook:stories",
|
|
18
|
+
storybookConfig: "storybook:config",
|
|
19
|
+
testing: "testing",
|
|
20
|
+
turbo: "turbo",
|
|
21
|
+
typescript: "tseslint",
|
|
22
|
+
typescriptTesting: "tseslint-testing",
|
|
23
|
+
unicorn: "unicorn"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// src/eslint/jsdoc/rules.ts
|
|
27
|
+
var jsdocRules = (requireJsdoc = false, typescript = true) => ({
|
|
28
|
+
"jsdoc/check-access": "warn",
|
|
29
|
+
"jsdoc/check-alignment": "warn",
|
|
30
|
+
"jsdoc/check-param-names": [
|
|
31
|
+
"warn",
|
|
32
|
+
{
|
|
33
|
+
checkDestructured: true,
|
|
34
|
+
enableFixer: true
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"jsdoc/check-property-names": "warn",
|
|
38
|
+
"jsdoc/check-tag-names": [
|
|
39
|
+
"warn",
|
|
40
|
+
{
|
|
41
|
+
typed: true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"jsdoc/check-types": "warn",
|
|
45
|
+
"jsdoc/check-values": "warn",
|
|
46
|
+
"jsdoc/empty-tags": "warn",
|
|
47
|
+
"jsdoc/implements-on-classes": "warn",
|
|
48
|
+
"jsdoc/multiline-blocks": "warn",
|
|
49
|
+
"jsdoc/no-blank-block-descriptions": "off",
|
|
50
|
+
"jsdoc/no-defaults": "warn",
|
|
51
|
+
"jsdoc/no-multi-asterisks": "warn",
|
|
52
|
+
"jsdoc/no-types": typescript ? "warn" : "off",
|
|
53
|
+
"jsdoc/no-undefined-types": typescript ? "off" : "warn",
|
|
54
|
+
"jsdoc/require-asterisk-prefix": "warn",
|
|
55
|
+
"jsdoc/require-description": requireJsdoc ? "warn" : "off",
|
|
56
|
+
"jsdoc/require-jsdoc": requireJsdoc ? [
|
|
57
|
+
"warn",
|
|
58
|
+
{
|
|
59
|
+
require: {
|
|
60
|
+
ArrowFunctionExpression: true,
|
|
61
|
+
ClassDeclaration: true,
|
|
62
|
+
ClassExpression: true,
|
|
63
|
+
FunctionDeclaration: true,
|
|
64
|
+
FunctionExpression: true,
|
|
65
|
+
MethodDefinition: true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
] : "off",
|
|
69
|
+
"jsdoc/require-param": requireJsdoc ? "warn" : "off",
|
|
70
|
+
"jsdoc/require-param-description": "warn",
|
|
71
|
+
"jsdoc/require-param-name": "warn",
|
|
72
|
+
"jsdoc/require-property": requireJsdoc ? "warn" : "off",
|
|
73
|
+
"jsdoc/require-property-description": "warn",
|
|
74
|
+
"jsdoc/require-property-name": "warn",
|
|
75
|
+
"jsdoc/require-returns": requireJsdoc ? "warn" : "off",
|
|
76
|
+
"jsdoc/require-returns-check": "warn",
|
|
77
|
+
"jsdoc/require-returns-description": "warn",
|
|
78
|
+
"jsdoc/require-yields": "warn",
|
|
79
|
+
"jsdoc/require-yields-check": "warn",
|
|
80
|
+
"jsdoc/tag-lines": [
|
|
81
|
+
"warn",
|
|
82
|
+
"never",
|
|
83
|
+
{
|
|
84
|
+
startLines: 1,
|
|
85
|
+
// Allow 1 line between description and first tag
|
|
86
|
+
tags: {
|
|
87
|
+
param: { lines: "never" }
|
|
88
|
+
// Enforce no lines between param tags
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"jsdoc/text-escaping": "off",
|
|
93
|
+
"jsdoc/valid-types": "warn"
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// src/eslint/jsdoc/config.ts
|
|
97
|
+
var jsdocConfig = (requireJsdoc = false, typescript = true) => ({
|
|
98
|
+
files: ["**/*.{js,jsx,ts,tsx,cjs,mjs}"],
|
|
99
|
+
ignores: ["**/*.{test,spec}.{js,jsx,ts,tsx,cjs,mjs}"],
|
|
100
|
+
name: configNames.jsdoc,
|
|
101
|
+
plugins: {
|
|
102
|
+
jsdoc
|
|
103
|
+
},
|
|
104
|
+
rules: jsdocRules(requireJsdoc, typescript)
|
|
105
|
+
});
|
|
6
106
|
export {
|
|
7
107
|
jsdocConfig
|
|
8
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/eslint/jsdoc/config.ts","../../../src/eslint/constants.ts","../../../src/eslint/jsdoc/rules.ts"],"sourcesContent":["import jsdoc from \"eslint-plugin-jsdoc\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { jsdocRules } from \"./rules.js\";\n\n/**\n * Generates ESLint configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An ESLint configuration object for JSDoc comments.\n */\nexport const jsdocConfig = (\n requireJsdoc = false,\n typescript = true,\n): EslintConfigObject => ({\n files: [\"**/*.{js,jsx,ts,tsx,cjs,mjs}\"],\n ignores: [\"**/*.{test,spec}.{js,jsx,ts,tsx,cjs,mjs}\"],\n name: configNames.jsdoc,\n plugins: {\n jsdoc,\n },\n rules: jsdocRules(requireJsdoc, typescript),\n});\n","/**\n * Debug names for ESLint configuration objects.\n * These names help identify different configuration sections in ESLint's debug output\n * and error messages, making it easier to track which rules come from which config.\n */\nexport const configNames = {\n base: \"base\",\n disableTypeChecked: \"typescript-eslint/disable-type-checked\",\n ignores: \"ignores\",\n jsdoc: \"jsdoc\",\n markdown: \"markdown\",\n nextjs: \"nextjs\",\n perfectionist: \"perfectionist\",\n preferArrowFunction: \"prefer-arrow-function\",\n react: \"react\",\n reactCompiler: \"react-compiler\",\n reactRefresh: \"react-refresh\",\n storybook: \"storybook:stories\",\n storybookConfig: \"storybook:config\",\n testing: \"testing\",\n turbo: \"turbo\",\n typescript: \"tseslint\",\n typescriptTesting: \"tseslint-testing\",\n unicorn: \"unicorn\",\n} as const;\n\nexport type ConfigName = (typeof configNames)[keyof typeof configNames];\n","import type { JsdocRules } from \"./types.js\";\n\n/**\n * Generates ESLint rules configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An object containing ESLint rules configuration for JSDoc validation and formatting.\n */\nexport const jsdocRules = (\n requireJsdoc = false,\n typescript = true,\n): JsdocRules => ({\n \"jsdoc/check-access\": \"warn\",\n \"jsdoc/check-alignment\": \"warn\",\n \"jsdoc/check-param-names\": [\n \"warn\",\n {\n checkDestructured: true,\n enableFixer: true,\n },\n ],\n \"jsdoc/check-property-names\": \"warn\",\n \"jsdoc/check-tag-names\": [\n \"warn\",\n {\n typed: true,\n },\n ],\n \"jsdoc/check-types\": \"warn\",\n \"jsdoc/check-values\": \"warn\",\n \"jsdoc/empty-tags\": \"warn\",\n \"jsdoc/implements-on-classes\": \"warn\",\n \"jsdoc/multiline-blocks\": \"warn\",\n \"jsdoc/no-blank-block-descriptions\": \"off\",\n \"jsdoc/no-defaults\": \"warn\",\n \"jsdoc/no-multi-asterisks\": \"warn\",\n \"jsdoc/no-types\": typescript ? \"warn\" : \"off\",\n \"jsdoc/no-undefined-types\": typescript ? \"off\" : \"warn\",\n \"jsdoc/require-asterisk-prefix\": \"warn\",\n \"jsdoc/require-description\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-jsdoc\":\n requireJsdoc ?\n [\n \"warn\",\n {\n require: {\n ArrowFunctionExpression: true,\n ClassDeclaration: true,\n ClassExpression: true,\n FunctionDeclaration: true,\n FunctionExpression: true,\n MethodDefinition: true,\n },\n },\n ]\n : \"off\",\n \"jsdoc/require-param\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-param-description\": \"warn\",\n \"jsdoc/require-param-name\": \"warn\",\n \"jsdoc/require-property\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-property-description\": \"warn\",\n \"jsdoc/require-property-name\": \"warn\",\n \"jsdoc/require-returns\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-returns-check\": \"warn\",\n \"jsdoc/require-returns-description\": \"warn\",\n \"jsdoc/require-yields\": \"warn\",\n \"jsdoc/require-yields-check\": \"warn\",\n \"jsdoc/tag-lines\": [\n \"warn\",\n \"never\",\n {\n startLines: 1, // Allow 1 line between description and first tag\n tags: {\n param: { lines: \"never\" }, // Enforce no lines between param tags\n },\n },\n ],\n \"jsdoc/text-escaping\": \"off\",\n \"jsdoc/valid-types\": \"warn\",\n});\n"],"mappings":";AAAA,OAAO,WAAW;;;ACKX,IAAM,cAAc;AAAA,EACzB,M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,sCAAsC;AAAA,EACtC,+BAA+B;AAAA,EAC/B,yBAAyB,eAAe,SAAS;AAAA,EACjD,+BAA+B;AAAA,EAC/B,qCAAqC;AAAA,EACrC,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,mBAAmB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,YAAY;AAAA;AAAA,MACZ,MAAM;AAAA,QACJ,OAAO,EAAE,OAAO,QAAQ;AAAA;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA,EACA,uBAAuB;AAAA,EACvB,qBAAqB;AACvB;;;AFlEO,IAAM,cAAc,CACzB,eAAe,OACf,aAAa,UACW;AAAA,EACxB,OAAO,CAAC,8BAA8B;AAAA,EACtC,SAAS,CAAC,0CAA0C;AAAA,EACpD,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,OAAO,WAAW,cAAc,UAAU;AAC5C;","names":[]}
|
|
@@ -1,6 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// src/eslint/jsdoc/rules.ts
|
|
2
|
+
var jsdocRules = (requireJsdoc = false, typescript = true) => ({
|
|
3
|
+
"jsdoc/check-access": "warn",
|
|
4
|
+
"jsdoc/check-alignment": "warn",
|
|
5
|
+
"jsdoc/check-param-names": [
|
|
6
|
+
"warn",
|
|
7
|
+
{
|
|
8
|
+
checkDestructured: true,
|
|
9
|
+
enableFixer: true
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"jsdoc/check-property-names": "warn",
|
|
13
|
+
"jsdoc/check-tag-names": [
|
|
14
|
+
"warn",
|
|
15
|
+
{
|
|
16
|
+
typed: true
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"jsdoc/check-types": "warn",
|
|
20
|
+
"jsdoc/check-values": "warn",
|
|
21
|
+
"jsdoc/empty-tags": "warn",
|
|
22
|
+
"jsdoc/implements-on-classes": "warn",
|
|
23
|
+
"jsdoc/multiline-blocks": "warn",
|
|
24
|
+
"jsdoc/no-blank-block-descriptions": "off",
|
|
25
|
+
"jsdoc/no-defaults": "warn",
|
|
26
|
+
"jsdoc/no-multi-asterisks": "warn",
|
|
27
|
+
"jsdoc/no-types": typescript ? "warn" : "off",
|
|
28
|
+
"jsdoc/no-undefined-types": typescript ? "off" : "warn",
|
|
29
|
+
"jsdoc/require-asterisk-prefix": "warn",
|
|
30
|
+
"jsdoc/require-description": requireJsdoc ? "warn" : "off",
|
|
31
|
+
"jsdoc/require-jsdoc": requireJsdoc ? [
|
|
32
|
+
"warn",
|
|
33
|
+
{
|
|
34
|
+
require: {
|
|
35
|
+
ArrowFunctionExpression: true,
|
|
36
|
+
ClassDeclaration: true,
|
|
37
|
+
ClassExpression: true,
|
|
38
|
+
FunctionDeclaration: true,
|
|
39
|
+
FunctionExpression: true,
|
|
40
|
+
MethodDefinition: true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
] : "off",
|
|
44
|
+
"jsdoc/require-param": requireJsdoc ? "warn" : "off",
|
|
45
|
+
"jsdoc/require-param-description": "warn",
|
|
46
|
+
"jsdoc/require-param-name": "warn",
|
|
47
|
+
"jsdoc/require-property": requireJsdoc ? "warn" : "off",
|
|
48
|
+
"jsdoc/require-property-description": "warn",
|
|
49
|
+
"jsdoc/require-property-name": "warn",
|
|
50
|
+
"jsdoc/require-returns": requireJsdoc ? "warn" : "off",
|
|
51
|
+
"jsdoc/require-returns-check": "warn",
|
|
52
|
+
"jsdoc/require-returns-description": "warn",
|
|
53
|
+
"jsdoc/require-yields": "warn",
|
|
54
|
+
"jsdoc/require-yields-check": "warn",
|
|
55
|
+
"jsdoc/tag-lines": [
|
|
56
|
+
"warn",
|
|
57
|
+
"never",
|
|
58
|
+
{
|
|
59
|
+
startLines: 1,
|
|
60
|
+
// Allow 1 line between description and first tag
|
|
61
|
+
tags: {
|
|
62
|
+
param: { lines: "never" }
|
|
63
|
+
// Enforce no lines between param tags
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"jsdoc/text-escaping": "off",
|
|
68
|
+
"jsdoc/valid-types": "warn"
|
|
69
|
+
});
|
|
4
70
|
export {
|
|
5
71
|
jsdocRules
|
|
6
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/eslint/jsdoc/rules.ts"],"sourcesContent":["import type { JsdocRules } from \"./types.js\";\n\n/**\n * Generates ESLint rules configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An object containing ESLint rules configuration for JSDoc validation and formatting.\n */\nexport const jsdocRules = (\n requireJsdoc = false,\n typescript = true,\n): JsdocRules => ({\n \"jsdoc/check-access\": \"warn\",\n \"jsdoc/check-alignment\": \"warn\",\n \"jsdoc/check-param-names\": [\n \"warn\",\n {\n checkDestructured: true,\n enableFixer: true,\n },\n ],\n \"jsdoc/check-property-names\": \"warn\",\n \"jsdoc/check-tag-names\": [\n \"warn\",\n {\n typed: true,\n },\n ],\n \"jsdoc/check-types\": \"warn\",\n \"jsdoc/check-values\": \"warn\",\n \"jsdoc/empty-tags\": \"warn\",\n \"jsdoc/implements-on-classes\": \"warn\",\n \"jsdoc/multiline-blocks\": \"warn\",\n \"jsdoc/no-blank-block-descriptions\": \"off\",\n \"jsdoc/no-defaults\": \"warn\",\n \"jsdoc/no-multi-asterisks\": \"warn\",\n \"jsdoc/no-types\": typescript ? \"warn\" : \"off\",\n \"jsdoc/no-undefined-types\": typescript ? \"off\" : \"warn\",\n \"jsdoc/require-asterisk-prefix\": \"warn\",\n \"jsdoc/require-description\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-jsdoc\":\n requireJsdoc ?\n [\n \"warn\",\n {\n require: {\n ArrowFunctionExpression: true,\n ClassDeclaration: true,\n ClassExpression: true,\n FunctionDeclaration: true,\n FunctionExpression: true,\n MethodDefinition: true,\n },\n },\n ]\n : \"off\",\n \"jsdoc/require-param\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-param-description\": \"warn\",\n \"jsdoc/require-param-name\": \"warn\",\n \"jsdoc/require-property\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-property-description\": \"warn\",\n \"jsdoc/require-property-name\": \"warn\",\n \"jsdoc/require-returns\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-returns-check\": \"warn\",\n \"jsdoc/require-returns-description\": \"warn\",\n \"jsdoc/require-yields\": \"warn\",\n \"jsdoc/require-yields-check\": \"warn\",\n \"jsdoc/tag-lines\": [\n \"warn\",\n \"never\",\n {\n startLines: 1, // Allow 1 line between description and first tag\n tags: {\n param: { lines: \"never\" }, // Enforce no lines between param tags\n },\n },\n ],\n \"jsdoc/text-escaping\": \"off\",\n \"jsdoc/valid-types\": \"warn\",\n});\n"],"mappings":";AASO,IAAM,aAAa,CACxB,eAAe,OACf,aAAa,UACG;AAAA,EAChB,sBAAsB;AAAA,EACtB,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,IACzB;AAAA,IACA;AAAA,MACE,mBAAmB;AAAA,MACnB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,8BAA8B;AAAA,EAC9B,yBAAyB;AAAA,IACvB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,qCAAqC;AAAA,EACrC,qBAAqB;AAAA,EACrB,4BAA4B;AAAA,EAC5B,kBAAkB,aAAa,SAAS;AAAA,EACxC,4BAA4B,aAAa,QAAQ;AAAA,EACjD,iCAAiC;AAAA,EACjC,6BAA6B,eAAe,SAAS;AAAA,EACrD,uBACE,eACE;AAAA,IACE;AAAA,IACA;AAAA,MACE,SAAS;AAAA,QACP,yBAAyB;AAAA,QACzB,kBAAkB;AAAA,QAClB,iBAAiB;AAAA,QACjB,qBAAqB;AAAA,QACrB,oBAAoB;AAAA,QACpB,kBAAkB;AAAA,MACpB;AAAA,IACF;AAAA,EACF,IACA;AAAA,EACJ,uBAAuB,eAAe,SAAS;AAAA,EAC/C,mCAAmC;AAAA,EACnC,4BAA4B;AAAA,EAC5B,0BAA0B,eAAe,SAAS;AAAA,EAClD,sCAAsC;AAAA,EACtC,+BAA+B;AAAA,EAC/B,yBAAyB,eAAe,SAAS;AAAA,EACjD,+BAA+B;AAAA,EAC/B,qCAAqC;AAAA,EACrC,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,mBAAmB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,YAAY;AAAA;AAAA,MACZ,MAAM;AAAA,QACJ,OAAO,EAAE,OAAO,QAAQ;AAAA;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA,EACA,uBAAuB;AAAA,EACvB,qBAAqB;AACvB;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EslintConfigObject } from '../types.js';
|
|
2
|
+
import 'eslint';
|
|
3
|
+
import '../constants.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates an ESLint configuration for Next.js.
|
|
7
|
+
*
|
|
8
|
+
* @returns ESLint configuration object for Next.js
|
|
9
|
+
*/
|
|
10
|
+
declare const nextjsConfig: () => EslintConfigObject;
|
|
11
|
+
|
|
12
|
+
export { nextjsConfig };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/eslint/nextjs/config.ts
|
|
2
|
+
import nextjs from "eslint-plugin-nextjs";
|
|
3
|
+
|
|
4
|
+
// src/eslint/constants.ts
|
|
5
|
+
var configNames = {
|
|
6
|
+
base: "base",
|
|
7
|
+
disableTypeChecked: "typescript-eslint/disable-type-checked",
|
|
8
|
+
ignores: "ignores",
|
|
9
|
+
jsdoc: "jsdoc",
|
|
10
|
+
markdown: "markdown",
|
|
11
|
+
nextjs: "nextjs",
|
|
12
|
+
perfectionist: "perfectionist",
|
|
13
|
+
preferArrowFunction: "prefer-arrow-function",
|
|
14
|
+
react: "react",
|
|
15
|
+
reactCompiler: "react-compiler",
|
|
16
|
+
reactRefresh: "react-refresh",
|
|
17
|
+
storybook: "storybook:stories",
|
|
18
|
+
storybookConfig: "storybook:config",
|
|
19
|
+
testing: "testing",
|
|
20
|
+
turbo: "turbo",
|
|
21
|
+
typescript: "tseslint",
|
|
22
|
+
typescriptTesting: "tseslint-testing",
|
|
23
|
+
unicorn: "unicorn"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// src/eslint/nextjs/rules.ts
|
|
27
|
+
var nextjsRules = {
|
|
28
|
+
"nextjs/google-font-display": "warn",
|
|
29
|
+
"nextjs/google-font-preconnect": "warn",
|
|
30
|
+
"nextjs/inline-script-id": "warn",
|
|
31
|
+
"nextjs/next-script-for-ga": "warn",
|
|
32
|
+
"nextjs/no-assign-module-variable": "warn",
|
|
33
|
+
"nextjs/no-async-client-component": "warn",
|
|
34
|
+
"nextjs/no-before-interactive-script-outside-document": "warn",
|
|
35
|
+
"nextjs/no-css-tags": "warn",
|
|
36
|
+
"nextjs/no-document-import-in-page": "warn",
|
|
37
|
+
"nextjs/no-duplicate-head": "warn",
|
|
38
|
+
"nextjs/no-head-element": "warn",
|
|
39
|
+
"nextjs/no-head-import-in-document": "warn",
|
|
40
|
+
"nextjs/no-html-link-for-pages": "warn",
|
|
41
|
+
"nextjs/no-img-element": "warn",
|
|
42
|
+
"nextjs/no-page-custom-font": "warn",
|
|
43
|
+
"nextjs/no-script-component-in-head": "warn",
|
|
44
|
+
"nextjs/no-styled-jsx-in-document": "warn",
|
|
45
|
+
"nextjs/no-sync-scripts": "warn",
|
|
46
|
+
"nextjs/no-title-in-document-head": "warn",
|
|
47
|
+
"nextjs/no-typos": "warn",
|
|
48
|
+
"nextjs/no-unwanted-polyfillio": "warn"
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// src/eslint/nextjs/config.ts
|
|
52
|
+
var nextjsConfig = () => ({
|
|
53
|
+
name: configNames.nextjs,
|
|
54
|
+
plugins: {
|
|
55
|
+
nextjs
|
|
56
|
+
},
|
|
57
|
+
rules: nextjsRules
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
nextjsConfig
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/eslint/nextjs/config.ts","../../../src/eslint/constants.ts","../../../src/eslint/nextjs/rules.ts"],"sourcesContent":["import nextjs from \"eslint-plugin-nextjs\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { nextjsRules } from \"./rules.js\";\n\n/**\n * Creates an ESLint configuration for Next.js.\n *\n * @returns ESLint configuration object for Next.js\n */\nexport const nextjsConfig = (): EslintConfigObject => ({\n name: configNames.nextjs,\n plugins: {\n nextjs,\n },\n rules: nextjsRules,\n});\n","/**\n * Debug names for ESLint configuration objects.\n * These names help identify different configuration sections in ESLint's debug output\n * and error messages, making it easier to track which rules come from which config.\n */\nexport const configNames = {\n base: \"base\",\n disableTypeChecked: \"typescript-eslint/disable-type-checked\",\n ignores: \"ignores\",\n jsdoc: \"jsdoc\",\n markdown: \"markdown\",\n nextjs: \"nextjs\",\n perfectionist: \"perfectionist\",\n preferArrowFunction: \"prefer-arrow-function\",\n react: \"react\",\n reactCompiler: \"react-compiler\",\n reactRefresh: \"react-refresh\",\n storybook: \"storybook:stories\",\n storybookConfig: \"storybook:config\",\n testing: \"testing\",\n turbo: \"turbo\",\n typescript: \"tseslint\",\n typescriptTesting: \"tseslint-testing\",\n unicorn: \"unicorn\",\n} as const;\n\nexport type ConfigName = (typeof configNames)[keyof typeof configNames];\n","import type { NextjsRules } from \"./types.js\";\n\nexport const nextjsRules: NextjsRules = {\n \"nextjs/google-font-display\": \"warn\",\n \"nextjs/google-font-preconnect\": \"warn\",\n \"nextjs/inline-script-id\": \"warn\",\n \"nextjs/next-script-for-ga\": \"warn\",\n \"nextjs/no-assign-module-variable\": \"warn\",\n \"nextjs/no-async-client-component\": \"warn\",\n \"nextjs/no-before-interactive-script-outside-document\": \"warn\",\n \"nextjs/no-css-tags\": \"warn\",\n \"nextjs/no-document-import-in-page\": \"warn\",\n \"nextjs/no-duplicate-head\": \"warn\",\n \"nextjs/no-head-element\": \"warn\",\n \"nextjs/no-head-import-in-document\": \"warn\",\n \"nextjs/no-html-link-for-pages\": \"warn\",\n \"nextjs/no-img-element\": \"warn\",\n \"nextjs/no-page-custom-font\": \"warn\",\n \"nextjs/no-script-component-in-head\": \"warn\",\n \"nextjs/no-styled-jsx-in-document\": \"warn\",\n \"nextjs/no-sync-scripts\": \"warn\",\n \"nextjs/no-title-in-document-head\": \"warn\",\n \"nextjs/no-typos\": \"warn\",\n \"nextjs/no-unwanted-polyfillio\": \"warn\",\n};\n"],"mappings":";AAAA,OAAO,YAAY;;;ACKZ,IAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,cAAc;AAAA,EACd,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,SAAS;AACX;;;ACtBO,IAAM,cAA2B;AAAA,EACtC,8BAA8B;AAAA,EAC9B,iCAAiC;AAAA,EACjC,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,oCAAoC;AAAA,EACpC,oCAAoC;AAAA,EACpC,wDAAwD;AAAA,EACxD,sBAAsB;AAAA,EACtB,qCAAqC;AAAA,EACrC,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,qCAAqC;AAAA,EACrC,iCAAiC;AAAA,EACjC,yBAAyB;AAAA,EACzB,8BAA8B;AAAA,EAC9B,sCAAsC;AAAA,EACtC,oCAAoC;AAAA,EACpC,0BAA0B;AAAA,EAC1B,oCAAoC;AAAA,EACpC,mBAAmB;AAAA,EACnB,iCAAiC;AACnC;;;AFZO,IAAM,eAAe,OAA2B;AAAA,EACrD,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,OAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/eslint/nextjs/rules.ts
|
|
2
|
+
var nextjsRules = {
|
|
3
|
+
"nextjs/google-font-display": "warn",
|
|
4
|
+
"nextjs/google-font-preconnect": "warn",
|
|
5
|
+
"nextjs/inline-script-id": "warn",
|
|
6
|
+
"nextjs/next-script-for-ga": "warn",
|
|
7
|
+
"nextjs/no-assign-module-variable": "warn",
|
|
8
|
+
"nextjs/no-async-client-component": "warn",
|
|
9
|
+
"nextjs/no-before-interactive-script-outside-document": "warn",
|
|
10
|
+
"nextjs/no-css-tags": "warn",
|
|
11
|
+
"nextjs/no-document-import-in-page": "warn",
|
|
12
|
+
"nextjs/no-duplicate-head": "warn",
|
|
13
|
+
"nextjs/no-head-element": "warn",
|
|
14
|
+
"nextjs/no-head-import-in-document": "warn",
|
|
15
|
+
"nextjs/no-html-link-for-pages": "warn",
|
|
16
|
+
"nextjs/no-img-element": "warn",
|
|
17
|
+
"nextjs/no-page-custom-font": "warn",
|
|
18
|
+
"nextjs/no-script-component-in-head": "warn",
|
|
19
|
+
"nextjs/no-styled-jsx-in-document": "warn",
|
|
20
|
+
"nextjs/no-sync-scripts": "warn",
|
|
21
|
+
"nextjs/no-title-in-document-head": "warn",
|
|
22
|
+
"nextjs/no-typos": "warn",
|
|
23
|
+
"nextjs/no-unwanted-polyfillio": "warn"
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
nextjsRules
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/eslint/nextjs/rules.ts"],"sourcesContent":["import type { NextjsRules } from \"./types.js\";\n\nexport const nextjsRules: NextjsRules = {\n \"nextjs/google-font-display\": \"warn\",\n \"nextjs/google-font-preconnect\": \"warn\",\n \"nextjs/inline-script-id\": \"warn\",\n \"nextjs/next-script-for-ga\": \"warn\",\n \"nextjs/no-assign-module-variable\": \"warn\",\n \"nextjs/no-async-client-component\": \"warn\",\n \"nextjs/no-before-interactive-script-outside-document\": \"warn\",\n \"nextjs/no-css-tags\": \"warn\",\n \"nextjs/no-document-import-in-page\": \"warn\",\n \"nextjs/no-duplicate-head\": \"warn\",\n \"nextjs/no-head-element\": \"warn\",\n \"nextjs/no-head-import-in-document\": \"warn\",\n \"nextjs/no-html-link-for-pages\": \"warn\",\n \"nextjs/no-img-element\": \"warn\",\n \"nextjs/no-page-custom-font\": \"warn\",\n \"nextjs/no-script-component-in-head\": \"warn\",\n \"nextjs/no-styled-jsx-in-document\": \"warn\",\n \"nextjs/no-sync-scripts\": \"warn\",\n \"nextjs/no-title-in-document-head\": \"warn\",\n \"nextjs/no-typos\": \"warn\",\n \"nextjs/no-unwanted-polyfillio\": \"warn\",\n};\n"],"mappings":";AAEO,IAAM,cAA2B;AAAA,EACtC,8BAA8B;AAAA,EAC9B,iCAAiC;AAAA,EACjC,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,oCAAoC;AAAA,EACpC,oCAAoC;AAAA,EACpC,wDAAwD;AAAA,EACxD,sBAAsB;AAAA,EACtB,qCAAqC;AAAA,EACrC,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,qCAAqC;AAAA,EACrC,iCAAiC;AAAA,EACjC,yBAAyB;AAAA,EACzB,8BAA8B;AAAA,EAC9B,sCAAsC;AAAA,EACtC,oCAAoC;AAAA,EACpC,0BAA0B;AAAA,EAC1B,oCAAoC;AAAA,EACpC,mBAAmB;AAAA,EACnB,iCAAiC;AACnC;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EslintRuleConfig } from '../types.js';
|
|
2
|
+
import 'eslint';
|
|
3
|
+
import '../constants.js';
|
|
4
|
+
|
|
5
|
+
type NextjsRules = {
|
|
6
|
+
"nextjs/google-font-display": EslintRuleConfig;
|
|
7
|
+
"nextjs/google-font-preconnect": EslintRuleConfig;
|
|
8
|
+
"nextjs/inline-script-id": EslintRuleConfig;
|
|
9
|
+
"nextjs/next-script-for-ga": EslintRuleConfig;
|
|
10
|
+
"nextjs/no-assign-module-variable": EslintRuleConfig;
|
|
11
|
+
"nextjs/no-async-client-component": EslintRuleConfig;
|
|
12
|
+
"nextjs/no-before-interactive-script-outside-document": EslintRuleConfig;
|
|
13
|
+
"nextjs/no-css-tags": EslintRuleConfig;
|
|
14
|
+
"nextjs/no-document-import-in-page": EslintRuleConfig;
|
|
15
|
+
"nextjs/no-duplicate-head": EslintRuleConfig;
|
|
16
|
+
"nextjs/no-head-element": EslintRuleConfig;
|
|
17
|
+
"nextjs/no-head-import-in-document": EslintRuleConfig;
|
|
18
|
+
"nextjs/no-html-link-for-pages": EslintRuleConfig;
|
|
19
|
+
"nextjs/no-img-element": EslintRuleConfig;
|
|
20
|
+
"nextjs/no-page-custom-font": EslintRuleConfig;
|
|
21
|
+
"nextjs/no-script-component-in-head": EslintRuleConfig;
|
|
22
|
+
"nextjs/no-styled-jsx-in-document": EslintRuleConfig;
|
|
23
|
+
"nextjs/no-sync-scripts": EslintRuleConfig;
|
|
24
|
+
"nextjs/no-title-in-document-head": EslintRuleConfig;
|
|
25
|
+
"nextjs/no-typos": EslintRuleConfig;
|
|
26
|
+
"nextjs/no-unwanted-polyfillio": EslintRuleConfig;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type { NextjsRules };
|