@next-vibe/checker 1.0.52 → 3.0.1

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 (430) hide show
  1. package/LICENSE +669 -5
  2. package/README.md +179 -200
  3. package/check.config.ts +85 -16
  4. package/generated/alias-map.ts +30 -0
  5. package/generated/endpoint.ts +75 -0
  6. package/{src/app/api/[locale]/system/check/oxlint/plugins/i18n/src/index.ts → oxlint-plugins/i18n.ts} +45 -9
  7. package/{src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/src/index.ts → oxlint-plugins/jsx-capitalization.ts} +84 -17
  8. package/{src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/src/index.ts → oxlint-plugins/restricted-syntax.ts} +40 -14
  9. package/package.json +27 -131
  10. package/.dist/LICENSE +0 -674
  11. package/.dist/README.md +0 -257
  12. package/.dist/bin/vibe-runtime.js +0 -58166
  13. package/.dist/bin/vibe-runtime.js.map +0 -451
  14. package/.dist/oxlint-plugins/i18n.js +0 -381
  15. package/.dist/oxlint-plugins/jsx-capitalization.js +0 -436
  16. package/.dist/oxlint-plugins/restricted-syntax.js +0 -409
  17. package/src/app/api/[locale]/LICENSE +0 -674
  18. package/src/app/api/[locale]/i18n/de/index.ts +0 -15
  19. package/src/app/api/[locale]/i18n/en/index.ts +0 -14
  20. package/src/app/api/[locale]/i18n/pl/index.ts +0 -13
  21. package/src/app/api/[locale]/shared/i18n/de/index.ts +0 -85
  22. package/src/app/api/[locale]/shared/i18n/en/index.ts +0 -83
  23. package/src/app/api/[locale]/shared/i18n/pl/index.ts +0 -85
  24. package/src/app/api/[locale]/shared/stats-filtering.ts +0 -174
  25. package/src/app/api/[locale]/shared/types/common.schema.ts +0 -55
  26. package/src/app/api/[locale]/shared/types/response.schema.ts +0 -411
  27. package/src/app/api/[locale]/shared/types/stats-filtering.schema.ts +0 -315
  28. package/src/app/api/[locale]/shared/types/utils.ts +0 -187
  29. package/src/app/api/[locale]/shared/utils/base64.ts +0 -46
  30. package/src/app/api/[locale]/shared/utils/env-util.ts +0 -36
  31. package/src/app/api/[locale]/shared/utils/i18n/de/index.ts +0 -21
  32. package/src/app/api/[locale]/shared/utils/i18n/en/index.ts +0 -19
  33. package/src/app/api/[locale]/shared/utils/i18n/pl/index.ts +0 -21
  34. package/src/app/api/[locale]/shared/utils/index.ts +0 -11
  35. package/src/app/api/[locale]/shared/utils/object-path.ts +0 -41
  36. package/src/app/api/[locale]/shared/utils/object.test.ts +0 -82
  37. package/src/app/api/[locale]/shared/utils/object.ts +0 -73
  38. package/src/app/api/[locale]/shared/utils/parse-error.ts +0 -134
  39. package/src/app/api/[locale]/shared/utils/parse-json.ts +0 -62
  40. package/src/app/api/[locale]/shared/utils/time.ts +0 -46
  41. package/src/app/api/[locale]/shared/utils/validation.ts +0 -117
  42. package/src/app/api/[locale]/shared/utils/zod-required-fields.ts +0 -115
  43. package/src/app/api/[locale]/system/builder/definition.ts +0 -1750
  44. package/src/app/api/[locale]/system/builder/enum.ts +0 -78
  45. package/src/app/api/[locale]/system/builder/i18n/de/index.ts +0 -645
  46. package/src/app/api/[locale]/system/builder/i18n/en/index.ts +0 -653
  47. package/src/app/api/[locale]/system/builder/i18n/pl/index.ts +0 -643
  48. package/src/app/api/[locale]/system/builder/repository/build-executor.test.ts +0 -178
  49. package/src/app/api/[locale]/system/builder/repository/build-executor.ts +0 -538
  50. package/src/app/api/[locale]/system/builder/repository/bun-compiler.ts +0 -250
  51. package/src/app/api/[locale]/system/builder/repository/bundle-analyzer.ts +0 -170
  52. package/src/app/api/[locale]/system/builder/repository/config-loader.ts +0 -146
  53. package/src/app/api/[locale]/system/builder/repository/config-validator.ts +0 -97
  54. package/src/app/api/[locale]/system/builder/repository/constants.ts +0 -125
  55. package/src/app/api/[locale]/system/builder/repository/error-suggester.ts +0 -67
  56. package/src/app/api/[locale]/system/builder/repository/file-copier.ts +0 -90
  57. package/src/app/api/[locale]/system/builder/repository/folder-cleaner.ts +0 -75
  58. package/src/app/api/[locale]/system/builder/repository/index.ts +0 -2
  59. package/src/app/api/[locale]/system/builder/repository/npm-package-generator.ts +0 -143
  60. package/src/app/api/[locale]/system/builder/repository/output-formatter.ts +0 -104
  61. package/src/app/api/[locale]/system/builder/repository/profile-service.ts +0 -79
  62. package/src/app/api/[locale]/system/builder/repository/report-generator.ts +0 -109
  63. package/src/app/api/[locale]/system/builder/repository/vite-compiler.ts +0 -277
  64. package/src/app/api/[locale]/system/builder/route.ts +0 -21
  65. package/src/app/api/[locale]/system/builder/test-files/file1.ts +0 -2
  66. package/src/app/api/[locale]/system/builder/test-files/file2.tsx +0 -10
  67. package/src/app/api/[locale]/system/builder/test-files/file3.tsx +0 -16
  68. package/src/app/api/[locale]/system/builder/test-files/folderToCopy/fileInFolder.ts +0 -2
  69. package/src/app/api/[locale]/system/builder/test-files/test-config.ts +0 -38
  70. package/src/app/api/[locale]/system/builder/test-files/test-delete-config.ts +0 -8
  71. package/src/app/api/[locale]/system/builder/test-files/test-project/package.json +0 -24
  72. package/src/app/api/[locale]/system/builder/test-files/test-project/src/constants.ts +0 -6
  73. package/src/app/api/[locale]/system/builder/test-files/test-project/src/greet.ts +0 -18
  74. package/src/app/api/[locale]/system/builder/test-files/test-project/src/index.ts +0 -7
  75. package/src/app/api/[locale]/system/builder/test-files/test-project/src/utils/calculate.ts +0 -27
  76. package/src/app/api/[locale]/system/builder/test-files/test-project/tsconfig.json +0 -19
  77. package/src/app/api/[locale]/system/builder/test-files/test-project/tsconfig.tsbuildinfo +0 -1
  78. package/src/app/api/[locale]/system/builder/test-files/test3.css +0 -1
  79. package/src/app/api/[locale]/system/check/config/create/definition.ts +0 -266
  80. package/src/app/api/[locale]/system/check/config/create/i18n/de/index.ts +0 -151
  81. package/src/app/api/[locale]/system/check/config/create/i18n/en/index.ts +0 -146
  82. package/src/app/api/[locale]/system/check/config/create/i18n/pl/index.ts +0 -148
  83. package/src/app/api/[locale]/system/check/config/create/repository.ts +0 -269
  84. package/src/app/api/[locale]/system/check/config/create/route.ts +0 -21
  85. package/src/app/api/[locale]/system/check/config/repository.ts +0 -846
  86. package/src/app/api/[locale]/system/check/config/shared.ts +0 -364
  87. package/src/app/api/[locale]/system/check/config/types.ts +0 -610
  88. package/src/app/api/[locale]/system/check/config/utils.ts +0 -155
  89. package/src/app/api/[locale]/system/check/i18n/de/index.ts +0 -19
  90. package/src/app/api/[locale]/system/check/i18n/en/index.ts +0 -18
  91. package/src/app/api/[locale]/system/check/i18n/pl/index.ts +0 -19
  92. package/src/app/api/[locale]/system/check/lint/definition.ts +0 -383
  93. package/src/app/api/[locale]/system/check/lint/enum.ts +0 -34
  94. package/src/app/api/[locale]/system/check/lint/i18n/de/index.ts +0 -160
  95. package/src/app/api/[locale]/system/check/lint/i18n/en/index.ts +0 -158
  96. package/src/app/api/[locale]/system/check/lint/i18n/pl/index.ts +0 -160
  97. package/src/app/api/[locale]/system/check/lint/repository.ts +0 -844
  98. package/src/app/api/[locale]/system/check/lint/route.ts +0 -21
  99. package/src/app/api/[locale]/system/check/oxlint/README.md +0 -190
  100. package/src/app/api/[locale]/system/check/oxlint/definition.ts +0 -375
  101. package/src/app/api/[locale]/system/check/oxlint/enum.ts +0 -34
  102. package/src/app/api/[locale]/system/check/oxlint/i18n/de/index.ts +0 -166
  103. package/src/app/api/[locale]/system/check/oxlint/i18n/en/index.ts +0 -164
  104. package/src/app/api/[locale]/system/check/oxlint/i18n/pl/index.ts +0 -166
  105. package/src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/README.md +0 -269
  106. package/src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/test.tsx +0 -74
  107. package/src/app/api/[locale]/system/check/oxlint/plugins/shared/config-loader.ts +0 -283
  108. package/src/app/api/[locale]/system/check/oxlint/repository.ts +0 -553
  109. package/src/app/api/[locale]/system/check/oxlint/route.ts +0 -21
  110. package/src/app/api/[locale]/system/check/oxlint/types.ts +0 -191
  111. package/src/app/api/[locale]/system/check/test-project/.vscode/settings.json +0 -48
  112. package/src/app/api/[locale]/system/check/test-project/bun.lock +0 -640
  113. package/src/app/api/[locale]/system/check/test-project/check.config.ts +0 -955
  114. package/src/app/api/[locale]/system/check/test-project/package.json +0 -17
  115. package/src/app/api/[locale]/system/check/test-project/src/constants.ts +0 -6
  116. package/src/app/api/[locale]/system/check/test-project/src/greet.ts +0 -18
  117. package/src/app/api/[locale]/system/check/test-project/src/test-issues/a11y-issues.tsx +0 -107
  118. package/src/app/api/[locale]/system/check/test-project/src/test-issues/eslint-issues.tsx +0 -37
  119. package/src/app/api/[locale]/system/check/test-project/src/test-issues/general-issues.ts +0 -135
  120. package/src/app/api/[locale]/system/check/test-project/src/test-issues/i18n-issues.tsx +0 -113
  121. package/src/app/api/[locale]/system/check/test-project/src/test-issues/jsx-capitalization-issues.tsx +0 -127
  122. package/src/app/api/[locale]/system/check/test-project/src/test-issues/nextjs-issues.tsx +0 -92
  123. package/src/app/api/[locale]/system/check/test-project/src/test-issues/promise-issues.ts +0 -73
  124. package/src/app/api/[locale]/system/check/test-project/src/test-issues/react-issues.tsx +0 -95
  125. package/src/app/api/[locale]/system/check/test-project/src/test-issues/restricted-syntax-issues.tsx +0 -61
  126. package/src/app/api/[locale]/system/check/test-project/src/test-issues/typescript-issues.ts +0 -78
  127. package/src/app/api/[locale]/system/check/test-project/src/utils/calculate.ts +0 -27
  128. package/src/app/api/[locale]/system/check/test-project/tsconfig.json +0 -22
  129. package/src/app/api/[locale]/system/check/test-project/tsconfig.tsbuildinfo +0 -1
  130. package/src/app/api/[locale]/system/check/typecheck/definition.ts +0 -328
  131. package/src/app/api/[locale]/system/check/typecheck/enum.ts +0 -34
  132. package/src/app/api/[locale]/system/check/typecheck/i18n/de/index.ts +0 -148
  133. package/src/app/api/[locale]/system/check/typecheck/i18n/en/index.ts +0 -145
  134. package/src/app/api/[locale]/system/check/typecheck/i18n/pl/index.ts +0 -148
  135. package/src/app/api/[locale]/system/check/typecheck/repository.ts +0 -863
  136. package/src/app/api/[locale]/system/check/typecheck/route.ts +0 -21
  137. package/src/app/api/[locale]/system/check/typecheck/utils.ts +0 -160
  138. package/src/app/api/[locale]/system/check/vibe-check/definition.ts +0 -448
  139. package/src/app/api/[locale]/system/check/vibe-check/enum.ts +0 -63
  140. package/src/app/api/[locale]/system/check/vibe-check/i18n/de/index.ts +0 -164
  141. package/src/app/api/[locale]/system/check/vibe-check/i18n/en/index.ts +0 -161
  142. package/src/app/api/[locale]/system/check/vibe-check/i18n/pl/index.ts +0 -163
  143. package/src/app/api/[locale]/system/check/vibe-check/repository.ts +0 -516
  144. package/src/app/api/[locale]/system/check/vibe-check/route.test.ts +0 -1010
  145. package/src/app/api/[locale]/system/check/vibe-check/route.ts +0 -21
  146. package/src/app/api/[locale]/system/generated/endpoint.ts +0 -274
  147. package/src/app/api/[locale]/system/generated/endpoints.ts +0 -138
  148. package/src/app/api/[locale]/system/generated/route-handlers.ts +0 -213
  149. package/src/app/api/[locale]/system/generators/endpoint/definition.ts +0 -167
  150. package/src/app/api/[locale]/system/generators/endpoint/i18n/de/index.ts +0 -48
  151. package/src/app/api/[locale]/system/generators/endpoint/i18n/en/index.ts +0 -48
  152. package/src/app/api/[locale]/system/generators/endpoint/i18n/pl/index.ts +0 -50
  153. package/src/app/api/[locale]/system/generators/endpoint/repository.ts +0 -286
  154. package/src/app/api/[locale]/system/generators/endpoint/route.ts +0 -18
  155. package/src/app/api/[locale]/system/generators/endpoints/definition.ts +0 -246
  156. package/src/app/api/[locale]/system/generators/endpoints/i18n/de/index.ts +0 -54
  157. package/src/app/api/[locale]/system/generators/endpoints/i18n/en/index.ts +0 -52
  158. package/src/app/api/[locale]/system/generators/endpoints/i18n/pl/index.ts +0 -54
  159. package/src/app/api/[locale]/system/generators/endpoints/options-repository.ts +0 -425
  160. package/src/app/api/[locale]/system/generators/endpoints/repository.ts +0 -368
  161. package/src/app/api/[locale]/system/generators/endpoints/route.ts +0 -17
  162. package/src/app/api/[locale]/system/generators/endpoints-index/definition.ts +0 -166
  163. package/src/app/api/[locale]/system/generators/endpoints-index/i18n/de/index.ts +0 -71
  164. package/src/app/api/[locale]/system/generators/endpoints-index/i18n/en/index.ts +0 -69
  165. package/src/app/api/[locale]/system/generators/endpoints-index/i18n/pl/index.ts +0 -71
  166. package/src/app/api/[locale]/system/generators/endpoints-index/repository.ts +0 -279
  167. package/src/app/api/[locale]/system/generators/endpoints-index/route.ts +0 -18
  168. package/src/app/api/[locale]/system/generators/generate-all/definition.ts +0 -327
  169. package/src/app/api/[locale]/system/generators/generate-all/i18n/de/index.ts +0 -96
  170. package/src/app/api/[locale]/system/generators/generate-all/i18n/en/index.ts +0 -94
  171. package/src/app/api/[locale]/system/generators/generate-all/i18n/pl/index.ts +0 -96
  172. package/src/app/api/[locale]/system/generators/generate-all/repository.ts +0 -240
  173. package/src/app/api/[locale]/system/generators/generate-all/route.ts +0 -19
  174. package/src/app/api/[locale]/system/generators/i18n/de/index.ts +0 -15
  175. package/src/app/api/[locale]/system/generators/i18n/en/index.ts +0 -14
  176. package/src/app/api/[locale]/system/generators/i18n/pl/index.ts +0 -15
  177. package/src/app/api/[locale]/system/generators/route-handlers/definition.ts +0 -178
  178. package/src/app/api/[locale]/system/generators/route-handlers/i18n/de/index.ts +0 -48
  179. package/src/app/api/[locale]/system/generators/route-handlers/i18n/en/index.ts +0 -48
  180. package/src/app/api/[locale]/system/generators/route-handlers/i18n/pl/index.ts +0 -50
  181. package/src/app/api/[locale]/system/generators/route-handlers/repository.ts +0 -267
  182. package/src/app/api/[locale]/system/generators/route-handlers/route.ts +0 -14
  183. package/src/app/api/[locale]/system/generators/shared/utils.ts +0 -215
  184. package/src/app/api/[locale]/system/help/definition.ts +0 -433
  185. package/src/app/api/[locale]/system/help/i18n/de/index.ts +0 -263
  186. package/src/app/api/[locale]/system/help/i18n/en/index.ts +0 -259
  187. package/src/app/api/[locale]/system/help/i18n/pl/index.ts +0 -262
  188. package/src/app/api/[locale]/system/help/interactive/definition.ts +0 -122
  189. package/src/app/api/[locale]/system/help/interactive/i18n/de/index.ts +0 -21
  190. package/src/app/api/[locale]/system/help/interactive/i18n/en/index.ts +0 -19
  191. package/src/app/api/[locale]/system/help/interactive/i18n/pl/index.ts +0 -21
  192. package/src/app/api/[locale]/system/help/interactive/repository.ts +0 -1131
  193. package/src/app/api/[locale]/system/help/interactive/route.ts +0 -43
  194. package/src/app/api/[locale]/system/help/list/definition.ts +0 -362
  195. package/src/app/api/[locale]/system/help/list/repository.ts +0 -99
  196. package/src/app/api/[locale]/system/help/list/route.ts +0 -21
  197. package/src/app/api/[locale]/system/help/repository.ts +0 -238
  198. package/src/app/api/[locale]/system/help/route.ts +0 -16
  199. package/src/app/api/[locale]/system/i18n/de/index.ts +0 -67
  200. package/src/app/api/[locale]/system/i18n/en/index.ts +0 -66
  201. package/src/app/api/[locale]/system/i18n/pl/index.ts +0 -67
  202. package/src/app/api/[locale]/system/release-tool/definition.ts +0 -2925
  203. package/src/app/api/[locale]/system/release-tool/i18n/de/index.ts +0 -782
  204. package/src/app/api/[locale]/system/release-tool/i18n/en/index.ts +0 -779
  205. package/src/app/api/[locale]/system/release-tool/i18n/pl/index.ts +0 -781
  206. package/src/app/api/[locale]/system/release-tool/repository/asset-zipper.ts +0 -122
  207. package/src/app/api/[locale]/system/release-tool/repository/changelog-generator.ts +0 -205
  208. package/src/app/api/[locale]/system/release-tool/repository/ci-detector.ts +0 -540
  209. package/src/app/api/[locale]/system/release-tool/repository/config.ts +0 -106
  210. package/src/app/api/[locale]/system/release-tool/repository/constants.ts +0 -406
  211. package/src/app/api/[locale]/system/release-tool/repository/dependency-manager.ts +0 -496
  212. package/src/app/api/[locale]/system/release-tool/repository/git-service.ts +0 -378
  213. package/src/app/api/[locale]/system/release-tool/repository/hook-runner.ts +0 -96
  214. package/src/app/api/[locale]/system/release-tool/repository/index.ts +0 -1
  215. package/src/app/api/[locale]/system/release-tool/repository/notification-service.ts +0 -575
  216. package/src/app/api/[locale]/system/release-tool/repository/package-service.ts +0 -150
  217. package/src/app/api/[locale]/system/release-tool/repository/publisher.ts +0 -241
  218. package/src/app/api/[locale]/system/release-tool/repository/quality-runner.ts +0 -413
  219. package/src/app/api/[locale]/system/release-tool/repository/release-creator.ts +0 -283
  220. package/src/app/api/[locale]/system/release-tool/repository/release-executor.ts +0 -1084
  221. package/src/app/api/[locale]/system/release-tool/repository/snyk-service.ts +0 -132
  222. package/src/app/api/[locale]/system/release-tool/repository/utils.ts +0 -603
  223. package/src/app/api/[locale]/system/release-tool/repository/validation.ts +0 -265
  224. package/src/app/api/[locale]/system/release-tool/repository/version-service.ts +0 -275
  225. package/src/app/api/[locale]/system/release-tool/route.ts +0 -21
  226. package/src/app/api/[locale]/system/unified-interface/README.md +0 -328
  227. package/src/app/api/[locale]/system/unified-interface/cli/README.md +0 -349
  228. package/src/app/api/[locale]/system/unified-interface/cli/auth/cli-handler.ts +0 -82
  229. package/src/app/api/[locale]/system/unified-interface/cli/auth/cli-user.ts +0 -120
  230. package/src/app/api/[locale]/system/unified-interface/cli/auth/session-file.ts +0 -244
  231. package/src/app/api/[locale]/system/unified-interface/cli/env.ts +0 -24
  232. package/src/app/api/[locale]/system/unified-interface/cli/i18n/de/index.ts +0 -159
  233. package/src/app/api/[locale]/system/unified-interface/cli/i18n/en/index.ts +0 -158
  234. package/src/app/api/[locale]/system/unified-interface/cli/i18n/pl/index.ts +0 -159
  235. package/src/app/api/[locale]/system/unified-interface/cli/runtime/debug.ts +0 -573
  236. package/src/app/api/[locale]/system/unified-interface/cli/runtime/entry-point.ts +0 -128
  237. package/src/app/api/[locale]/system/unified-interface/cli/runtime/environment.ts +0 -155
  238. package/src/app/api/[locale]/system/unified-interface/cli/runtime/execution-errors.ts +0 -423
  239. package/src/app/api/[locale]/system/unified-interface/cli/runtime/parsing.ts +0 -252
  240. package/src/app/api/[locale]/system/unified-interface/cli/runtime/route-executor.ts +0 -901
  241. package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/de/index.ts +0 -12
  242. package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/en/index.ts +0 -11
  243. package/src/app/api/[locale]/system/unified-interface/cli/setup/i18n/pl/index.ts +0 -12
  244. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/definition.ts +0 -235
  245. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/de/index.ts +0 -54
  246. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/en/index.ts +0 -52
  247. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/i18n/pl/index.ts +0 -54
  248. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/repository.ts +0 -444
  249. package/src/app/api/[locale]/system/unified-interface/cli/setup/install/route.ts +0 -25
  250. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/definition.ts +0 -159
  251. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/de/index.ts +0 -61
  252. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/en/index.ts +0 -59
  253. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/i18n/pl/index.ts +0 -61
  254. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/repository.ts +0 -181
  255. package/src/app/api/[locale]/system/unified-interface/cli/setup/status/route.ts +0 -22
  256. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/definition.ts +0 -164
  257. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/de/index.ts +0 -54
  258. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/en/index.ts +0 -52
  259. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/i18n/pl/index.ts +0 -54
  260. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/repository.ts +0 -195
  261. package/src/app/api/[locale]/system/unified-interface/cli/setup/uninstall/route.ts +0 -24
  262. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/definition.ts +0 -180
  263. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/de/index.ts +0 -54
  264. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/en/index.ts +0 -52
  265. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/i18n/pl/index.ts +0 -54
  266. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/repository.ts +0 -105
  267. package/src/app/api/[locale]/system/unified-interface/cli/setup/update/route.ts +0 -22
  268. package/src/app/api/[locale]/system/unified-interface/cli/vibe-runtime.ts +0 -264
  269. package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/base-renderer.ts +0 -246
  270. package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/registry.ts +0 -305
  271. package/src/app/api/[locale]/system/unified-interface/cli/widgets/core/types.ts +0 -116
  272. package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/de/index.ts +0 -67
  273. package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/en/index.ts +0 -65
  274. package/src/app/api/[locale]/system/unified-interface/cli/widgets/i18n/pl/index.ts +0 -67
  275. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/accordion.ts +0 -70
  276. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/avatar.ts +0 -37
  277. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/badge.ts +0 -52
  278. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-output.ts +0 -285
  279. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-files.ts +0 -71
  280. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-list.ts +0 -281
  281. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/code-quality-summary.ts +0 -83
  282. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/container.ts +0 -175
  283. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-card.ts +0 -61
  284. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-cards.ts +0 -518
  285. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-list.ts +0 -75
  286. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/data-table.ts +0 -357
  287. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/editable-text.ts +0 -93
  288. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/empty-state.ts +0 -49
  289. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/errors.ts +0 -63
  290. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/grouped-list.ts +0 -667
  291. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link-card.ts +0 -78
  292. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link-list.ts +0 -99
  293. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/link.ts +0 -54
  294. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/loading.ts +0 -46
  295. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/markdown.ts +0 -123
  296. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/metric.ts +0 -269
  297. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/section.ts +0 -114
  298. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/stats-grid.ts +0 -138
  299. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/tabs.ts +0 -59
  300. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/text.ts +0 -76
  301. package/src/app/api/[locale]/system/unified-interface/cli/widgets/implementations/title.ts +0 -37
  302. package/src/app/api/[locale]/system/unified-interface/cli/widgets/renderers/response-renderer.ts +0 -403
  303. package/src/app/api/[locale]/system/unified-interface/cli/widgets/renderers/schema-handler.ts +0 -504
  304. package/src/app/api/[locale]/system/unified-interface/i18n/de/index.ts +0 -39
  305. package/src/app/api/[locale]/system/unified-interface/i18n/en/index.ts +0 -37
  306. package/src/app/api/[locale]/system/unified-interface/i18n/pl/index.ts +0 -39
  307. package/src/app/api/[locale]/system/unified-interface/mcp/README.md +0 -114
  308. package/src/app/api/[locale]/system/unified-interface/mcp/converter.ts +0 -136
  309. package/src/app/api/[locale]/system/unified-interface/mcp/i18n/de/index.ts +0 -180
  310. package/src/app/api/[locale]/system/unified-interface/mcp/i18n/en/index.ts +0 -178
  311. package/src/app/api/[locale]/system/unified-interface/mcp/i18n/pl/index.ts +0 -180
  312. package/src/app/api/[locale]/system/unified-interface/mcp/registry.ts +0 -305
  313. package/src/app/api/[locale]/system/unified-interface/mcp/serve/definition.ts +0 -124
  314. package/src/app/api/[locale]/system/unified-interface/mcp/serve/repository.ts +0 -44
  315. package/src/app/api/[locale]/system/unified-interface/mcp/serve/route.ts +0 -14
  316. package/src/app/api/[locale]/system/unified-interface/mcp/server/protocol-handler.ts +0 -291
  317. package/src/app/api/[locale]/system/unified-interface/mcp/server/server.ts +0 -155
  318. package/src/app/api/[locale]/system/unified-interface/mcp/server/stdio-transport.ts +0 -191
  319. package/src/app/api/[locale]/system/unified-interface/mcp/types.ts +0 -247
  320. package/src/app/api/[locale]/system/unified-interface/react/icons.tsx +0 -346
  321. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/create-form.ts +0 -1413
  322. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/create.ts +0 -525
  323. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/endpoint-to-metadata.ts +0 -52
  324. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definition/loader.ts +0 -144
  325. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/definitions/registry.ts +0 -262
  326. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/permissions/registry.ts +0 -656
  327. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/executor.ts +0 -220
  328. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/handler.ts +0 -313
  329. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/multi.ts +0 -182
  330. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/request-validator.ts +0 -173
  331. package/src/app/api/[locale]/system/unified-interface/shared/endpoints/route/single.ts +0 -58
  332. package/src/app/api/[locale]/system/unified-interface/shared/env/define-env-client.ts +0 -45
  333. package/src/app/api/[locale]/system/unified-interface/shared/env/define-env.ts +0 -43
  334. package/src/app/api/[locale]/system/unified-interface/shared/env/validation-logger.ts +0 -58
  335. package/src/app/api/[locale]/system/unified-interface/shared/field/enum.ts +0 -107
  336. package/src/app/api/[locale]/system/unified-interface/shared/field/specialized.ts +0 -336
  337. package/src/app/api/[locale]/system/unified-interface/shared/field/utils.test.ts +0 -385
  338. package/src/app/api/[locale]/system/unified-interface/shared/field/utils.ts +0 -1827
  339. package/src/app/api/[locale]/system/unified-interface/shared/field-config/endpoint-field-types.ts +0 -108
  340. package/src/app/api/[locale]/system/unified-interface/shared/field-config/field-config-types.ts +0 -288
  341. package/src/app/api/[locale]/system/unified-interface/shared/logger/colors.ts +0 -114
  342. package/src/app/api/[locale]/system/unified-interface/shared/logger/endpoint.ts +0 -155
  343. package/src/app/api/[locale]/system/unified-interface/shared/logger/file-logger.ts +0 -85
  344. package/src/app/api/[locale]/system/unified-interface/shared/logger/formatters.ts +0 -167
  345. package/src/app/api/[locale]/system/unified-interface/shared/server-only/auth/base-auth-handler.ts +0 -82
  346. package/src/app/api/[locale]/system/unified-interface/shared/server-only/auth/factory.ts +0 -34
  347. package/src/app/api/[locale]/system/unified-interface/shared/server-only/server-only.ts +0 -1
  348. package/src/app/api/[locale]/system/unified-interface/shared/types/actions.ts +0 -284
  349. package/src/app/api/[locale]/system/unified-interface/shared/types/endpoint.ts +0 -1101
  350. package/src/app/api/[locale]/system/unified-interface/shared/types/enums.ts +0 -383
  351. package/src/app/api/[locale]/system/unified-interface/shared/types/platform.ts +0 -34
  352. package/src/app/api/[locale]/system/unified-interface/shared/types/types.ts +0 -76
  353. package/src/app/api/[locale]/system/unified-interface/shared/types/ui-config.ts +0 -72
  354. package/src/app/api/[locale]/system/unified-interface/shared/utils/error-types.ts +0 -27
  355. package/src/app/api/[locale]/system/unified-interface/shared/utils/path.ts +0 -80
  356. package/src/app/api/[locale]/system/unified-interface/shared/utils/scanner.ts +0 -225
  357. package/src/app/api/[locale]/system/unified-interface/shared/widgets/actions.ts +0 -251
  358. package/src/app/api/[locale]/system/unified-interface/shared/widgets/configs.ts +0 -1060
  359. package/src/app/api/[locale]/system/unified-interface/shared/widgets/helpers.ts +0 -70
  360. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/accordion.ts +0 -75
  361. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/avatar.ts +0 -69
  362. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/badge.ts +0 -86
  363. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/code-output.ts +0 -283
  364. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/code-quality-list.ts +0 -190
  365. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/container.ts +0 -114
  366. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-card.ts +0 -71
  367. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-cards.ts +0 -228
  368. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-list.ts +0 -119
  369. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/data-table.ts +0 -367
  370. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/editable-text.ts +0 -81
  371. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/empty-state.ts +0 -71
  372. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/errors.ts +0 -79
  373. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/grouped-list.ts +0 -426
  374. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/index.ts +0 -38
  375. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link-card.ts +0 -112
  376. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link-list.ts +0 -110
  377. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/link.ts +0 -66
  378. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/loading.ts +0 -79
  379. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/markdown.ts +0 -159
  380. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/metric-card.ts +0 -225
  381. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/section.ts +0 -85
  382. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/stats-grid.ts +0 -63
  383. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/tabs.ts +0 -73
  384. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/text.ts +0 -96
  385. package/src/app/api/[locale]/system/unified-interface/shared/widgets/logic/title.ts +0 -57
  386. package/src/app/api/[locale]/system/unified-interface/shared/widgets/types.ts +0 -236
  387. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/field-helpers.ts +0 -120
  388. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/formatting.ts +0 -414
  389. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/url.ts +0 -37
  390. package/src/app/api/[locale]/system/unified-interface/shared/widgets/utils/widget-helpers.ts +0 -427
  391. package/src/app/api/[locale]/user/auth/i18n/de/index.ts +0 -204
  392. package/src/app/api/[locale]/user/auth/i18n/en/index.ts +0 -199
  393. package/src/app/api/[locale]/user/auth/i18n/pl/index.ts +0 -203
  394. package/src/app/api/[locale]/user/auth/types.ts +0 -45
  395. package/src/app/api/[locale]/user/enum.ts +0 -64
  396. package/src/app/api/[locale]/user/i18n/de/index.ts +0 -75
  397. package/src/app/api/[locale]/user/i18n/en/index.ts +0 -74
  398. package/src/app/api/[locale]/user/i18n/pl/index.ts +0 -75
  399. package/src/app/api/[locale]/user/types.ts +0 -111
  400. package/src/app/api/[locale]/user/user-roles/enum.ts +0 -103
  401. package/src/app/api/[locale]/user/user-roles/i18n/de/index.ts +0 -85
  402. package/src/app/api/[locale]/user/user-roles/i18n/en/index.ts +0 -83
  403. package/src/app/api/[locale]/user/user-roles/i18n/pl/index.ts +0 -85
  404. package/src/app/api/[locale]/user/user-roles/types.ts +0 -32
  405. package/src/app/api/i18n/de/index.ts +0 -6
  406. package/src/app/api/i18n/en/index.ts +0 -5
  407. package/src/app/api/i18n/pl/index.ts +0 -5
  408. package/src/app/i18n/de/index.ts +0 -18
  409. package/src/app/i18n/en/index.ts +0 -18
  410. package/src/app/i18n/pl/index.ts +0 -17
  411. package/src/config/constants.ts +0 -8
  412. package/src/config/debug.ts +0 -30
  413. package/src/config/env-client.ts +0 -57
  414. package/src/config/env.ts +0 -56
  415. package/src/config/i18n/de/index.ts +0 -3
  416. package/src/config/i18n/en/index.ts +0 -51
  417. package/src/config/i18n/pl/index.ts +0 -3
  418. package/src/i18n/core/config.ts +0 -225
  419. package/src/i18n/core/language-utils.ts +0 -226
  420. package/src/i18n/core/localization-utils.ts +0 -394
  421. package/src/i18n/core/scoped-translation.ts +0 -104
  422. package/src/i18n/core/shared-component.tsx +0 -28
  423. package/src/i18n/core/shared-translation-utils.ts +0 -97
  424. package/src/i18n/core/shared.ts +0 -44
  425. package/src/i18n/core/static-types.ts +0 -64
  426. package/src/i18n/core/translation-utils.ts +0 -186
  427. package/src/i18n/de/index.ts +0 -8
  428. package/src/i18n/en/index.ts +0 -7
  429. package/src/i18n/index.ts +0 -100
  430. package/src/i18n/pl/index.ts +0 -7
@@ -1,955 +0,0 @@
1
- /* eslint-disable i18next/no-literal-string */
2
- /**
3
- * Unified Check Configuration
4
- *
5
- * Single source of truth for all code quality tools:
6
- * - Oxlint (fast Rust linter)
7
- * - ESLint (import sorting, react hooks)
8
- * - Prettier (code formatting)
9
- * - TypeScript (type checking)
10
- * - Testing (vitest)
11
- * - VSCode integration
12
- */
13
-
14
- import type {
15
- CheckConfig,
16
- EslintFlatConfigItem,
17
- EslintParser,
18
- EslintPluginLike,
19
- } from "@next-vibe/checker/system/check/config/types";
20
-
21
- // --------------------------------------------------------
22
- // Vibe Check Defaults
23
- // --------------------------------------------------------
24
- const vibeCheck: CheckConfig["vibeCheck"] = {
25
- fix: true,
26
- skipEslint: false,
27
- skipOxlint: false,
28
- skipTypecheck: false,
29
- timeout: 3600,
30
- limit: 200,
31
- };
32
-
33
- // ============================================================
34
- // Feature Flags (local to this file, not part of CheckConfig)
35
- // ============================================================
36
-
37
- const features = {
38
- // Linting features
39
- react: true, // React-specific rules
40
- reactCompiler: true, // React compiler rules (requires react)
41
- accessibility: true, // jsx-a11y rules
42
- promise: true, // Promise best practices
43
- node: true, // Node.js rules
44
- unicorn: true, // Unicorn rules (modern JS)
45
- nextjs: true, // Next.js specific rules
46
- pedantic: false, // Stricter/pedantic rules
47
- // Custom plugins
48
- i18n: true, // Check for untranslated strings
49
- jsxCapitalization: true, // Enforce capitalized JSX components
50
- restrictedSyntax: true, // No throw, unknown, object types
51
- // TypeScript
52
- tsgo: true, // Use tsgo instead of tsc for type checking
53
- strictTypes: true, // Strict type checking rules
54
- } as const;
55
-
56
- // ============================================================
57
- // Shared Ignores (files, folders, globs - mixed)
58
- // ============================================================
59
-
60
- const { oxlintIgnores, eslintIgnores } = formatIgnorePatterns([
61
- // Directories
62
- "dist",
63
- ".dist",
64
- ".next",
65
- ".tmp",
66
- "node_modules",
67
- ".git",
68
- "coverage",
69
- "public",
70
- "drizzle",
71
- ".vscode",
72
- ".vibe-guard-instance",
73
- ".github",
74
- ".claude",
75
- "to_migrate",
76
- "postgres_data",
77
- ".nyc_output",
78
- "build",
79
- "test-files",
80
- "test-project",
81
- // Files
82
- ".DS_Store",
83
- "thumbs.db",
84
- ".gitignore",
85
- ".env",
86
- ".env.local",
87
- ".env.development",
88
- ".env.production",
89
- "next-env.d.ts",
90
- "nativewind-env.d.ts",
91
- // Glob patterns
92
- "**/test-files/**",
93
- ]);
94
-
95
- // --------------------------------------------------------
96
- // Typecheck Configuration
97
- // --------------------------------------------------------
98
- const typecheck = {
99
- enabled: true as const,
100
- cachePath: ".tmp/typecheck-cache",
101
- useTsgo: features.tsgo,
102
- };
103
-
104
- // --------------------------------------------------------
105
- // Oxlint Configuration
106
- // --------------------------------------------------------
107
- const oxlint: CheckConfig["oxlint"] = {
108
- enabled: true,
109
- configPath: ".tmp/.oxlintrc.json",
110
- cachePath: ".tmp/oxlint-cache",
111
- lintableExtensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"],
112
- $schema: "./node_modules/oxlint/configuration_schema.json",
113
- ignorePatterns: oxlintIgnores,
114
- plugins: [
115
- "typescript",
116
- "oxc",
117
- ...(features.unicorn ? ["unicorn"] : []),
118
- ...(features.react ? ["react"] : []),
119
- ...(features.accessibility ? ["jsx-a11y"] : []),
120
- ...(features.promise ? ["promise"] : []),
121
- ...(features.node ? ["node"] : []),
122
- ...(features.nextjs ? ["nextjs"] : []),
123
- ],
124
- jsPlugins: [
125
- ...(features.restrictedSyntax
126
- ? ["@next-vibe/checker/oxlint-plugins/restricted-syntax.js"]
127
- : []),
128
- ...(features.jsxCapitalization
129
- ? ["@next-vibe/checker/oxlint-plugins/jsx-capitalization.js"]
130
- : []),
131
- ...(features.i18n ? ["@next-vibe/checker/oxlint-plugins/i18n.js"] : []),
132
- ],
133
- categories: {
134
- correctness: "error",
135
- suspicious: "error",
136
- pedantic: features.pedantic ? "warn" : "off",
137
- style: "off",
138
- },
139
- rules: {
140
- // ── Core ESLint (always enabled) ──────────────────────────
141
- "no-debugger": "error",
142
- "no-console": "error",
143
- curly: "error",
144
- eqeqeq: "error",
145
- "no-undef": "off",
146
- camelcase: "error",
147
- "no-template-curly-in-string": "error",
148
- "no-unsafe-optional-chaining": "error",
149
- "array-callback-return": "error",
150
- "no-constructor-return": "error",
151
- "no-self-compare": "error",
152
- "no-unreachable-loop": "error",
153
- "no-unused-private-class-members": "error",
154
- "prefer-template": "error",
155
- "require-atomic-updates": "warn",
156
- "no-promise-executor-return": "error",
157
-
158
- // ── TypeScript (always enabled) ───────────────────────────
159
- "typescript/no-explicit-any": "error",
160
- "typescript/no-unused-vars": [
161
- "error",
162
- {
163
- vars: "all",
164
- args: "all",
165
- caughtErrors: "none",
166
- ignoreRestSiblings: false,
167
- argsIgnorePattern: "^$",
168
- varsIgnorePattern: "^$",
169
- },
170
- ],
171
- "typescript/no-inferrable-types": "error",
172
- "typescript/consistent-type-imports": "error",
173
- "typescript/no-empty-function": "error",
174
- "typescript/prefer-includes": "error",
175
- "typescript/prefer-string-starts-ends-with": "error",
176
- "typescript/ban-ts-comment": "error",
177
- "typescript/consistent-type-definitions": "error",
178
- "typescript/no-empty-object-type": "error",
179
- "typescript/no-unsafe-function-type": "error",
180
- "typescript/no-wrapper-object-types": "error",
181
- "typescript/no-duplicate-enum-values": "error",
182
- "typescript/no-extra-non-null-assertion": "error",
183
- "no-extraneous-class": "off",
184
- // Strict type rules (enabled via strictTypes flag)
185
- ...(features.strictTypes
186
- ? {
187
- "typescript/await-thenable": "error",
188
- "typescript/no-floating-promises": "error",
189
- "typescript/no-for-in-array": "error",
190
- "typescript/no-misused-promises": "error",
191
- "typescript/no-unsafe-assignment": "error",
192
- "typescript/no-unnecessary-type-assertion": "error",
193
- "typescript/explicit-function-return-type": "error",
194
- "typescript/restrict-template-expressions": "error",
195
- }
196
- : {}),
197
-
198
- // ── React (enabled via react flag) ────────────────────────
199
- ...(features.react
200
- ? {
201
- "react/jsx-key": "error",
202
- "react/jsx-no-duplicate-props": "error",
203
- "react/jsx-no-undef": "error",
204
- "react/jsx-uses-react": "off",
205
- "react/jsx-uses-vars": "error",
206
- "react/no-children-prop": "error",
207
- "react/no-deprecated": "error",
208
- "react/no-direct-mutation-state": "error",
209
- "react/no-unknown-property": "error",
210
- "react/self-closing-comp": "error",
211
- "react/react-in-jsx-scope": "off",
212
- }
213
- : {}),
214
-
215
- // ── Accessibility (enabled via accessibility flag) ────────
216
- ...(features.accessibility
217
- ? {
218
- "jsx-a11y/alt-text": "error",
219
- "jsx-a11y/aria-props": "error",
220
- "jsx-a11y/aria-role": "error",
221
- "jsx-a11y/anchor-has-content": "error",
222
- "jsx-a11y/aria-proptypes": "error",
223
- "jsx-a11y/aria-unsupported-elements": "error",
224
- "jsx-a11y/click-events-have-key-events": "error",
225
- "jsx-a11y/heading-has-content": "error",
226
- "jsx-a11y/html-has-lang": "error",
227
- "jsx-a11y/iframe-has-title": "error",
228
- "jsx-a11y/img-redundant-alt": "error",
229
- "jsx-a11y/no-access-key": "error",
230
- "jsx-a11y/no-autofocus": "error",
231
- "jsx-a11y/no-distracting-elements": "error",
232
- "jsx-a11y/no-redundant-roles": "error",
233
- "jsx-a11y/role-has-required-aria-props": "error",
234
- "jsx-a11y/role-supports-aria-props": "error",
235
- "jsx-a11y/scope": "error",
236
- "jsx-a11y/tabindex-no-positive": "error",
237
- }
238
- : {}),
239
-
240
- // ── Promise (enabled via promise flag) ────────────────────
241
- ...(features.promise
242
- ? {
243
- "promise/param-names": "error",
244
- "promise/always-return": "error",
245
- "promise/catch-or-return": "error",
246
- }
247
- : {}),
248
-
249
- // ── Node (enabled via node flag) ──────────────────────────
250
- ...(features.node
251
- ? {
252
- "node/no-missing-import": "off",
253
- "node/no-unsupported-features/es-syntax": "off",
254
- }
255
- : {}),
256
-
257
- // ── Unicorn (enabled via unicorn flag) ────────────────────
258
- ...(features.unicorn
259
- ? {
260
- "unicorn/prefer-string-starts-ends-with": "error",
261
- "unicorn/no-empty-file": "error",
262
- "unicorn/no-unnecessary-await": "error",
263
- "unicorn/no-useless-spread": "error",
264
- "unicorn/prefer-set-size": "error",
265
- "unicorn/no-await-in-promise-methods": "error",
266
- "unicorn/no-invalid-fetch-options": "error",
267
- "unicorn/no-invalid-remove-event-listener": "error",
268
- "unicorn/no-new-array": "error",
269
- "unicorn/no-single-promise-in-promise-methods": "error",
270
- "unicorn/no-thenable": "error",
271
- "unicorn/no-useless-fallback-in-spread": "off",
272
- "unicorn/no-useless-length-check": "error",
273
- "unicorn/prefer-array-flat": "error",
274
- "unicorn/prefer-array-flat-map": "error",
275
- "unicorn/prefer-includes": "error",
276
- "unicorn/prefer-modern-dom-apis": "error",
277
- "unicorn/prefer-node-protocol": "error",
278
- "unicorn/prefer-spread": "error",
279
- }
280
- : {}),
281
-
282
- // ── OXC (always enabled) ──────────────────────────────────
283
- "oxc/no-optional-chaining": "off",
284
- "oxc/missing-throw": "error",
285
- "oxc/number-arg-out-of-range": "error",
286
- "oxc/only-used-in-recursion": "error",
287
- "oxc/bad-array-method-on-arguments": "error",
288
- "oxc/bad-comparison-sequence": "error",
289
- "oxc/const-comparisons": "error",
290
- "oxc/double-comparisons": "error",
291
- "oxc/erasing-op": "error",
292
- "oxc/bad-char-at-comparison": "error",
293
- "oxc/bad-min-max-func": "error",
294
- "oxc/bad-object-literal-comparison": "error",
295
- "oxc/bad-replace-all-arg": "error",
296
- "oxc/uninvoked-array-callback": "error",
297
-
298
- // ── Pedantic rule overrides ─────────────────────────────────
299
- "max-lines": "off",
300
- ...(features.pedantic ? { "max-lines-per-function": ["warn", { max: 150 }] } : {}),
301
- // Disable rules that conflict with TypeScript strict null checks
302
- // (.at() and .codePointAt() return T | undefined)
303
- "unicorn/prefer-at": "off",
304
- "unicorn/prefer-code-point": "off",
305
- "unicorn/prefer-negative-index": "off",
306
- // Conflicts with promise/always-return which requires returning something
307
- "unicorn/no-useless-undefined": "off",
308
- "unicorn/no-useless-switch-case": "off",
309
- "unicorn/no-array-callback-reference": "off",
310
- "unicorn/prefer-query-selector": "off",
311
-
312
- // ── Custom JS Plugins (enabled via feature flags) ────────
313
- // Options defined inline, plugins read from config.oxlint.rules
314
- ...(features.restrictedSyntax
315
- ? {
316
- "oxlint-plugin-restricted/restricted-syntax": [
317
- "error",
318
- {
319
- jsxAllowedProperties: [
320
- "icon",
321
- "content",
322
- "title",
323
- "description",
324
- "children",
325
- "header",
326
- "footer",
327
- "element",
328
- "component",
329
- "label",
330
- "placeholder",
331
- "tooltip",
332
- "badge",
333
- "prefix",
334
- "suffix",
335
- "startAdornment",
336
- "endAdornment",
337
- "emptyState",
338
- "fallback",
339
- ],
340
- },
341
- ],
342
- }
343
- : {}),
344
- ...(features.jsxCapitalization
345
- ? {
346
- "oxlint-plugin-jsx-capitalization/jsx-capitalization": [
347
- "error",
348
- {
349
- excludedPaths: ["/src/packages/next-vibe-ui/web/"],
350
- excludedFilePatterns: [
351
- "/email.tsx",
352
- ".email.tsx",
353
- "/test.tsx",
354
- ".test.tsx",
355
- ".spec.tsx",
356
- "/__tests__/",
357
- ],
358
- typographyElements: ["h1", "h2", "h3", "h4", "p", "blockquote", "code"],
359
- standaloneElements: ["span", "pre"],
360
- svgElements: [
361
- "svg",
362
- "path",
363
- "circle",
364
- "rect",
365
- "line",
366
- "polyline",
367
- "polygon",
368
- "ellipse",
369
- "g",
370
- "text",
371
- "tspan",
372
- "defs",
373
- "linearGradient",
374
- "radialGradient",
375
- "stop",
376
- "clipPath",
377
- "mask",
378
- "pattern",
379
- "use",
380
- "symbol",
381
- "marker",
382
- "foreignObject",
383
- ],
384
- imageElements: ["img", "picture"],
385
- commonUiElements: [
386
- "div",
387
- "section",
388
- "article",
389
- "aside",
390
- "header",
391
- "footer",
392
- "main",
393
- "nav",
394
- "button",
395
- "input",
396
- "textarea",
397
- "select",
398
- "option",
399
- "label",
400
- "form",
401
- "fieldset",
402
- "legend",
403
- "ul",
404
- "ol",
405
- "li",
406
- "dl",
407
- "dt",
408
- "dd",
409
- "table",
410
- "thead",
411
- "tbody",
412
- "tfoot",
413
- "tr",
414
- "th",
415
- "td",
416
- "caption",
417
- "video",
418
- "audio",
419
- "source",
420
- "track",
421
- "canvas",
422
- "hr",
423
- "br",
424
- "iframe",
425
- "embed",
426
- "object",
427
- "details",
428
- "summary",
429
- "dialog",
430
- "menu",
431
- "figure",
432
- "figcaption",
433
- "time",
434
- "progress",
435
- "meter",
436
- "output",
437
- "strong",
438
- "em",
439
- "b",
440
- "i",
441
- "u",
442
- "s",
443
- ],
444
- },
445
- ],
446
- }
447
- : {}),
448
- ...(features.i18n
449
- ? {
450
- "oxlint-plugin-i18n/no-literal-string": [
451
- "error",
452
- {
453
- words: {
454
- exclude: [
455
- String.raw`^[\[\]{}—<>•+%#@.:_*;,/()\-]+$`,
456
- String.raw`^\s+$`,
457
- String.raw`^\d+$`,
458
- String.raw`^[^\s]+\.[^\s]+$`,
459
- String.raw`\.(?:jpe?g|png|svg|webp|gif|csv|json|xml|pdf)$`,
460
- String.raw`^(?:https?://|/)[^\s]*$`,
461
- String.raw`^[#@]\w+$`,
462
- String.raw`^[a-z]+$`,
463
- String.raw`^[a-z]+(?:[A-Z][a-zA-Z0-9]*)*$`,
464
- String.raw`^[^\s]+(?:-[^\s]+)+$`,
465
- String.raw`^[^\s]+\/(?:[^\s]*)$`,
466
- String.raw`^[A-Z]+(?:_[A-Z]+)*$`,
467
- String.raw`^use (?:client|server|custom)$`,
468
- String.raw`^&[a-z]+;$`,
469
- String.raw`^[MmLlHhVvCcSsQqTtAaZz0-9\s,.-]+$`,
470
- String.raw`^[▶◀▲▼►◄▴▾►◄✅✕✔✓🔧]+$`,
471
- String.raw`^[\d\s]+(?:px|em|rem|%|vh|vw|deg|rad)?(?:\s+[\d]+)*$`,
472
- String.raw`^url\([^)]+\)$`,
473
- String.raw`^(?:translate|rotate|scale|matrix|skew)\([^)]+\)$`,
474
- String.raw`^(?:Esc|Enter|Tab|Shift|Ctrl|Alt|Cmd|Space|Backspace|Delete|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|F\d+)$`,
475
- String.raw`^[A-Z0-9]{1,2}$`,
476
- ],
477
- },
478
- "jsx-attributes": {
479
- exclude: [
480
- "className",
481
- "*ClassName",
482
- "id",
483
- "data-testid",
484
- "to",
485
- "href",
486
- "style",
487
- "target",
488
- "rel",
489
- "type",
490
- "src",
491
- "viewBox",
492
- "d",
493
- "fill",
494
- "stroke",
495
- "transform",
496
- "gradientTransform",
497
- "gradientUnits",
498
- "cn",
499
- "cx",
500
- "cy",
501
- "r",
502
- "fx",
503
- "fy",
504
- "offset",
505
- "stopColor",
506
- "stopOpacity",
507
- "width",
508
- "height",
509
- "x",
510
- "y",
511
- "x1",
512
- "x2",
513
- "y1",
514
- "y2",
515
- "strokeWidth",
516
- "strokeLinecap",
517
- "strokeLinejoin",
518
- "fillRule",
519
- "clipRule",
520
- "opacity",
521
- "xmlns",
522
- "xmlnsXlink",
523
- "aria-label",
524
- "aria-labelledby",
525
- "aria-describedby",
526
- "title",
527
- "placeholder",
528
- ],
529
- },
530
- "object-properties": {
531
- exclude: [
532
- "id",
533
- "key",
534
- "type",
535
- "className",
536
- "*ClassName",
537
- "imageUrl",
538
- "style",
539
- "path",
540
- "href",
541
- "to",
542
- "data",
543
- "alg",
544
- "backgroundColor",
545
- "borderRadius",
546
- "color",
547
- "fontSize",
548
- "lineHeight",
549
- "padding",
550
- "textDecoration",
551
- "marginTop",
552
- "marginBottom",
553
- "margin",
554
- "value",
555
- "email",
556
- "displayName",
557
- ],
558
- },
559
- },
560
- ],
561
- }
562
- : {}),
563
-
564
- // ── Next.js (enabled via nextjs flag) ─────────────────────
565
- ...(features.nextjs
566
- ? {
567
- "nextjs/google-font-display": "error",
568
- "nextjs/google-font-preconnect": "error",
569
- "nextjs/inline-script-id": "error",
570
- "nextjs/next-script-for-ga": "error",
571
- "nextjs/no-assign-module-variable": "error",
572
- "nextjs/no-before-interactive-script-outside-document": "error",
573
- "nextjs/no-css-tags": "error",
574
- "nextjs/no-document-import-in-page": "error",
575
- "nextjs/no-duplicate-head": "error",
576
- "nextjs/no-head-element": "error",
577
- "nextjs/no-head-import-in-document": "error",
578
- "nextjs/no-html-link-for-pages": "error",
579
- "nextjs/no-img-element": "warn",
580
- "nextjs/no-page-custom-font": "error",
581
- "nextjs/no-script-component-in-head": "error",
582
- "nextjs/no-styled-jsx-in-document": "error",
583
- "nextjs/no-sync-scripts": "error",
584
- "nextjs/no-title-in-document-head": "error",
585
- "nextjs/no-typos": "error",
586
- "nextjs/no-unwanted-polyfillio": "error",
587
- }
588
- : {}),
589
- },
590
- settings: {
591
- "jsx-a11y": {
592
- polymorphicPropName: null,
593
- components: {},
594
- attributes: {},
595
- },
596
- next: { rootDir: ["."] },
597
- react: { formComponents: [], linkComponents: [] },
598
- jsdoc: {
599
- ignorePrivate: false,
600
- ignoreInternal: false,
601
- ignoreReplacesDocs: true,
602
- overrideReplacesDocs: true,
603
- augmentsExtendsReplacesDocs: false,
604
- implementsReplacesDocs: false,
605
- exemptDestructuredRootsFromChecks: false,
606
- tagNamePreference: {},
607
- },
608
- },
609
- env: { builtin: true },
610
- globals: {
611
- React: "readonly",
612
- JSX: "readonly",
613
- NodeJS: "readonly",
614
- __dirname: "readonly",
615
- __filename: "readonly",
616
- process: "readonly",
617
- global: "readonly",
618
- },
619
- };
620
-
621
- // --------------------------------------------------------
622
- // Prettier Configuration
623
- // --------------------------------------------------------
624
- const prettier: CheckConfig["prettier"] = {
625
- enabled: true,
626
- configPath: ".tmp/.oxfmtrc.json",
627
- semi: true,
628
- singleQuote: false,
629
- trailingComma: "all",
630
- tabWidth: 2,
631
- useTabs: false,
632
- printWidth: 80,
633
- arrowParens: "always",
634
- endOfLine: "lf",
635
- bracketSpacing: true,
636
- jsxSingleQuote: false,
637
- jsxBracketSameLine: false,
638
- proseWrap: "preserve",
639
- };
640
-
641
- // --------------------------------------------------------
642
- // Testing Configuration
643
- // --------------------------------------------------------
644
- const testing: CheckConfig["testing"] = {
645
- enabled: true,
646
- command: "bun test",
647
- timeout: 300_000,
648
- include: ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"],
649
- exclude: [...oxlintIgnores],
650
- coverage: {
651
- enabled: false,
652
- provider: "v8",
653
- thresholds: { lines: 80, branches: 80, functions: 80, statements: 80 },
654
- },
655
- };
656
-
657
- // --------------------------------------------------------
658
- // VSCode Integration
659
- // --------------------------------------------------------
660
- const vscode: CheckConfig["vscode"] = {
661
- enabled: true,
662
- autoGenerateSettings: true,
663
- settingsPath: "./.vscode/settings.json",
664
- settings: {
665
- oxc: {
666
- enable: true,
667
- lintRun: "onSave",
668
- configPath: ".tmp/.oxlintrc.json",
669
- fmtConfigPath: ".tmp/.oxfmtrc.json",
670
- fmtExperimental: true,
671
- typeAware: true,
672
- traceServer: "verbose",
673
- },
674
- editor: {
675
- formatOnSave: true,
676
- defaultFormatter: "oxc.oxc-vscode",
677
- codeActionsOnSave: {
678
- "source.fixAll.eslint": "explicit",
679
- "source.organizeImports": "explicit",
680
- },
681
- },
682
- typescript: {
683
- validateEnable: true,
684
- suggestAutoImports: true,
685
- preferTypeOnlyAutoImports: true,
686
- experimentalUseTsgo: typecheck.enabled && typecheck.useTsgo,
687
- },
688
- files: { eol: "\n" },
689
- search: {
690
- exclude: {
691
- "**/node_modules": true,
692
- "**/tsconfig.tsbuildinfo": true,
693
- "**/*.tmp": true,
694
- "**/*.next": true,
695
- },
696
- },
697
- },
698
- };
699
-
700
- // ============================================================
701
- // ESLint FlatConfig Cache (lazy-loaded on first access)
702
- // ============================================================
703
- let cachedEslintFlatConfig: EslintFlatConfigItem[] | null = null;
704
-
705
- const config = (): CheckConfig => {
706
- // --------------------------------------------------------
707
- // ESLint Configuration (for rules oxlint doesn't support)
708
- // --------------------------------------------------------
709
- const eslint: CheckConfig["eslint"] = {
710
- enabled: true,
711
- configPath: ".tmp/eslint.config.mjs",
712
- cachePath: ".tmp/eslint-cache",
713
- lintableExtensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"],
714
- ignores: oxlintIgnores,
715
- // Build flatConfig with plugins (called from eslint.config.mjs which loads plugins)
716
- buildFlatConfig(
717
- reactCompilerPlugin: EslintPluginLike,
718
- reactHooksPlugin: EslintPluginLike,
719
- simpleImportSortPlugin: EslintPluginLike,
720
- tseslint: { parser: EslintParser },
721
- ): EslintFlatConfigItem[] {
722
- if (cachedEslintFlatConfig) {
723
- return cachedEslintFlatConfig;
724
- }
725
-
726
- cachedEslintFlatConfig = [
727
- { ignores: eslintIgnores },
728
- {
729
- files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
730
- languageOptions: {
731
- parser: tseslint.parser,
732
- parserOptions: {
733
- ecmaVersion: "latest",
734
- sourceType: "module",
735
- ecmaFeatures: { jsx: true },
736
- },
737
- },
738
- linterOptions: { reportUnusedDisableDirectives: "off" },
739
- plugins: {
740
- "simple-import-sort": simpleImportSortPlugin,
741
- ...(features.react ? { "react-hooks": reactHooksPlugin } : {}),
742
- ...(features.reactCompiler ? { "react-compiler": reactCompilerPlugin } : {}),
743
- // Stubs for oxlint rules
744
- i18next: createEslintStub(["no-literal-string"]),
745
- "oxlint-plugin-restricted": createEslintStub(["restricted-syntax"]),
746
- "oxlint-plugin-jsx-capitalization": createEslintStub(["jsx-capitalization"]),
747
- "oxlint-plugin-i18n": createEslintStub(["no-literal-string"]),
748
- "@typescript-eslint": createEslintStub([
749
- "no-explicit-any",
750
- "no-unused-vars",
751
- "no-empty-function",
752
- "no-empty-object-type",
753
- "no-floating-promises",
754
- "require-await",
755
- "only-throw-error",
756
- "no-unsafe-assignment",
757
- "triple-slash-reference",
758
- "consistent-type-definitions",
759
- "no-require-imports",
760
- "no-unsafe-function-type",
761
- "explicit-function-return-type",
762
- "no-namespace",
763
- "no-unsafe-enum-comparison",
764
- "consistent-type-imports",
765
- "no-unnecessary-condition",
766
- "no-base-to-string",
767
- "no-unsafe-member-access",
768
- "no-implied-eval",
769
- ]),
770
- "typescript-eslint": createEslintStub(["no-explicit-any", "no-unused-vars"]),
771
- "eslint-plugin-unicorn": createEslintStub(["require-module-specifiers"]),
772
- prettier: createEslintStub(["prettier"]),
773
- "eslint-plugin-promise": createEslintStub(["no-multiple-resolved"]),
774
- "eslint-plugin-next": createEslintStub([
775
- "no-html-link-for-pages",
776
- "no-img-element",
777
- "no-assign-module-variable",
778
- ]),
779
- "@next/next": createEslintStub(["no-img-element"]),
780
- eslint: createEslintStub(["no-template-curly-in-string"]),
781
- "jsx-a11y": createEslintStub(["prefer-tag-over-role"]),
782
- oxc: createEslintStub(["only-used-in-recursion"]),
783
- "eslint-plugin-import": createEslintStub(["no-named-as-default"]),
784
- i18n: createEslintStub(["no-literal-string"]),
785
- },
786
- rules: {
787
- "simple-import-sort/imports": "error",
788
- "simple-import-sort/exports": "error",
789
- ...(features.react
790
- ? {
791
- "react-hooks/rules-of-hooks": "error",
792
- "react-hooks/exhaustive-deps": "error",
793
- }
794
- : {}),
795
- ...(features.reactCompiler ? { "react-compiler/react-compiler": "error" } : {}),
796
- "no-unused-vars": "off",
797
- "no-console": "off",
798
- "no-template-curly-in-string": "off",
799
- "no-control-regex": "off",
800
- "prefer-template": "off",
801
- },
802
- },
803
- {
804
- files: ["**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
805
- linterOptions: { reportUnusedDisableDirectives: "off" },
806
- plugins: {
807
- "simple-import-sort": simpleImportSortPlugin,
808
- ...(features.react ? { "react-hooks": reactHooksPlugin } : {}),
809
- i18next: createEslintStub(["no-literal-string"]),
810
- "oxlint-plugin-restricted": createEslintStub(["restricted-syntax"]),
811
- "@typescript-eslint": createEslintStub(["no-explicit-any", "no-unused-vars"]),
812
- "eslint-plugin-unicorn": createEslintStub(["require-module-specifiers"]),
813
- prettier: createEslintStub(["prettier"]),
814
- "eslint-plugin-promise": createEslintStub(["no-multiple-resolved"]),
815
- "eslint-plugin-next": createEslintStub([
816
- "no-html-link-for-pages",
817
- "no-img-element",
818
- "no-assign-module-variable",
819
- ]),
820
- "@next/next": createEslintStub(["no-img-element"]),
821
- eslint: createEslintStub(["no-template-curly-in-string"]),
822
- "jsx-a11y": createEslintStub(["prefer-tag-over-role"]),
823
- oxc: createEslintStub(["only-used-in-recursion"]),
824
- "eslint-plugin-import": createEslintStub(["no-named-as-default"]),
825
- i18n: createEslintStub(["no-literal-string"]),
826
- },
827
- rules: {
828
- "simple-import-sort/imports": "error",
829
- "simple-import-sort/exports": "error",
830
- ...(features.react
831
- ? {
832
- "react-hooks/rules-of-hooks": "error",
833
- "react-hooks/exhaustive-deps": "error",
834
- }
835
- : {}),
836
- "no-unused-vars": "off",
837
- "no-console": "off",
838
- "no-template-curly-in-string": "off",
839
- "no-control-regex": "off",
840
- "prefer-template": "off",
841
- },
842
- },
843
- ];
844
-
845
- return cachedEslintFlatConfig!;
846
- },
847
- };
848
-
849
- return {
850
- vibeCheck,
851
- oxlint,
852
- prettier,
853
- eslint,
854
- typecheck,
855
- testing,
856
- vscode,
857
- };
858
- };
859
-
860
- /** ESLint stub plugin for rules handled by oxlint */
861
- interface EslintStubPlugin {
862
- rules: Record<
863
- string,
864
- {
865
- create: () => Record<string, never>;
866
- meta: { docs: { description: string } };
867
- }
868
- >;
869
- }
870
-
871
- /** Format result for ignore patterns */
872
- interface IgnoreFormats {
873
- oxlintIgnores: string[];
874
- eslintIgnores: string[];
875
- }
876
-
877
- /**
878
- * Creates stub ESLint plugin for rules handled by oxlint.
879
- *
880
- * This allows ESLint disable comments (e.g., `// eslint-disable-next-line rule-name`)
881
- * to work without errors, even though the actual linting is done by oxlint.
882
- *
883
- * @param rules - Array of rule names to stub
884
- * @returns ESLint plugin with no-op rules
885
- *
886
- * @example
887
- * ```typescript
888
- * const tsStub = createEslintStub(["no-explicit-any", "no-unused-vars"]);
889
- * // Use in ESLint config:
890
- * plugins: { "@typescript-eslint": tsStub }
891
- * ```
892
- */
893
- export function createEslintStub(rules: string[]): EslintStubPlugin {
894
- return {
895
- rules: Object.fromEntries(
896
- rules.map((rule) => [
897
- rule,
898
- {
899
- create: (): Record<string, never> => ({}),
900
- meta: { docs: { description: "Stub - handled by oxlint" } },
901
- },
902
- ]),
903
- ),
904
- };
905
- }
906
-
907
- /**
908
- * Converts an array of ignore patterns to both oxlint and ESLint formats.
909
- *
910
- * Oxlint accepts mixed patterns (directories, files, globs) directly.
911
- * ESLint flat config requires glob patterns with proper prefixes/suffixes.
912
- *
913
- * Pattern conversion rules for ESLint:
914
- * - Glob patterns (contain `*`): kept as-is
915
- * - Files with extensions (contain `.` but don't start with `.`): wrapped as `** /filename`
916
- * - Directories and dotfiles/dotdirs: wrapped as `** /name/**`
917
- *
918
- * @param patterns - Array of ignore patterns (directories, files, or globs)
919
- * @returns Object with patterns formatted for oxlint and eslint
920
- *
921
- * @example
922
- * ```typescript
923
- * const { oxlintIgnores, eslintIgnores } = formatIgnorePatterns([
924
- * "dist", // Directory
925
- * ".next", // Dotdir
926
- * ".env", // Dotfile
927
- * "file.min.js", // File
928
- * "** /test/**", // Glob (already formatted)
929
- * ]);
930
- *
931
- * // oxlintIgnores = ["dist", ".next", ".env", "file.min.js", "** /test/**"]
932
- * // eslintIgnores = ["** /dist/**", "** /.next/**", "** /.env/**", "** /file.min.js", "** /test/**"]
933
- * ```
934
- */
935
- export function formatIgnorePatterns(patterns: string[]): IgnoreFormats {
936
- const eslintPatterns = patterns.map((pattern) => {
937
- // Already a glob pattern - keep as-is
938
- if (pattern.includes("*")) {
939
- return pattern;
940
- }
941
- // File with extension (but not dotfile) - wrap with **/ prefix only
942
- if (pattern.includes(".") && !pattern.startsWith(".")) {
943
- return `**/${pattern}`;
944
- }
945
- // Directory or dotfile/dotdir - wrap with **/ prefix and /** suffix
946
- return `**/${pattern}/**`;
947
- });
948
-
949
- return {
950
- oxlintIgnores: patterns,
951
- eslintIgnores: eslintPatterns,
952
- };
953
- }
954
-
955
- export default config;