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.
Files changed (124) hide show
  1. package/LICENSE +1 -1
  2. package/dist/eslint/base/config.js +453 -5
  3. package/dist/eslint/base/config.js.map +1 -1
  4. package/dist/eslint/base/rules.js +421 -3
  5. package/dist/eslint/base/rules.js.map +1 -1
  6. package/dist/eslint/constants.d.ts +15 -14
  7. package/dist/eslint/constants.js +21 -3
  8. package/dist/eslint/constants.js.map +1 -1
  9. package/dist/eslint/ignores.js +38 -4
  10. package/dist/eslint/ignores.js.map +1 -1
  11. package/dist/eslint/index.d.ts +5 -0
  12. package/dist/eslint/index.js +1406 -27
  13. package/dist/eslint/index.js.map +1 -1
  14. package/dist/eslint/jsdoc/config.js +105 -5
  15. package/dist/eslint/jsdoc/config.js.map +1 -1
  16. package/dist/eslint/jsdoc/rules.js +69 -3
  17. package/dist/eslint/jsdoc/rules.js.map +1 -1
  18. package/dist/eslint/nextjs/config.d.ts +12 -0
  19. package/dist/eslint/nextjs/config.js +62 -0
  20. package/dist/eslint/nextjs/config.js.map +1 -0
  21. package/dist/eslint/nextjs/rules.d.ts +8 -0
  22. package/dist/eslint/nextjs/rules.js +28 -0
  23. package/dist/eslint/nextjs/rules.js.map +1 -0
  24. package/dist/eslint/nextjs/types.d.ts +29 -0
  25. package/dist/eslint/nextjs/types.js +1 -0
  26. package/dist/eslint/nextjs/types.js.map +1 -0
  27. package/dist/eslint/perfectionist/config.js +61 -5
  28. package/dist/eslint/perfectionist/config.js.map +1 -1
  29. package/dist/eslint/perfectionist/rules.js +27 -3
  30. package/dist/eslint/perfectionist/rules.js.map +1 -1
  31. package/dist/eslint/prefer-arrow-function/config.js +41 -4
  32. package/dist/eslint/prefer-arrow-function/config.js.map +1 -1
  33. package/dist/eslint/react/config.js +182 -5
  34. package/dist/eslint/react/config.js.map +1 -1
  35. package/dist/eslint/react/rules.js +128 -3
  36. package/dist/eslint/react/rules.js.map +1 -1
  37. package/dist/eslint/react-compiler/config.js +35 -4
  38. package/dist/eslint/react-compiler/config.js.map +1 -1
  39. package/dist/eslint/react-refresh/config.js +51 -5
  40. package/dist/eslint/react-refresh/config.js.map +1 -1
  41. package/dist/eslint/react-refresh/rules.js +15 -3
  42. package/dist/eslint/react-refresh/rules.js.map +1 -1
  43. package/dist/eslint/storybook/config.js +63 -4
  44. package/dist/eslint/storybook/config.js.map +1 -1
  45. package/dist/eslint/testing/config.js +165 -6
  46. package/dist/eslint/testing/config.js.map +1 -1
  47. package/dist/eslint/testing/jest-rules.js +40 -3
  48. package/dist/eslint/testing/jest-rules.js.map +1 -1
  49. package/dist/eslint/testing/vitest-rules.js +46 -3
  50. package/dist/eslint/testing/vitest-rules.js.map +1 -1
  51. package/dist/eslint/turbo/config.js +35 -4
  52. package/dist/eslint/turbo/config.js.map +1 -1
  53. package/dist/eslint/types.d.ts +1 -1
  54. package/dist/eslint/typescript/config.js +182 -5
  55. package/dist/eslint/typescript/config.js.map +1 -1
  56. package/dist/eslint/typescript/rules.js +131 -3
  57. package/dist/eslint/typescript/rules.js.map +1 -1
  58. package/dist/eslint/unicorn/config.js +109 -5
  59. package/dist/eslint/unicorn/config.js.map +1 -1
  60. package/dist/eslint/unicorn/rules.js +75 -3
  61. package/dist/eslint/unicorn/rules.js.map +1 -1
  62. package/dist/index.js +1527 -31
  63. package/dist/index.js.map +1 -1
  64. package/dist/prettier/index.js +128 -5
  65. package/dist/prettier/index.js.map +1 -1
  66. package/dist/prettier/patch-tailwind-plugin.js +68 -3
  67. package/dist/prettier/patch-tailwind-plugin.js.map +1 -1
  68. package/dist/utils/is-type.js +19 -8
  69. package/dist/utils/is-type.js.map +1 -1
  70. package/package.json +2 -2
  71. package/dist/chunk-26SVGV32.js +0 -133
  72. package/dist/chunk-26SVGV32.js.map +0 -1
  73. package/dist/chunk-2PDDRRZG.js +0 -21
  74. package/dist/chunk-2PDDRRZG.js.map +0 -1
  75. package/dist/chunk-3SHRYTUT.js +0 -32
  76. package/dist/chunk-3SHRYTUT.js.map +0 -1
  77. package/dist/chunk-6L7EDNAG.js +0 -20
  78. package/dist/chunk-6L7EDNAG.js.map +0 -1
  79. package/dist/chunk-76XASR6Z.js +0 -25
  80. package/dist/chunk-76XASR6Z.js.map +0 -1
  81. package/dist/chunk-7FTTMVPP.js +0 -20
  82. package/dist/chunk-7FTTMVPP.js.map +0 -1
  83. package/dist/chunk-7OLD3L3V.js +0 -64
  84. package/dist/chunk-7OLD3L3V.js.map +0 -1
  85. package/dist/chunk-7ZDM3TOO.js +0 -141
  86. package/dist/chunk-7ZDM3TOO.js.map +0 -1
  87. package/dist/chunk-A6AJGHPQ.js +0 -20
  88. package/dist/chunk-A6AJGHPQ.js.map +0 -1
  89. package/dist/chunk-CNYUGKH5.js +0 -38
  90. package/dist/chunk-CNYUGKH5.js.map +0 -1
  91. package/dist/chunk-HLIJN23S.js +0 -23
  92. package/dist/chunk-HLIJN23S.js.map +0 -1
  93. package/dist/chunk-HMC2O35U.js +0 -25
  94. package/dist/chunk-HMC2O35U.js.map +0 -1
  95. package/dist/chunk-HOZDQJWG.js +0 -51
  96. package/dist/chunk-HOZDQJWG.js.map +0 -1
  97. package/dist/chunk-LITSWCYQ.js +0 -135
  98. package/dist/chunk-LITSWCYQ.js.map +0 -1
  99. package/dist/chunk-N7AG2EKX.js +0 -48
  100. package/dist/chunk-N7AG2EKX.js.map +0 -1
  101. package/dist/chunk-PSSB4TGO.js +0 -29
  102. package/dist/chunk-PSSB4TGO.js.map +0 -1
  103. package/dist/chunk-SWT2QOL3.js +0 -21
  104. package/dist/chunk-SWT2QOL3.js.map +0 -1
  105. package/dist/chunk-U7AFEGMK.js +0 -23
  106. package/dist/chunk-U7AFEGMK.js.map +0 -1
  107. package/dist/chunk-UHCQX54J.js +0 -68
  108. package/dist/chunk-UHCQX54J.js.map +0 -1
  109. package/dist/chunk-UV6CA4PE.js +0 -45
  110. package/dist/chunk-UV6CA4PE.js.map +0 -1
  111. package/dist/chunk-X7JRY6MS.js +0 -41
  112. package/dist/chunk-X7JRY6MS.js.map +0 -1
  113. package/dist/chunk-XBITZIAZ.js +0 -21
  114. package/dist/chunk-XBITZIAZ.js.map +0 -1
  115. package/dist/chunk-XCPOAYGQ.js +0 -80
  116. package/dist/chunk-XCPOAYGQ.js.map +0 -1
  117. package/dist/chunk-XICOWKSV.js +0 -426
  118. package/dist/chunk-XICOWKSV.js.map +0 -1
  119. package/dist/chunk-YFJ363HR.js +0 -26
  120. package/dist/chunk-YFJ363HR.js.map +0 -1
  121. package/dist/chunk-YZG34ZNI.js +0 -80
  122. package/dist/chunk-YZG34ZNI.js.map +0 -1
  123. package/dist/chunk-ZED5DLW7.js +0 -73
  124. package/dist/chunk-ZED5DLW7.js.map +0 -1
@@ -1,25 +0,0 @@
1
- import {
2
- configNames
3
- } from "./chunk-76XASR6Z.js";
4
-
5
- // src/eslint/ignores.ts
6
- var ignoresConfig = ({
7
- next = false,
8
- storybook = false,
9
- userIgnores = []
10
- } = {}) => ({
11
- ignores: [
12
- "**/node_modules/",
13
- "**/dist/",
14
- ".git/",
15
- ...next ? [".next"] : [],
16
- ...storybook ? ["!.storybook"] : [],
17
- ...userIgnores
18
- ],
19
- name: configNames.ignores
20
- });
21
-
22
- export {
23
- ignoresConfig
24
- };
25
- //# sourceMappingURL=chunk-HMC2O35U.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/ignores.ts"],"sourcesContent":["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"],"mappings":";;;;;AAcO,IAAM,gBAAgB,CAAC;AAAA,EAC5B,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,cAAc,CAAC;AACjB,IAII,CAAC,OAAsB;AAAA,EACzB,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,OAAO,CAAC,OAAO,IAAI,CAAC;AAAA,IACxB,GAAI,YAAY,CAAC,aAAa,IAAI,CAAC;AAAA,IACnC,GAAG;AAAA,EACL;AAAA,EACA,MAAM,YAAY;AACpB;","names":[]}
@@ -1,51 +0,0 @@
1
- // src/eslint/testing/vitest-rules.ts
2
- var vitestRules = (itOrTest = "test") => ({
3
- "vitest/consistent-test-it": [
4
- "warn",
5
- { fn: itOrTest, withinDescribe: itOrTest }
6
- ],
7
- "vitest/expect-expect": "warn",
8
- "vitest/no-commented-out-tests": "warn",
9
- "vitest/no-conditional-in-test": "warn",
10
- "vitest/no-disabled-tests": "warn",
11
- "vitest/no-duplicate-hooks": "warn",
12
- "vitest/no-focused-tests": "warn",
13
- "vitest/no-identical-title": "warn",
14
- "vitest/no-import-node-test": "warn",
15
- "vitest/no-interpolation-in-snapshots": "warn",
16
- // Avoid dynamic snapshots
17
- "vitest/no-large-snapshots": ["warn", { inlineMaxSize: 50, maxSize: 100 }],
18
- // Keep snapshots manageable
19
- "vitest/no-standalone-expect": "warn",
20
- "vitest/no-test-return-statement": "warn",
21
- // Tests shouldn't return values
22
- "vitest/prefer-comparison-matcher": "warn",
23
- // Use comparison matchers
24
- "vitest/prefer-equality-matcher": "warn",
25
- // Use equality matchers
26
- "vitest/prefer-hooks-in-order": "warn",
27
- // Keep hooks in a predictable order
28
- "vitest/prefer-hooks-on-top": "warn",
29
- // Keep hooks organized
30
- "vitest/prefer-lowercase-title": ["warn", { ignoreTopLevelDescribe: true }],
31
- // Consistent casing
32
- "vitest/prefer-strict-equal": "warn",
33
- // Prefer .toStrictEqual() over .toEqual()
34
- "vitest/prefer-to-be": "warn",
35
- // Use .toBe() for primitives
36
- "vitest/prefer-to-contain": "warn",
37
- // Use .toContain() for array/string includes
38
- "vitest/prefer-to-have-length": "warn",
39
- // Use .toHaveLength() for checking length
40
- "vitest/require-local-test-context-for-concurrent-snapshots": "warn",
41
- "vitest/require-top-level-describe": "warn",
42
- // Group tests in describe blocks
43
- "vitest/valid-describe-callback": "warn",
44
- "vitest/valid-expect": "warn",
45
- "vitest/valid-title": "warn"
46
- });
47
-
48
- export {
49
- vitestRules
50
- };
51
- //# sourceMappingURL=chunk-HOZDQJWG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/testing/vitest-rules.ts"],"sourcesContent":["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"],"mappings":";AAUO,IAAM,cAAc,CAAC,WAA0B,YAAyB;AAAA,EAC7E,6BAA6B;AAAA,IAC3B;AAAA,IACA,EAAE,IAAI,UAAU,gBAAgB,SAAS;AAAA,EAC3C;AAAA,EACA,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,iCAAiC;AAAA,EACjC,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,wCAAwC;AAAA;AAAA,EACxC,6BAA6B,CAAC,QAAQ,EAAE,eAAe,IAAI,SAAS,IAAI,CAAC;AAAA;AAAA,EACzE,+BAA+B;AAAA,EAC/B,mCAAmC;AAAA;AAAA,EACnC,oCAAoC;AAAA;AAAA,EACpC,kCAAkC;AAAA;AAAA,EAClC,gCAAgC;AAAA;AAAA,EAChC,8BAA8B;AAAA;AAAA,EAC9B,iCAAiC,CAAC,QAAQ,EAAE,wBAAwB,KAAK,CAAC;AAAA;AAAA,EAC1E,8BAA8B;AAAA;AAAA,EAC9B,uBAAuB;AAAA;AAAA,EACvB,4BAA4B;AAAA;AAAA,EAC5B,gCAAgC;AAAA;AAAA,EAChC,8DAA8D;AAAA,EAC9D,qCAAqC;AAAA;AAAA,EACrC,kCAAkC;AAAA,EAClC,uBAAuB;AAAA,EACvB,sBAAsB;AACxB;","names":[]}
@@ -1,135 +0,0 @@
1
- // src/eslint/typescript/rules.ts
2
- var tseslintRules = {
3
- "@typescript-eslint/adjacent-overload-signatures": "warn",
4
- "@typescript-eslint/array-type": "warn",
5
- "@typescript-eslint/await-thenable": "warn",
6
- "@typescript-eslint/ban-ts-comment": [
7
- "warn",
8
- { minimumDescriptionLength: 10 }
9
- ],
10
- "@typescript-eslint/ban-tslint-comment": "warn",
11
- "@typescript-eslint/class-literal-property-style": "warn",
12
- "@typescript-eslint/consistent-generic-constructors": "warn",
13
- "@typescript-eslint/consistent-indexed-object-style": "warn",
14
- "@typescript-eslint/consistent-type-assertions": "warn",
15
- "@typescript-eslint/consistent-type-definitions": "warn",
16
- "@typescript-eslint/consistent-type-exports": [
17
- "warn",
18
- { fixMixedExportsWithInlineTypeSpecifier: true }
19
- ],
20
- "@typescript-eslint/consistent-type-imports": [
21
- "warn",
22
- {
23
- fixStyle: "inline-type-imports",
24
- prefer: "type-imports"
25
- }
26
- ],
27
- "@typescript-eslint/dot-notation": "warn",
28
- "@typescript-eslint/no-array-constructor": "warn",
29
- "@typescript-eslint/no-array-delete": "warn",
30
- "@typescript-eslint/no-base-to-string": "warn",
31
- "@typescript-eslint/no-confusing-non-null-assertion": "warn",
32
- "@typescript-eslint/no-confusing-void-expression": "warn",
33
- "@typescript-eslint/no-deprecated": "warn",
34
- "@typescript-eslint/no-duplicate-enum-values": "warn",
35
- "@typescript-eslint/no-duplicate-type-constituents": "warn",
36
- "@typescript-eslint/no-dynamic-delete": "warn",
37
- "@typescript-eslint/no-empty-function": "warn",
38
- "@typescript-eslint/no-empty-object-type": "warn",
39
- "@typescript-eslint/no-explicit-any": "warn",
40
- "@typescript-eslint/no-extra-non-null-assertion": "warn",
41
- "@typescript-eslint/no-extraneous-class": "warn",
42
- "@typescript-eslint/no-floating-promises": "warn",
43
- "@typescript-eslint/no-for-in-array": "warn",
44
- "@typescript-eslint/no-implied-eval": "warn",
45
- "@typescript-eslint/no-import-type-side-effects": "warn",
46
- "@typescript-eslint/no-inferrable-types": "warn",
47
- "@typescript-eslint/no-invalid-void-type": "warn",
48
- "@typescript-eslint/no-meaningless-void-operator": "warn",
49
- "@typescript-eslint/no-misused-new": "warn",
50
- "@typescript-eslint/no-misused-promises": "warn",
51
- "@typescript-eslint/no-mixed-enums": "warn",
52
- "@typescript-eslint/no-namespace": "warn",
53
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
54
- "@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
55
- "@typescript-eslint/no-non-null-assertion": "warn",
56
- "@typescript-eslint/no-redundant-type-constituents": "warn",
57
- "@typescript-eslint/no-require-imports": "warn",
58
- "@typescript-eslint/no-this-alias": "warn",
59
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
60
- "@typescript-eslint/no-unnecessary-condition": "warn",
61
- "@typescript-eslint/no-unnecessary-template-expression": "warn",
62
- "@typescript-eslint/no-unnecessary-type-arguments": "warn",
63
- "@typescript-eslint/no-unnecessary-type-assertion": "warn",
64
- "@typescript-eslint/no-unnecessary-type-constraint": "warn",
65
- "@typescript-eslint/no-unnecessary-type-parameters": "warn",
66
- "@typescript-eslint/no-unsafe-declaration-merging": "warn",
67
- "@typescript-eslint/no-unsafe-enum-comparison": "warn",
68
- "@typescript-eslint/no-unsafe-function-type": "warn",
69
- "@typescript-eslint/no-unsafe-unary-minus": "warn",
70
- "@typescript-eslint/no-unused-expressions": "warn",
71
- "@typescript-eslint/no-unused-vars": [
72
- "warn",
73
- {
74
- args: "after-used",
75
- argsIgnorePattern: "^_",
76
- ignoreRestSiblings: false,
77
- vars: "all",
78
- varsIgnorePattern: "^_"
79
- }
80
- ],
81
- "@typescript-eslint/no-useless-constructor": "warn",
82
- "@typescript-eslint/no-wrapper-object-types": "warn",
83
- "@typescript-eslint/non-nullable-type-assertion-style": "warn",
84
- "@typescript-eslint/only-throw-error": "warn",
85
- "@typescript-eslint/prefer-as-const": "warn",
86
- "@typescript-eslint/prefer-find": "warn",
87
- "@typescript-eslint/prefer-for-of": "warn",
88
- "@typescript-eslint/prefer-function-type": "warn",
89
- "@typescript-eslint/prefer-includes": "warn",
90
- "@typescript-eslint/prefer-literal-enum-member": "warn",
91
- "@typescript-eslint/prefer-namespace-keyword": "warn",
92
- "@typescript-eslint/prefer-nullish-coalescing": "warn",
93
- "@typescript-eslint/prefer-optional-chain": "warn",
94
- "@typescript-eslint/prefer-promise-reject-errors": "warn",
95
- "@typescript-eslint/prefer-reduce-type-parameter": "warn",
96
- "@typescript-eslint/prefer-regexp-exec": "warn",
97
- "@typescript-eslint/prefer-return-this-type": "warn",
98
- "@typescript-eslint/prefer-string-starts-ends-with": "warn",
99
- "@typescript-eslint/related-getter-setter-pairs": "warn",
100
- "@typescript-eslint/require-await": "warn",
101
- "@typescript-eslint/restrict-plus-operands": [
102
- "warn",
103
- {
104
- allowAny: false,
105
- allowBoolean: false,
106
- allowNullish: false,
107
- allowNumberAndString: false,
108
- allowRegExp: false
109
- }
110
- ],
111
- "@typescript-eslint/restrict-template-expressions": [
112
- "warn",
113
- {
114
- allow: [{ from: "lib", name: ["Error", "URL", "URLSearchParams"] }],
115
- allowAny: true,
116
- allowBoolean: true,
117
- allowNullish: true,
118
- allowNumber: true,
119
- allowRegExp: true
120
- }
121
- ],
122
- "@typescript-eslint/return-await": [
123
- "warn",
124
- "error-handling-correctness-only"
125
- ],
126
- "@typescript-eslint/triple-slash-reference": "warn",
127
- "@typescript-eslint/unbound-method": "warn",
128
- "@typescript-eslint/unified-signatures": "warn",
129
- "@typescript-eslint/use-unknown-in-catch-callback-variable": "warn"
130
- };
131
-
132
- export {
133
- tseslintRules
134
- };
135
- //# sourceMappingURL=chunk-LITSWCYQ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/typescript/rules.ts"],"sourcesContent":["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 \"@typescript-eslint/non-nullable-type-assertion-style\": \"warn\",\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"],"mappings":"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","names":[]}
@@ -1,48 +0,0 @@
1
- import {
2
- configNames
3
- } from "./chunk-76XASR6Z.js";
4
-
5
- // src/eslint/storybook/config.ts
6
- import storybookPlugin from "eslint-plugin-storybook";
7
- var storybookConfig = [
8
- {
9
- files: [
10
- "**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)",
11
- "**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"
12
- ],
13
- name: configNames.storybook,
14
- plugins: {
15
- storybook: storybookPlugin
16
- },
17
- rules: {
18
- "import/no-anonymous-default-export": "off",
19
- "react-hooks/rules-of-hooks": "off",
20
- "storybook/await-interactions": "warn",
21
- "storybook/context-in-play-function": "warn",
22
- "storybook/csf-component": "warn",
23
- "storybook/default-exports": "warn",
24
- "storybook/hierarchy-separator": "warn",
25
- "storybook/meta-inline-properties": "warn",
26
- "storybook/no-redundant-story-name": "warn",
27
- "storybook/prefer-pascal-case": "warn",
28
- "storybook/story-exports": "warn",
29
- "storybook/use-storybook-expect": "warn",
30
- "storybook/use-storybook-testing-library": "warn"
31
- }
32
- },
33
- {
34
- files: [".storybook/main.@(js|cjs|mjs|ts)"],
35
- name: configNames.storybookConfig,
36
- plugins: {
37
- storybook: storybookPlugin
38
- },
39
- rules: {
40
- "storybook/no-uninstalled-addons": "warn"
41
- }
42
- }
43
- ];
44
-
45
- export {
46
- storybookConfig
47
- };
48
- //# sourceMappingURL=chunk-N7AG2EKX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/storybook/config.ts"],"sourcesContent":["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"],"mappings":";;;;;AAEA,OAAO,qBAAqB;AAYrB,IAAM,kBAAwC;AAAA,EACnD;AAAA,IACE,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM,YAAY;AAAA,IAClB,SAAS;AAAA,MACP,WAAW;AAAA,IACb;AAAA,IACA,OAAO;AAAA,MACL,sCAAsC;AAAA,MACtC,8BAA8B;AAAA,MAC9B,gCAAgC;AAAA,MAChC,sCAAsC;AAAA,MACtC,2BAA2B;AAAA,MAC3B,6BAA6B;AAAA,MAC7B,iCAAiC;AAAA,MACjC,oCAAoC;AAAA,MACpC,qCAAqC;AAAA,MACrC,gCAAgC;AAAA,MAChC,2BAA2B;AAAA,MAC3B,kCAAkC;AAAA,MAClC,2CAA2C;AAAA,IAC7C;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,kCAAkC;AAAA,IAC1C,MAAM,YAAY;AAAA,IAClB,SAAS;AAAA,MACP,WAAW;AAAA,IACb;AAAA,IACA,OAAO;AAAA,MACL,mCAAmC;AAAA,IACrC;AAAA,EACF;AACF;","names":[]}
@@ -1,29 +0,0 @@
1
- // src/utils/is-type.ts
2
- var isString = (value) => {
3
- return typeof value === "string";
4
- };
5
- var isNumber = (value) => {
6
- return typeof value === "number" && !Number.isNaN(value);
7
- };
8
- var isBoolean = (value) => {
9
- return typeof value === "boolean";
10
- };
11
- var isArray = (value) => {
12
- return Array.isArray(value);
13
- };
14
- var isObject = (value) => {
15
- return typeof value === "object" && value !== null && !Array.isArray(value);
16
- };
17
- var isFunction = (value) => {
18
- return typeof value === "function";
19
- };
20
-
21
- export {
22
- isString,
23
- isNumber,
24
- isBoolean,
25
- isArray,
26
- isObject,
27
- isFunction
28
- };
29
- //# sourceMappingURL=chunk-PSSB4TGO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/is-type.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"],"mappings":";AAMO,IAAM,WAAW,CAAC,UAAoC;AAC3D,SAAO,OAAO,UAAU;AAC1B;AAQO,IAAM,WAAW,CAAC,UAAoC;AAC3D,SAAO,OAAO,UAAU,YAAY,CAAC,OAAO,MAAM,KAAK;AACzD;AAQO,IAAM,YAAY,CAAC,UAAqC;AAC7D,SAAO,OAAO,UAAU;AAC1B;AAQO,IAAM,UAAU,CAAc,UAAiC;AACpE,SAAO,MAAM,QAAQ,KAAK;AAC5B;AAQO,IAAM,WAAW,CAAC,UAAqD;AAC5E,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AASO,IAAM,aAAa,CAAC,UAAsC;AAC/D,SAAO,OAAO,UAAU;AAC1B;","names":[]}
@@ -1,21 +0,0 @@
1
- import {
2
- perfectionistRules
3
- } from "./chunk-3SHRYTUT.js";
4
- import {
5
- configNames
6
- } from "./chunk-76XASR6Z.js";
7
-
8
- // src/eslint/perfectionist/config.ts
9
- import perfectionist from "eslint-plugin-perfectionist";
10
- var perfectionistConfig = {
11
- name: configNames.perfectionist,
12
- plugins: {
13
- perfectionist
14
- },
15
- rules: perfectionistRules
16
- };
17
-
18
- export {
19
- perfectionistConfig
20
- };
21
- //# sourceMappingURL=chunk-SWT2QOL3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/perfectionist/config.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;AAAA,OAAO,mBAAmB;AAOnB,IAAM,sBAA0C;AAAA,EACrD,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,OAAO;AACT;","names":[]}
@@ -1,23 +0,0 @@
1
- import {
2
- reactRefreshRules
3
- } from "./chunk-6L7EDNAG.js";
4
- import {
5
- configNames
6
- } from "./chunk-76XASR6Z.js";
7
-
8
- // src/eslint/react-refresh/config.ts
9
- import reactRefresh from "eslint-plugin-react-refresh";
10
- var reactRefreshEslintConfig = () => {
11
- return {
12
- name: configNames.reactRefresh,
13
- plugins: {
14
- "react-refresh": reactRefresh
15
- },
16
- rules: reactRefreshRules
17
- };
18
- };
19
-
20
- export {
21
- reactRefreshEslintConfig
22
- };
23
- //# sourceMappingURL=chunk-U7AFEGMK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/react-refresh/config.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;AAAA,OAAO,kBAAkB;AAgBlB,IAAM,2BAA2B,MAA0B;AAChE,SAAO;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS;AAAA,MACP,iBAAiB;AAAA,IACnB;AAAA,IACA,OAAO;AAAA,EACT;AACF;","names":[]}
@@ -1,68 +0,0 @@
1
- import {
2
- jestRules
3
- } from "./chunk-UV6CA4PE.js";
4
- import {
5
- vitestRules
6
- } from "./chunk-HOZDQJWG.js";
7
- import {
8
- configNames
9
- } from "./chunk-76XASR6Z.js";
10
-
11
- // src/eslint/testing/config.ts
12
- import jest from "eslint-plugin-jest";
13
- import vitest from "eslint-plugin-vitest";
14
- var testingConfig = ({
15
- filenamePattern,
16
- files,
17
- formattingRules,
18
- framework,
19
- itOrTest
20
- } = {
21
- filenamePattern: "test",
22
- formattingRules: true,
23
- framework: "vitest",
24
- itOrTest: "test"
25
- }) => ({
26
- files: files ?? ["**/*.{test,spec}.{ts,tsx,js,jsx}"],
27
- languageOptions: {
28
- globals: framework === "vitest" ? { ...vitest.environments.env.globals } : jest.environments.globals.globals
29
- },
30
- name: configNames.testing,
31
- plugins: {
32
- jest,
33
- vitest
34
- },
35
- rules: {
36
- // jest doesn't have a file name rule, so we'll use this one for both
37
- "@typescript-eslint/unbound-method": "off",
38
- "vitest/consistent-test-filename": [
39
- "warn",
40
- {
41
- allTestPattern: ".*\\.(test|spec)\\.[tj]sx?$",
42
- pattern: `.*\\.${filenamePattern}\\.[tj]sx?$`
43
- }
44
- ],
45
- ...framework === "vitest" ? vitestRules(itOrTest) : jestRules(itOrTest),
46
- ...formattingRules ? {
47
- "jest/padding-around-after-all-blocks": "warn",
48
- "jest/padding-around-after-each-blocks": "warn",
49
- "jest/padding-around-before-all-blocks": "warn",
50
- "jest/padding-around-before-each-blocks": "warn",
51
- "jest/padding-around-describe-blocks": "warn",
52
- "jest/padding-around-expect-groups": "warn",
53
- "jest/padding-around-test-blocks": "warn"
54
- } : {}
55
- },
56
- ...framework !== "jest" && framework !== "vitest" ? {
57
- settings: {
58
- jest: {
59
- globalPackage: framework === "node" ? "node:test" : "bun:test"
60
- }
61
- }
62
- } : {}
63
- });
64
-
65
- export {
66
- testingConfig
67
- };
68
- //# sourceMappingURL=chunk-UHCQX54J.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/testing/config.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;AAAA,OAAO,UAAU;AACjB,OAAO,YAAY;AA2BZ,IAAM,gBAAgB,CAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAmB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,UAAU;AACZ,OACwB;AAAA,EACxB,OAAO,SAAS,CAAC,kCAAkC;AAAA,EACnD,iBAAiB;AAAA,IACf,SACE,cAAc,WACZ,EAAE,GAAG,OAAO,aAAa,IAAI,QAAQ,IACrC,KAAK,aAAa,QAAQ;AAAA,EAChC;AAAA,EACA,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAAA,IAEL,qCAAqC;AAAA,IACrC,mCAAmC;AAAA,MACjC;AAAA,MACA;AAAA,QACE,gBAAgB;AAAA,QAChB,SAAS,QAAQ,eAAe;AAAA,MAClC;AAAA,IACF;AAAA,IACA,GAAI,cAAc,WAAW,YAAY,QAAQ,IAAI,UAAU,QAAQ;AAAA,IACvE,GAAI,kBACF;AAAA,MACE,wCAAwC;AAAA,MACxC,yCAAyC;AAAA,MACzC,yCAAyC;AAAA,MACzC,0CAA0C;AAAA,MAC1C,uCAAuC;AAAA,MACvC,qCAAqC;AAAA,MACrC,mCAAmC;AAAA,IACrC,IACA,CAAC;AAAA,EACL;AAAA,EACA,GAAI,cAAc,UAAU,cAAc,WACxC;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,eAAe,cAAc,SAAS,cAAc;AAAA,MACtD;AAAA,IACF;AAAA,EACF,IACA,CAAC;AACL;","names":[]}
@@ -1,45 +0,0 @@
1
- // src/eslint/testing/jest-rules.ts
2
- var jestRules = (itOrTest = "test") => ({
3
- "jest/consistent-test-it": [
4
- "warn",
5
- { fn: itOrTest, withinDescribe: itOrTest }
6
- ],
7
- "jest/expect-expect": "warn",
8
- "jest/no-commented-out-tests": "warn",
9
- "jest/no-conditional-expect": "warn",
10
- "jest/no-conditional-in-test": "warn",
11
- "jest/no-disabled-tests": "warn",
12
- "jest/no-duplicate-hooks": "warn",
13
- "jest/no-focused-tests": "warn",
14
- "jest/no-identical-title": "warn",
15
- "jest/no-interpolation-in-snapshots": "warn",
16
- "jest/no-large-snapshots": ["warn", { inlineMaxSize: 50, maxSize: 100 }],
17
- "jest/no-mocks-import": "warn",
18
- // Discourage manually importing from __mocks__
19
- "jest/no-standalone-expect": "warn",
20
- "jest/no-test-prefixes": "warn",
21
- // Prefer .only and .skip over f and x
22
- "jest/no-test-return-statement": "warn",
23
- "jest/prefer-comparison-matcher": "warn",
24
- "jest/prefer-equality-matcher": "warn",
25
- "jest/prefer-expect-resolves": "warn",
26
- "jest/prefer-hooks-in-order": "warn",
27
- "jest/prefer-hooks-on-top": "warn",
28
- "jest/prefer-lowercase-title": ["warn", { ignoreTopLevelDescribe: true }],
29
- "jest/prefer-snapshot-hint": "warn",
30
- "jest/prefer-spy-on": "warn",
31
- "jest/prefer-strict-equal": "warn",
32
- "jest/prefer-to-be": "warn",
33
- "jest/prefer-to-contain": "warn",
34
- "jest/prefer-to-have-length": "warn",
35
- "jest/require-top-level-describe": "warn",
36
- "jest/valid-describe-callback": "warn",
37
- "jest/valid-expect": "warn",
38
- "jest/valid-expect-in-promise": "warn",
39
- "jest/valid-title": "warn"
40
- });
41
-
42
- export {
43
- jestRules
44
- };
45
- //# sourceMappingURL=chunk-UV6CA4PE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/testing/jest-rules.ts"],"sourcesContent":["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"],"mappings":";AAUO,IAAM,YAAY,CAAC,WAA0B,YAAuB;AAAA,EACzE,2BAA2B;AAAA,IACzB;AAAA,IACA,EAAE,IAAI,UAAU,gBAAgB,SAAS;AAAA,EAC3C;AAAA,EACA,sBAAsB;AAAA,EACtB,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,sCAAsC;AAAA,EACtC,2BAA2B,CAAC,QAAQ,EAAE,eAAe,IAAI,SAAS,IAAI,CAAC;AAAA,EACvE,wBAAwB;AAAA;AAAA,EACxB,6BAA6B;AAAA,EAC7B,yBAAyB;AAAA;AAAA,EACzB,iCAAiC;AAAA,EACjC,kCAAkC;AAAA,EAClC,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,4BAA4B;AAAA,EAC5B,+BAA+B,CAAC,QAAQ,EAAE,wBAAwB,KAAK,CAAC;AAAA,EACxE,6BAA6B;AAAA,EAC7B,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,8BAA8B;AAAA,EAC9B,mCAAmC;AAAA,EACnC,gCAAgC;AAAA,EAChC,qBAAqB;AAAA,EACrB,gCAAgC;AAAA,EAChC,oBAAoB;AACtB;","names":[]}
@@ -1,41 +0,0 @@
1
- import {
2
- reactRules
3
- } from "./chunk-26SVGV32.js";
4
- import {
5
- configNames
6
- } from "./chunk-76XASR6Z.js";
7
-
8
- // src/eslint/react/config.ts
9
- import react from "eslint-plugin-react";
10
- import pluginReactHooks from "eslint-plugin-react-hooks";
11
- import globals from "globals";
12
- var reactEslintConfig = (functionStyle, typescript) => {
13
- return {
14
- languageOptions: {
15
- globals: {
16
- ...globals.browser
17
- },
18
- parserOptions: {
19
- ecmaFeatures: {
20
- jsx: true
21
- }
22
- }
23
- },
24
- name: configNames.react,
25
- plugins: {
26
- react,
27
- "react-hooks": pluginReactHooks
28
- },
29
- rules: reactRules(functionStyle, typescript),
30
- settings: {
31
- react: {
32
- version: "detect"
33
- }
34
- }
35
- };
36
- };
37
-
38
- export {
39
- reactEslintConfig
40
- };
41
- //# sourceMappingURL=chunk-X7JRY6MS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/react/config.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,sBAAsB;AAC7B,OAAO,aAAa;AAkBb,IAAM,oBAAoB,CAC/B,eACA,eACuB;AACvB,SAAO;AAAA,IACL,iBAAiB;AAAA,MACf,SAAS;AAAA,QACP,GAAG,QAAQ;AAAA,MACb;AAAA,MACA,eAAe;AAAA,QACb,cAAc;AAAA,UACZ,KAAK;AAAA,QACP;AAAA,MACF;AAAA,IACF;AAAA,IACA,MAAM,YAAY;AAAA,IAClB,SAAS;AAAA,MACP;AAAA,MACA,eAAe;AAAA,IACjB;AAAA,IACA,OAAO,WAAW,eAAe,UAAU;AAAA,IAC3C,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -1,21 +0,0 @@
1
- import {
2
- rules
3
- } from "./chunk-YZG34ZNI.js";
4
- import {
5
- configNames
6
- } from "./chunk-76XASR6Z.js";
7
-
8
- // src/eslint/unicorn/config.ts
9
- import unicorn from "eslint-plugin-unicorn";
10
- var unicornConfig = {
11
- name: configNames.unicorn,
12
- plugins: {
13
- unicorn
14
- },
15
- rules
16
- };
17
-
18
- export {
19
- unicornConfig
20
- };
21
- //# sourceMappingURL=chunk-XBITZIAZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/unicorn/config.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;AAAA,OAAO,aAAa;AAWb,IAAM,gBAAoC;AAAA,EAC/C,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA;AACF;","names":[]}