js-style-kit 0.2.10 → 0.2.12

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.
Files changed (113) hide show
  1. package/dist/index.d.ts +126 -9
  2. package/package.json +11 -11
  3. package/dist/eslint/base/config.d.ts +0 -17
  4. package/dist/eslint/base/config.js +0 -457
  5. package/dist/eslint/base/config.js.map +0 -1
  6. package/dist/eslint/base/rules.d.ts +0 -18
  7. package/dist/eslint/base/rules.js +0 -425
  8. package/dist/eslint/base/rules.js.map +0 -1
  9. package/dist/eslint/base/types.d.ts +0 -21
  10. package/dist/eslint/base/types.js +0 -1
  11. package/dist/eslint/base/types.js.map +0 -1
  12. package/dist/eslint/constants.d.ts +0 -28
  13. package/dist/eslint/constants.js +0 -25
  14. package/dist/eslint/constants.js.map +0 -1
  15. package/dist/eslint/ignores.d.ts +0 -19
  16. package/dist/eslint/ignores.js +0 -42
  17. package/dist/eslint/ignores.js.map +0 -1
  18. package/dist/eslint/index.d.ts +0 -55
  19. package/dist/eslint/index.js +0 -1410
  20. package/dist/eslint/index.js.map +0 -1
  21. package/dist/eslint/jsdoc/config.d.ts +0 -14
  22. package/dist/eslint/jsdoc/config.js +0 -109
  23. package/dist/eslint/jsdoc/config.js.map +0 -1
  24. package/dist/eslint/jsdoc/rules.d.ts +0 -15
  25. package/dist/eslint/jsdoc/rules.js +0 -73
  26. package/dist/eslint/jsdoc/rules.js.map +0 -1
  27. package/dist/eslint/jsdoc/types.d.ts +0 -52
  28. package/dist/eslint/jsdoc/types.js +0 -1
  29. package/dist/eslint/jsdoc/types.js.map +0 -1
  30. package/dist/eslint/nextjs/config.d.ts +0 -12
  31. package/dist/eslint/nextjs/config.js +0 -62
  32. package/dist/eslint/nextjs/config.js.map +0 -1
  33. package/dist/eslint/nextjs/rules.d.ts +0 -8
  34. package/dist/eslint/nextjs/rules.js +0 -28
  35. package/dist/eslint/nextjs/rules.js.map +0 -1
  36. package/dist/eslint/nextjs/types.d.ts +0 -29
  37. package/dist/eslint/nextjs/types.js +0 -1
  38. package/dist/eslint/nextjs/types.js.map +0 -1
  39. package/dist/eslint/perfectionist/config.d.ts +0 -7
  40. package/dist/eslint/perfectionist/config.js +0 -65
  41. package/dist/eslint/perfectionist/config.js.map +0 -1
  42. package/dist/eslint/perfectionist/rules.d.ts +0 -12
  43. package/dist/eslint/perfectionist/rules.js +0 -31
  44. package/dist/eslint/perfectionist/rules.js.map +0 -1
  45. package/dist/eslint/prefer-arrow-function/config.d.ts +0 -12
  46. package/dist/eslint/prefer-arrow-function/config.js +0 -45
  47. package/dist/eslint/prefer-arrow-function/config.js.map +0 -1
  48. package/dist/eslint/prefer-arrow-function/types.d.ts +0 -17
  49. package/dist/eslint/prefer-arrow-function/types.js +0 -1
  50. package/dist/eslint/prefer-arrow-function/types.js.map +0 -1
  51. package/dist/eslint/react/config.d.ts +0 -18
  52. package/dist/eslint/react/config.js +0 -186
  53. package/dist/eslint/react/config.js.map +0 -1
  54. package/dist/eslint/react/rules.d.ts +0 -26
  55. package/dist/eslint/react/rules.js +0 -132
  56. package/dist/eslint/react/rules.js.map +0 -1
  57. package/dist/eslint/react-compiler/config.d.ts +0 -12
  58. package/dist/eslint/react-compiler/config.js +0 -39
  59. package/dist/eslint/react-compiler/config.js.map +0 -1
  60. package/dist/eslint/react-refresh/config.d.ts +0 -16
  61. package/dist/eslint/react-refresh/config.js +0 -55
  62. package/dist/eslint/react-refresh/config.js.map +0 -1
  63. package/dist/eslint/react-refresh/rules.d.ts +0 -38
  64. package/dist/eslint/react-refresh/rules.js +0 -19
  65. package/dist/eslint/react-refresh/rules.js.map +0 -1
  66. package/dist/eslint/storybook/config.d.ts +0 -13
  67. package/dist/eslint/storybook/config.js +0 -67
  68. package/dist/eslint/storybook/config.js.map +0 -1
  69. package/dist/eslint/testing/config.d.ts +0 -25
  70. package/dist/eslint/testing/config.js +0 -169
  71. package/dist/eslint/testing/config.js.map +0 -1
  72. package/dist/eslint/testing/jest-rules.d.ts +0 -14
  73. package/dist/eslint/testing/jest-rules.js +0 -44
  74. package/dist/eslint/testing/jest-rules.js.map +0 -1
  75. package/dist/eslint/testing/vitest-rules.d.ts +0 -14
  76. package/dist/eslint/testing/vitest-rules.js +0 -50
  77. package/dist/eslint/testing/vitest-rules.js.map +0 -1
  78. package/dist/eslint/turbo/config.d.ts +0 -12
  79. package/dist/eslint/turbo/config.js +0 -39
  80. package/dist/eslint/turbo/config.js.map +0 -1
  81. package/dist/eslint/turbo/types.d.ts +0 -11
  82. package/dist/eslint/turbo/types.js +0 -1
  83. package/dist/eslint/turbo/types.js.map +0 -1
  84. package/dist/eslint/types.d.ts +0 -11
  85. package/dist/eslint/types.js +0 -1
  86. package/dist/eslint/types.js.map +0 -1
  87. package/dist/eslint/typescript/config.d.ts +0 -11
  88. package/dist/eslint/typescript/config.js +0 -186
  89. package/dist/eslint/typescript/config.js.map +0 -1
  90. package/dist/eslint/typescript/rules.d.ts +0 -8
  91. package/dist/eslint/typescript/rules.js +0 -135
  92. package/dist/eslint/typescript/rules.js.map +0 -1
  93. package/dist/eslint/typescript/types.d.ts +0 -7
  94. package/dist/eslint/typescript/types.js +0 -1
  95. package/dist/eslint/typescript/types.js.map +0 -1
  96. package/dist/eslint/unicorn/config.d.ts +0 -11
  97. package/dist/eslint/unicorn/config.js +0 -113
  98. package/dist/eslint/unicorn/config.js.map +0 -1
  99. package/dist/eslint/unicorn/rules.d.ts +0 -8
  100. package/dist/eslint/unicorn/rules.js +0 -79
  101. package/dist/eslint/unicorn/rules.js.map +0 -1
  102. package/dist/modules.d.d.ts +0 -3
  103. package/dist/modules.d.js +0 -1
  104. package/dist/modules.d.js.map +0 -1
  105. package/dist/prettier/index.d.ts +0 -34
  106. package/dist/prettier/index.js +0 -132
  107. package/dist/prettier/index.js.map +0 -1
  108. package/dist/prettier/patch-tailwind-plugin.d.ts +0 -9
  109. package/dist/prettier/patch-tailwind-plugin.js +0 -72
  110. package/dist/prettier/patch-tailwind-plugin.js.map +0 -1
  111. package/dist/utils/is-type.d.ts +0 -44
  112. package/dist/utils/is-type.js +0 -28
  113. package/dist/utils/is-type.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/eslint/constants.ts","../../../src/eslint/base/rules.ts","../../../src/eslint/base/config.ts"],"sourcesContent":["/**\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"],"mappings":";AAKO,IAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,oBAAo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../types.js';
2
- import { BaseRules } from './types.js';
3
- import 'eslint';
4
- import '../constants.js';
5
-
6
- /**
7
- * Generates the base set of ESLint rules with configurable function style enforcement.
8
- *
9
- * @param functionStyle - Controls how functions should be written. Can be:
10
- * - "off": Disables function style enforcement
11
- * - "arrow": Enforces arrow function expressions
12
- * - "declaration": Enforces function declarations
13
- * - "expression": Enforces function expressions
14
- * @returns An object containing ESLint rule configurations
15
- */
16
- declare const baseEslintRules: (functionStyle: "off" | FunctionStyle) => BaseRules;
17
-
18
- export { baseEslintRules };
@@ -1,425 +0,0 @@
1
- // src/eslint/base/rules.ts
2
- var baseEslintRules = (functionStyle) => ({
3
- /**
4
- * Require return statements in array methods callbacks.
5
- *
6
- * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
7
- */
8
- "array-callback-return": [
9
- "warn",
10
- { allowImplicit: true, checkForEach: true }
11
- ],
12
- /**
13
- * Treat `var` statements as if they were block scoped.
14
- *
15
- * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
16
- */
17
- "block-scoped-var": "warn",
18
- /**
19
- * Require camel case names.
20
- *
21
- * 🚫 Not fixable - https://eslint.org/docs/rules/camelcase
22
- */
23
- camelcase: [
24
- "warn",
25
- {
26
- allow: ["^UNSAFE_"],
27
- ignoreDestructuring: false,
28
- ignoreImports: true,
29
- properties: "never"
30
- }
31
- ],
32
- /**
33
- * Require curly braces for multiline blocks.
34
- *
35
- * 🔧 Fixable - https://eslint.org/docs/rules/curly
36
- */
37
- curly: ["warn", "multi-line"],
38
- /**
39
- * Require default clauses in switch statements to be last (if used).
40
- *
41
- * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
42
- */
43
- "default-case-last": "warn",
44
- /**
45
- * Require triple equals (`===` and `!==`).
46
-
47
- * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
48
- */
49
- eqeqeq: "warn",
50
- "for-direction": "warn",
51
- /**
52
- * Require function expressions to have a name.
53
- *
54
- * 🚫 Not fixable - https://eslint.org/docs/rules/func-names
55
- */
56
- "func-names": ["warn", "as-needed"],
57
- "func-style": (
58
- // if arrow function, we use the prefer-arrow-functions plugin
59
- functionStyle === "off" || functionStyle === "arrow" ? "off" : ["warn", functionStyle, { allowArrowFunctions: true }]
60
- ),
61
- /**
62
- * Require grouped accessor pairs in object literals and classes.
63
- *
64
- * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
65
- */
66
- "grouped-accessor-pairs": "warn",
67
- /**
68
- * Require a capital letter for constructors.
69
- *
70
- * 🚫 Not fixable - https://eslint.org/docs/rules/new-cap
71
- */
72
- "new-cap": ["warn", { capIsNew: false }],
73
- /**
74
- * Disallow use of `alert()`.
75
- *
76
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
77
- */
78
- "no-alert": "warn",
79
- "no-async-promise-executor": "warn",
80
- /**
81
- * Disallow use of bitwise operators.
82
- *
83
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-bitwise
84
- */
85
- "no-bitwise": "warn",
86
- /**
87
- * Disallow use of `caller`/`callee`.
88
- *
89
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
90
- */
91
- "no-caller": "warn",
92
- "no-case-declarations": "warn",
93
- "no-compare-neg-zero": "warn",
94
- "no-cond-assign": "warn",
95
- /**
96
- * Disallow the use of console.
97
- *
98
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-console
99
- */
100
- "no-console": ["warn", { allow: ["info", "warn", "error"] }],
101
- /**
102
- * Disallow expressions where the operation doesn't affect the value.
103
- *
104
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-console
105
- */
106
- "no-constant-binary-expression": "warn",
107
- "no-constant-condition": "warn",
108
- /**
109
- * Disallow returning value in constructor.
110
- *
111
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
112
- */
113
- "no-constructor-return": "warn",
114
- "no-control-regex": "warn",
115
- "no-debugger": "warn",
116
- "no-delete-var": "warn",
117
- "no-dupe-else-if": "warn",
118
- "no-duplicate-case": "warn",
119
- /**
120
- * Disallow using an `else` if the `if` block contains a return.
121
- *
122
- * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
123
- */
124
- "no-else-return": "warn",
125
- "no-empty": "warn",
126
- "no-empty-character-class": "warn",
127
- "no-empty-pattern": "warn",
128
- "no-empty-static-block": "warn",
129
- /**
130
- * Disallow `eval()`.
131
- *
132
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
133
- */
134
- "no-eval": "warn",
135
- "no-ex-assign": "warn",
136
- /**
137
- * Disallow extending native objects.
138
- *
139
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
140
- */
141
- "no-extend-native": "warn",
142
- /**
143
- * Disallow unnecessary function binding.
144
- *
145
- * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
146
- */
147
- "no-extra-bind": "warn",
148
- "no-extra-boolean-cast": "warn",
149
- /**
150
- * Disallow unnecessary labels.
151
- *
152
- * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
153
- */
154
- "no-extra-label": "warn",
155
- "no-fallthrough": "warn",
156
- "no-global-assign": "warn",
157
- /**
158
- * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.
159
- *
160
- * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
161
- */
162
- "no-implicit-coercion": "warn",
163
- "no-invalid-regexp": "warn",
164
- "no-irregular-whitespace": "warn",
165
- /**
166
- * Disallow usage of `__iterator__` property.
167
- *
168
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
169
- */
170
- "no-iterator": "warn",
171
- /**
172
- * Disallow labels that share a name with a variable.
173
- *
174
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var
175
- */
176
- "no-label-var": "warn",
177
- /**
178
- * Disallow use of labels for anything other than loops and switches.
179
- *
180
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
181
- */
182
- "no-labels": ["warn"],
183
- /**
184
- * Disallow unnecessary nested blocks.
185
- *
186
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
187
- */
188
- "no-lone-blocks": "warn",
189
- /**
190
- * Disallow if as the only statement in an else block.
191
- *
192
- * 🔧 Fixable - https://eslint.org/docs/rules/no-lonely-if
193
- */
194
- "no-lonely-if": "warn",
195
- "no-loss-of-precision": "warn",
196
- "no-misleading-character-class": "warn",
197
- /**
198
- * Disallow use of chained assignment expressions.
199
- *
200
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign
201
- */
202
- "no-multi-assign": ["warn"],
203
- /**
204
- * Disallow `new` for side effects.
205
- *
206
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
207
- */
208
- "no-new": "warn",
209
- /**
210
- * Disallow function constructors.
211
- *
212
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
213
- */
214
- "no-new-func": "warn",
215
- /**
216
- * Disallow primitive wrapper instances, such as `new String('foo')`.
217
- *
218
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
219
- */
220
- "no-new-wrappers": "warn",
221
- "no-nonoctal-decimal-escape": "warn",
222
- "no-octal": "warn",
223
- /**
224
- * Disallow use of octal escape sequences in string literals.
225
- *
226
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
227
- */
228
- "no-octal-escape": "warn",
229
- /**
230
- * Disallow reassignment of function parameters.
231
- *
232
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
233
- */
234
- "no-param-reassign": "warn",
235
- /**
236
- * Disallow returning values from Promise executor functions.
237
- *
238
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return
239
- */
240
- "no-promise-executor-return": "warn",
241
- /**
242
- * Disallow usage of the deprecated `__proto__` property.
243
- *
244
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
245
- */
246
- "no-proto": "warn",
247
- "no-prototype-builtins": "warn",
248
- "no-regex-spaces": "warn",
249
- /**
250
- * Disallow assignment in `return` statement.
251
- *
252
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
253
- */
254
- "no-return-assign": "warn",
255
- /**
256
- * Disallow use of `javascript:` urls.
257
- *
258
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
259
- */
260
- "no-script-url": "warn",
261
- "no-self-assign": "warn",
262
- /**
263
- * Disallow comparisons where both sides are exactly the same.
264
- *
265
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
266
- */
267
- "no-self-compare": "warn",
268
- /**
269
- * Disallow use of comma operator.
270
- *
271
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
272
- */
273
- "no-sequences": "warn",
274
- "no-shadow-restricted-names": "warn",
275
- "no-sparse-arrays": "warn",
276
- /**
277
- * Disallow template literal placeholder syntax in regular strings, as
278
- * these are likely errors.
279
- *
280
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string
281
- */
282
- "no-template-curly-in-string": "warn",
283
- /**
284
- * Disallow initializing variables to `undefined`.
285
- *
286
- * 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init
287
- */
288
- "no-undef-init": "warn",
289
- "no-unexpected-multiline": "warn",
290
- /**
291
- * Disallow ternary operators when simpler alternatives exist.
292
- *
293
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-unneeded-ternary
294
- */
295
- "no-unneeded-ternary": "warn",
296
- /**
297
- * Disallow loops with a body that allows only one iteration.
298
- *
299
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop
300
- */
301
- "no-unreachable-loop": "warn",
302
- "no-unsafe-finally": "warn",
303
- "no-unsafe-optional-chaining": "warn",
304
- "no-unused-labels": "warn",
305
- "no-unused-private-class-members": "warn",
306
- "no-useless-backreference": "warn",
307
- /**
308
- * Disallow unnecessary `.call()` and `.apply()`.
309
- *
310
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
311
- */
312
- "no-useless-call": "warn",
313
- "no-useless-catch": "warn",
314
- /**
315
- * Disallow useless computed property keys.
316
- *
317
- * � Fixable - https://eslint.org/docs/rules/no-useless-computed-key
318
- */
319
- "no-useless-computed-key": "warn",
320
- /**
321
- * Disallow unnecessary concatenation of strings.
322
- *
323
- * � Not fixable - https://eslint.org/docs/rules/no-useless-concat
324
- */
325
- "no-useless-concat": "warn",
326
- "no-useless-escape": "warn",
327
- /**
328
- * Disallow renaming import, export, and destructured assignments to the
329
- * same name.
330
- *
331
- * � Fixable - https://eslint.org/docs/rules/no-useless-rename
332
- */
333
- "no-useless-rename": "warn",
334
- /**
335
- * Disallow redundant return statements.
336
- *
337
- * � Fixable - https://eslint.org/docs/rules/no-useless-return
338
- */
339
- "no-useless-return": "warn",
340
- /**
341
- * Require `let` or `const` instead of `var`.
342
- * ts transpiles let/const to var, so no need for vars any more
343
- *
344
- * 🔧 Fixable - https://eslint.org/docs/rules/no-var
345
- */
346
- "no-var": "warn",
347
- "no-with": "warn",
348
- /**
349
- * Require object literal shorthand syntax.
350
- *
351
- * 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand
352
- */
353
- "object-shorthand": "warn",
354
- /**
355
- * Require default to `const` instead of `let`.
356
- * ts provides better types with const
357
- *
358
- * 🔧 Fixable - https://eslint.org/docs/rules/prefer-const
359
- */
360
- "prefer-const": "warn",
361
- /**
362
- * Require using named capture groups in regular expressions.
363
- *
364
- * � Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
365
- */
366
- "prefer-named-capture-group": "warn",
367
- /**
368
- * Disallow parseInt() in favor of binary, octal, and hexadecimal literals.
369
- *
370
- * 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals
371
- */
372
- "prefer-numeric-literals": "warn",
373
- /**
374
- * Require use of an object spread over Object.assign.
375
- *
376
- * 🔧 Fixable - https://eslint.org/docs/rules/prefer-object-spread
377
- */
378
- "prefer-object-spread": "warn",
379
- /**
380
- * Disallow use of the RegExp constructor in favor of regular expression
381
- * literals.
382
- *
383
- * � Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
384
- */
385
- "prefer-regex-literals": "warn",
386
- /**
387
- * Require using rest parameters instead of `arguments`.
388
- * ts provides better types with rest args over arguments
389
- *
390
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params
391
- */
392
- "prefer-rest-params": "warn",
393
- /**
394
- * Require using spread syntax instead of `.apply()`.
395
- * ts transpiles spread to apply, so no need for manual apply
396
- *
397
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread
398
- */
399
- "prefer-spread": "warn",
400
- /**
401
- * Require using template literals instead of string concatenation.
402
- *
403
- * 🔧 Fixable - https://eslint.org/docs/rules/prefer-template
404
- */
405
- "prefer-template": "warn",
406
- "require-yield": "warn",
407
- /**
408
- * Require a `Symbol` description.
409
- *
410
- * 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description
411
- */
412
- "symbol-description": "warn",
413
- "use-isnan": "warn",
414
- "valid-typeof": "warn",
415
- /**
416
- * Disallow "Yoda conditions", ensuring the comparison.
417
- *
418
- * 🔧 Fixable - https://eslint.org/docs/rules/yoda
419
- */
420
- yoda: "warn"
421
- });
422
- export {
423
- baseEslintRules
424
- };
425
- //# sourceMappingURL=rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/eslint/base/rules.ts"],"sourcesContent":["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"],"mappings":";AAaO,IAAM,kBAAkB,CAC7B,mBACe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,yBAAyB;AAAA,IACvB;AAAA,IACA,EAAE,eAAe,MAAM,cAAc,KAAK;AAAA,EAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,WAAW;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO,CAAC,UAAU;AAAA,MAClB,qBAAqB;AAAA,MACrB,eAAe;AAAA,MACf,YAAY;AAAA,IACd;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,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AA,EAOzB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOtB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,MAAM;AACR;","names":[]}
@@ -1,21 +0,0 @@
1
- import { EslintRuleConfig } from '../types.js';
2
- import 'eslint';
3
- import '../constants.js';
4
-
5
- type BaseRules = Record<string, EslintRuleConfig> & {
6
- camelcase?: EslintRuleConfig<{
7
- allow?: string[];
8
- ignoreDestructuring?: boolean;
9
- ignoreGlobals?: boolean;
10
- ignoreImports?: boolean;
11
- properties?: "always" | "never";
12
- }>;
13
- "func-style"?: EslintRuleConfig<"declaration" | "expression", {
14
- allowArrowFunctions?: boolean;
15
- overrides?: {
16
- namedExports?: "declaration" | "expression" | "ignore";
17
- };
18
- }>;
19
- };
20
-
21
- export type { BaseRules };
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,28 +0,0 @@
1
- /**
2
- * Debug names for ESLint configuration objects.
3
- * These names help identify different configuration sections in ESLint's debug output
4
- * and error messages, making it easier to track which rules come from which config.
5
- */
6
- declare const configNames: {
7
- readonly base: "base";
8
- readonly disableTypeChecked: "typescript-eslint/disable-type-checked";
9
- readonly ignores: "ignores";
10
- readonly jsdoc: "jsdoc";
11
- readonly markdown: "markdown";
12
- readonly nextjs: "nextjs";
13
- readonly perfectionist: "perfectionist";
14
- readonly preferArrowFunction: "prefer-arrow-function";
15
- readonly react: "react";
16
- readonly reactCompiler: "react-compiler";
17
- readonly reactRefresh: "react-refresh";
18
- readonly storybook: "storybook:stories";
19
- readonly storybookConfig: "storybook:config";
20
- readonly testing: "testing";
21
- readonly turbo: "turbo";
22
- readonly typescript: "tseslint";
23
- readonly typescriptTesting: "tseslint-testing";
24
- readonly unicorn: "unicorn";
25
- };
26
- type ConfigName = (typeof configNames)[keyof typeof configNames];
27
-
28
- export { type ConfigName, configNames };
@@ -1,25 +0,0 @@
1
- // src/eslint/constants.ts
2
- var configNames = {
3
- base: "base",
4
- disableTypeChecked: "typescript-eslint/disable-type-checked",
5
- ignores: "ignores",
6
- jsdoc: "jsdoc",
7
- markdown: "markdown",
8
- nextjs: "nextjs",
9
- perfectionist: "perfectionist",
10
- preferArrowFunction: "prefer-arrow-function",
11
- react: "react",
12
- reactCompiler: "react-compiler",
13
- reactRefresh: "react-refresh",
14
- storybook: "storybook:stories",
15
- storybookConfig: "storybook:config",
16
- testing: "testing",
17
- turbo: "turbo",
18
- typescript: "tseslint",
19
- typescriptTesting: "tseslint-testing",
20
- unicorn: "unicorn"
21
- };
22
- export {
23
- configNames
24
- };
25
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/eslint/constants.ts"],"sourcesContent":["/**\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"],"mappings":";AAKO,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;","names":[]}
@@ -1,19 +0,0 @@
1
- import { Linter } from 'eslint';
2
-
3
- /**
4
- * Creates an ESLint configuration for file and directory ignores.
5
- * By default, ignores node_modules, dist directories, and .git directories.
6
- *
7
- * @param options - Object with options to control the ignores configuration
8
- * @param options.userIgnores - Additional glob patterns to ignore in ESLint checks
9
- * @param options.next - Whether to include .next directory in ignores
10
- * @param options.storybook - Whether to include .storybook directory in ignores
11
- * @returns ESLint configuration object with ignore patterns
12
- */
13
- declare const ignoresConfig: ({ next, storybook, userIgnores, }?: {
14
- next?: boolean;
15
- storybook?: boolean;
16
- userIgnores?: string[];
17
- }) => Linter.Config;
18
-
19
- export { ignoresConfig };