@vef-framework/dev 1.0.135 → 2.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 (197) hide show
  1. package/README +15 -0
  2. package/dist/cjs/index.cjs +23 -0
  3. package/dist/cjs/lint/commitlint.cjs +14 -0
  4. package/dist/cjs/lint/eslint.cjs +981 -0
  5. package/dist/cjs/lint/index.cjs +14 -0
  6. package/dist/cjs/lint/stylelint.cjs +92 -0
  7. package/dist/cjs/vite/chunks.cjs +30 -0
  8. package/dist/cjs/vite/config.cjs +83 -0
  9. package/dist/cjs/vite/constants.cjs +30 -0
  10. package/dist/cjs/vite/define.cjs +26 -0
  11. package/dist/cjs/vite/index.cjs +11 -0
  12. package/dist/cjs/vite/plugin-app-config.cjs +38 -0
  13. package/dist/cjs/vite/plugin-auto-enhance/core.cjs +147 -0
  14. package/dist/cjs/vite/plugin-auto-enhance/index.cjs +40 -0
  15. package/dist/cjs/vite/plugin-auto-enhance/plugins/index.cjs +10 -0
  16. package/dist/cjs/vite/plugin-auto-enhance/plugins/operation-column-width.cjs +229 -0
  17. package/dist/cjs/vite/plugin-conventional-config.cjs +91 -0
  18. package/dist/cjs/vite/plugin-eslint.cjs +24 -0
  19. package/dist/cjs/vite/plugin-html.cjs +216 -0
  20. package/dist/cjs/vite/plugin-icons.cjs +22 -0
  21. package/dist/cjs/vite/plugin-injection.cjs +20 -0
  22. package/dist/cjs/vite/plugin-inspect.cjs +15 -0
  23. package/dist/cjs/vite/plugin-react.cjs +80 -0
  24. package/dist/cjs/vite/plugin-router.cjs +49 -0
  25. package/dist/cjs/vite/plugin-stylelint.cjs +24 -0
  26. package/dist/cjs/vite/plugin-svgr.cjs +59 -0
  27. package/dist/cjs/vite/plugin-tsconfig-paths.cjs +14 -0
  28. package/dist/cjs/vite/postcss.cjs +13 -0
  29. package/dist/es/index.js +8 -0
  30. package/dist/es/lint/commitlint.js +10 -0
  31. package/dist/es/lint/eslint.js +958 -0
  32. package/dist/es/lint/index.js +4 -0
  33. package/dist/es/lint/stylelint.js +88 -0
  34. package/dist/es/vite/chunks.js +26 -0
  35. package/dist/es/vite/config.js +79 -0
  36. package/dist/es/vite/constants.js +15 -0
  37. package/dist/es/vite/define.js +22 -0
  38. package/dist/es/vite/index.js +3 -0
  39. package/dist/es/vite/plugin-app-config.js +34 -0
  40. package/dist/es/vite/plugin-auto-enhance/core.js +143 -0
  41. package/dist/es/vite/plugin-auto-enhance/index.js +32 -0
  42. package/dist/es/vite/plugin-auto-enhance/plugins/index.js +2 -0
  43. package/dist/es/vite/plugin-auto-enhance/plugins/operation-column-width.js +225 -0
  44. package/dist/es/vite/plugin-conventional-config.js +87 -0
  45. package/dist/es/vite/plugin-eslint.js +20 -0
  46. package/dist/es/vite/plugin-html.js +212 -0
  47. package/dist/es/vite/plugin-icons.js +17 -0
  48. package/dist/es/vite/plugin-injection.js +16 -0
  49. package/dist/es/vite/plugin-inspect.js +11 -0
  50. package/dist/es/vite/plugin-react.js +76 -0
  51. package/dist/es/vite/plugin-router.js +45 -0
  52. package/dist/es/vite/plugin-stylelint.js +20 -0
  53. package/dist/es/vite/plugin-svgr.js +55 -0
  54. package/dist/es/vite/plugin-tsconfig-paths.js +10 -0
  55. package/dist/es/vite/postcss.js +9 -0
  56. package/dist/types/index.d.ts +2 -0
  57. package/dist/types/lint/commitlint.d.ts +8 -0
  58. package/dist/types/lint/eslint.d.ts +2 -0
  59. package/dist/types/lint/index.d.ts +3 -0
  60. package/dist/types/lint/stylelint.d.ts +7 -0
  61. package/dist/types/vite/chunks.d.ts +10 -0
  62. package/dist/types/vite/config.d.ts +39 -0
  63. package/{types → dist/types/vite}/constants.d.ts +4 -0
  64. package/dist/types/vite/define.d.ts +12 -0
  65. package/dist/types/vite/index.d.ts +3 -0
  66. package/{types → dist/types/vite}/plugin-app-config.d.ts +2 -1
  67. package/dist/types/vite/plugin-auto-enhance/core.d.ts +35 -0
  68. package/dist/types/vite/plugin-auto-enhance/index.d.ts +30 -0
  69. package/dist/types/vite/plugin-auto-enhance/plugins/index.d.ts +1 -0
  70. package/dist/types/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +14 -0
  71. package/dist/types/vite/plugin-auto-enhance/types.d.ts +83 -0
  72. package/{types → dist/types/vite}/plugin-conventional-config.d.ts +2 -2
  73. package/dist/types/vite/plugin-eslint.d.ts +7 -0
  74. package/{types → dist/types/vite}/plugin-html.d.ts +1 -1
  75. package/dist/types/vite/plugin-icons.d.ts +8 -0
  76. package/{types → dist/types/vite}/plugin-injection.d.ts +1 -1
  77. package/{types → dist/types/vite}/plugin-inspect.d.ts +2 -1
  78. package/dist/types/vite/plugin-react.d.ts +25 -0
  79. package/{types → dist/types/vite}/plugin-router.d.ts +2 -2
  80. package/dist/types/vite/plugin-stylelint.d.ts +7 -0
  81. package/dist/types/vite/plugin-svgr.d.ts +7 -0
  82. package/{types → dist/types/vite}/plugin-tsconfig-paths.d.ts +2 -1
  83. package/dist/types/vite/postcss.d.ts +9 -0
  84. package/package.json +94 -74
  85. package/{tsconfig.app.json → tsconfig.base.json} +13 -9
  86. package/{client.d.ts → types.d.ts} +0 -6
  87. package/README.md +0 -25
  88. package/bin/hoist-patterns.js +0 -1
  89. package/bin/vef.js +0 -18
  90. package/cjs/cli.cjs +0 -5
  91. package/cjs/commitlint-config.cjs +0 -2
  92. package/cjs/config.cjs +0 -2
  93. package/cjs/constants.cjs +0 -2
  94. package/cjs/eslint-config.cjs +0 -2
  95. package/cjs/index.cjs +0 -2
  96. package/cjs/json/monaco.nls.json.cjs +0 -15920
  97. package/cjs/json/monaco.theme.github-light.json.cjs +0 -349
  98. package/cjs/modules.d.cjs +0 -2
  99. package/cjs/plugin-app-config.cjs +0 -2
  100. package/cjs/plugin-conventional-config.cjs +0 -12
  101. package/cjs/plugin-eslint.cjs +0 -2
  102. package/cjs/plugin-html.cjs +0 -17
  103. package/cjs/plugin-icons.cjs +0 -2
  104. package/cjs/plugin-initialization.cjs +0 -135
  105. package/cjs/plugin-injection.cjs +0 -3
  106. package/cjs/plugin-inspect.cjs +0 -2
  107. package/cjs/plugin-monaco-nls.cjs +0 -80
  108. package/cjs/plugin-react-swc.cjs +0 -2
  109. package/cjs/plugin-router.cjs +0 -11
  110. package/cjs/plugin-stylelint.cjs +0 -2
  111. package/cjs/plugin-svgr.cjs +0 -2
  112. package/cjs/plugin-tailwind.cjs +0 -2
  113. package/cjs/plugin-tailwindcss.cjs +0 -3
  114. package/cjs/plugin-tsconfig-paths.cjs +0 -2
  115. package/cjs/plugin-visualizer.cjs +0 -2
  116. package/cjs/plugin-webfont.cjs +0 -2
  117. package/cjs/stylelint-config.cjs +0 -2
  118. package/cjs/tailwind-config.cjs +0 -2
  119. package/cjs/types.cjs +0 -2
  120. package/esm/cli.js +0 -5
  121. package/esm/commitlint-config.js +0 -2
  122. package/esm/config.js +0 -2
  123. package/esm/constants.js +0 -2
  124. package/esm/eslint-config.js +0 -2
  125. package/esm/index.js +0 -2
  126. package/esm/json/monaco.nls.json.js +0 -15920
  127. package/esm/json/monaco.theme.github-light.json.js +0 -349
  128. package/esm/modules.d.js +0 -2
  129. package/esm/plugin-app-config.js +0 -2
  130. package/esm/plugin-conventional-config.js +0 -12
  131. package/esm/plugin-eslint.js +0 -2
  132. package/esm/plugin-html.js +0 -17
  133. package/esm/plugin-icons.js +0 -2
  134. package/esm/plugin-initialization.js +0 -135
  135. package/esm/plugin-injection.js +0 -3
  136. package/esm/plugin-inspect.js +0 -2
  137. package/esm/plugin-monaco-nls.js +0 -80
  138. package/esm/plugin-react-swc.js +0 -2
  139. package/esm/plugin-router.js +0 -11
  140. package/esm/plugin-stylelint.js +0 -2
  141. package/esm/plugin-svgr.js +0 -2
  142. package/esm/plugin-tailwind.js +0 -2
  143. package/esm/plugin-tailwindcss.js +0 -3
  144. package/esm/plugin-tsconfig-paths.js +0 -2
  145. package/esm/plugin-visualizer.js +0 -2
  146. package/esm/plugin-webfont.js +0 -2
  147. package/esm/stylelint-config.js +0 -2
  148. package/esm/tailwind-config.js +0 -2
  149. package/esm/types.js +0 -2
  150. package/template/.vscode/settings.json +0 -6
  151. package/template/_gitignore +0 -35
  152. package/template/_package.json +0 -43
  153. package/template/_tsconfig.json +0 -7
  154. package/template/commitlint.config.js +0 -3
  155. package/template/env/.env +0 -7
  156. package/template/env/.env.development +0 -0
  157. package/template/env/.env.production +0 -0
  158. package/template/env.d.ts +0 -1
  159. package/template/eslint.config.js +0 -3
  160. package/template/index.html +0 -0
  161. package/template/public/favicon.svg +0 -1
  162. package/template/src/main.ts +0 -145
  163. package/template/src/pages/__root.ts +0 -3
  164. package/template/src/pages/_common/access-denied.ts +0 -6
  165. package/template/src/pages/_common/login.ts +0 -8
  166. package/template/src/pages/_layout/index.tsx +0 -35
  167. package/template/src/pages/_layout/route.ts +0 -9
  168. package/template/src/pages/_layout/system/data-dictionary.tsx +0 -14
  169. package/template/src/pages/_layout/system/index.ts +0 -7
  170. package/template/src/pages/_layout/system/tenant.tsx +0 -14
  171. package/template/src/router/index.ts +0 -1
  172. package/template/style.css +0 -2
  173. package/template/stylelint.config.js +0 -3
  174. package/template/tailwind.config.js +0 -3
  175. package/template/tsconfig.app.json +0 -4
  176. package/template/tsconfig.build.json +0 -4
  177. package/template/vef.config.ts +0 -7
  178. package/tsconfig.build.json +0 -26
  179. package/types/cli.d.ts +0 -1
  180. package/types/commitlint-config.d.ts +0 -7
  181. package/types/config.d.ts +0 -38
  182. package/types/eslint-config.d.ts +0 -7
  183. package/types/index.d.ts +0 -5
  184. package/types/plugin-eslint.d.ts +0 -6
  185. package/types/plugin-icons.d.ts +0 -7
  186. package/types/plugin-initialization.d.ts +0 -7
  187. package/types/plugin-monaco-nls.d.ts +0 -15
  188. package/types/plugin-react-swc.d.ts +0 -6
  189. package/types/plugin-stylelint.d.ts +0 -6
  190. package/types/plugin-svgr.d.ts +0 -6
  191. package/types/plugin-tailwind.d.ts +0 -7
  192. package/types/plugin-tailwindcss.d.ts +0 -7
  193. package/types/plugin-visualizer.d.ts +0 -7
  194. package/types/plugin-webfont.d.ts +0 -6
  195. package/types/stylelint-config.d.ts +0 -7
  196. package/types/tailwind-config.d.ts +0 -7
  197. package/types/types.d.ts +0 -15
@@ -0,0 +1,958 @@
1
+ /*! @vef-framework/dev v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.561Z */
2
+ import comments from '@eslint-community/eslint-plugin-eslint-comments/configs';
3
+ import react from '@eslint-react/eslint-plugin';
4
+ import eslint from '@eslint/js';
5
+ import stylistic from '@stylistic/eslint-plugin';
6
+ import query from '@tanstack/eslint-plugin-query';
7
+ import router from '@tanstack/eslint-plugin-router';
8
+ import gitignore from 'eslint-config-flat-gitignore';
9
+ import antfu from 'eslint-plugin-antfu';
10
+ import * as format from 'eslint-plugin-format';
11
+ import importLite from 'eslint-plugin-import-lite';
12
+ import perfectionist from 'eslint-plugin-perfectionist';
13
+ import reactHooks from 'eslint-plugin-react-hooks';
14
+ import reactRefresh from 'eslint-plugin-react-refresh';
15
+ import regex from 'eslint-plugin-regexp';
16
+ import unicorn from 'eslint-plugin-unicorn';
17
+ import unusedImports from 'eslint-plugin-unused-imports';
18
+ import { defineConfig } from 'eslint/config';
19
+ import tslint from 'typescript-eslint';
20
+
21
+ const prettierOptions = {
22
+ singleQuote: false,
23
+ semi: true,
24
+ tabWidth: 2,
25
+ useTabs: false,
26
+ trailingComma: "none",
27
+ endOfLine: "lf",
28
+ printWidth: 120,
29
+ proseWrap: "never",
30
+ arrowParens: "avoid",
31
+ htmlWhitespaceSensitivity: "strict",
32
+ bracketSameLine: false,
33
+ bracketSpacing: true,
34
+ objectWrap: "preserve",
35
+ quoteProps: "as-needed",
36
+ jsxSingleQuote: false,
37
+ singleAttributePerLine: false
38
+ };
39
+ function defineEslintConfig(...args) {
40
+ const config = defineConfig(
41
+ gitignore({
42
+ root: true,
43
+ strict: true
44
+ }),
45
+ {
46
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"],
47
+ ignores: ["**/router.gen.ts"],
48
+ extends: [
49
+ eslint.configs.recommended,
50
+ tslint.configs.strict,
51
+ tslint.configs.stylistic,
52
+ react.configs["recommended-typescript"],
53
+ reactHooks.configs.flat.recommended,
54
+ reactRefresh.configs.vite,
55
+ importLite.configs.recommended,
56
+ unicorn.configs.recommended,
57
+ comments.recommended,
58
+ regex.configs["flat/recommended"],
59
+ stylistic.configs.customize({
60
+ indent: 2,
61
+ jsx: true,
62
+ quotes: "double",
63
+ semi: true,
64
+ braceStyle: "1tbs",
65
+ blockSpacing: true,
66
+ quoteProps: "as-needed",
67
+ commaDangle: "never",
68
+ severity: "error"
69
+ }),
70
+ query.configs["flat/recommended"],
71
+ router.configs["flat/recommended"]
72
+ ],
73
+ plugins: {
74
+ antfu,
75
+ "unused-imports": unusedImports,
76
+ perfectionist
77
+ },
78
+ rules: {
79
+ // ============================================================================
80
+ // JavaScript Lint Rules
81
+ // Core JavaScript rules for code quality and best practices
82
+ // ============================================================================
83
+ "prefer-object-spread": "error",
84
+ "func-style": [
85
+ "error",
86
+ "declaration",
87
+ {
88
+ allowArrowFunctions: true
89
+ }
90
+ ],
91
+ curly: ["error", "all"],
92
+ "no-useless-concat": "error",
93
+ "no-unused-vars": "off",
94
+ "no-eq-null": "error",
95
+ "no-extra-label": "error",
96
+ "no-invalid-this": "error",
97
+ "no-throw-literal": "error",
98
+ "arrow-body-style": [
99
+ "error",
100
+ "as-needed",
101
+ {
102
+ requireReturnForObjectLiteral: true
103
+ }
104
+ ],
105
+ "prefer-object-has-own": "error",
106
+ "prefer-numeric-literals": "error",
107
+ "prefer-named-capture-group": "error",
108
+ "prefer-destructuring": "error",
109
+ "object-shorthand": [
110
+ "error",
111
+ "always",
112
+ {
113
+ avoidQuotes: true,
114
+ ignoreConstructors: false
115
+ }
116
+ ],
117
+ "require-atomic-updates": "error",
118
+ "require-await": "error",
119
+ camelcase: [
120
+ "error",
121
+ {
122
+ properties: "always",
123
+ ignoreGlobals: true
124
+ }
125
+ ],
126
+ "no-promise-executor-return": [
127
+ "error",
128
+ {
129
+ allowVoid: true
130
+ }
131
+ ],
132
+ "array-callback-return": [
133
+ "error",
134
+ {
135
+ allowImplicit: true
136
+ }
137
+ ],
138
+ "accessor-pairs": [
139
+ "error",
140
+ {
141
+ enforceForClassMembers: true,
142
+ setWithoutGet: true
143
+ }
144
+ ],
145
+ "block-scoped-var": "error",
146
+ "default-case-last": "error",
147
+ "dot-notation": [
148
+ "error",
149
+ {
150
+ allowKeywords: true
151
+ }
152
+ ],
153
+ eqeqeq: ["error", "smart"],
154
+ "new-cap": [
155
+ "error",
156
+ {
157
+ capIsNew: false,
158
+ newIsCap: true,
159
+ properties: true
160
+ }
161
+ ],
162
+ "no-alert": "error",
163
+ "no-caller": "error",
164
+ "no-cond-assign": ["error", "always"],
165
+ "no-empty": [
166
+ "error",
167
+ {
168
+ allowEmptyCatch: true
169
+ }
170
+ ],
171
+ "no-eval": "error",
172
+ "no-extend-native": "error",
173
+ "no-extra-bind": "error",
174
+ "no-implied-eval": "error",
175
+ "no-iterator": "error",
176
+ "no-labels": [
177
+ "error",
178
+ {
179
+ allowLoop: false,
180
+ allowSwitch: false
181
+ }
182
+ ],
183
+ "no-lone-blocks": "error",
184
+ "no-multi-str": "error",
185
+ "no-new": "error",
186
+ "no-new-func": "error",
187
+ "no-new-wrappers": "error",
188
+ "no-obj-calls": "error",
189
+ "no-octal-escape": "error",
190
+ "no-proto": "error",
191
+ "no-restricted-globals": [
192
+ "error",
193
+ {
194
+ message: "Use `globalThis` instead.",
195
+ name: "global"
196
+ },
197
+ {
198
+ message: "Use `globalThis` instead.",
199
+ name: "self"
200
+ }
201
+ ],
202
+ "no-restricted-properties": [
203
+ "error",
204
+ {
205
+ message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
206
+ property: "__proto__"
207
+ },
208
+ {
209
+ message: "Use `Object.defineProperty` instead.",
210
+ property: "__defineGetter__"
211
+ },
212
+ {
213
+ message: "Use `Object.defineProperty` instead.",
214
+ property: "__defineSetter__"
215
+ },
216
+ {
217
+ message: "Use `Object.getOwnPropertyDescriptor` instead.",
218
+ property: "__lookupGetter__"
219
+ },
220
+ {
221
+ message: "Use `Object.getOwnPropertyDescriptor` instead.",
222
+ property: "__lookupSetter__"
223
+ }
224
+ ],
225
+ "no-restricted-syntax": [
226
+ "error",
227
+ "TSEnumDeclaration[const=true]",
228
+ "TSExportAssignment"
229
+ ],
230
+ "no-self-compare": "error",
231
+ "no-sequences": "error",
232
+ "no-template-curly-in-string": "error",
233
+ "no-undef-init": "error",
234
+ "no-unmodified-loop-condition": "error",
235
+ "no-unneeded-ternary": [
236
+ "error",
237
+ {
238
+ defaultAssignment: false
239
+ }
240
+ ],
241
+ "no-unreachable": "error",
242
+ "no-unreachable-loop": "error",
243
+ "no-useless-call": "error",
244
+ "no-useless-computed-key": "error",
245
+ "no-useless-rename": "error",
246
+ "no-useless-return": "error",
247
+ "one-var": [
248
+ "error",
249
+ {
250
+ initialized: "never"
251
+ }
252
+ ],
253
+ "prefer-arrow-callback": [
254
+ "error",
255
+ {
256
+ allowNamedFunctions: false,
257
+ allowUnboundThis: true
258
+ }
259
+ ],
260
+ "prefer-const": [
261
+ "error",
262
+ {
263
+ destructuring: "all",
264
+ ignoreReadBeforeAssign: true
265
+ }
266
+ ],
267
+ "prefer-exponentiation-operator": "error",
268
+ "prefer-promise-reject-errors": "error",
269
+ "prefer-regex-literals": [
270
+ "error",
271
+ {
272
+ disallowRedundantWrapping: true
273
+ }
274
+ ],
275
+ "prefer-template": "error",
276
+ "symbol-description": "error",
277
+ "unicode-bom": ["error", "never"],
278
+ "use-isnan": [
279
+ "error",
280
+ {
281
+ enforceForIndexOf: true,
282
+ enforceForSwitchCase: true
283
+ }
284
+ ],
285
+ "valid-typeof": [
286
+ "error",
287
+ { requireStringLiterals: true }
288
+ ],
289
+ yoda: ["error", "never"],
290
+ // ============================================================================
291
+ // TypeScript Lint Rules
292
+ // TypeScript-specific rules for type safety and best practices
293
+ // ============================================================================
294
+ "@typescript-eslint/no-unused-expressions": [
295
+ "error",
296
+ {
297
+ enforceForJSX: true
298
+ }
299
+ ],
300
+ // "@typescript-eslint/no-unused-vars": [
301
+ // "error",
302
+ // {
303
+ // args: "all",
304
+ // argsIgnorePattern: "^_",
305
+ // caughtErrors: "all",
306
+ // caughtErrorsIgnorePattern: "^_",
307
+ // destructuredArrayIgnorePattern: "^_",
308
+ // varsIgnorePattern: "^_",
309
+ // ignoreRestSiblings: true
310
+ // }
311
+ // ],
312
+ "@typescript-eslint/no-unused-vars": "off",
313
+ "@typescript-eslint/array-type": [
314
+ "error",
315
+ {
316
+ default: "array-simple",
317
+ readonly: "array-simple"
318
+ }
319
+ ],
320
+ "@typescript-eslint/consistent-type-assertions": [
321
+ "error",
322
+ {
323
+ assertionStyle: "as",
324
+ objectLiteralTypeAssertions: "allow"
325
+ }
326
+ ],
327
+ "@typescript-eslint/consistent-type-definitions": [
328
+ "error",
329
+ "interface"
330
+ ],
331
+ "@typescript-eslint/max-params": [
332
+ "error",
333
+ {
334
+ max: 5
335
+ }
336
+ ],
337
+ "@typescript-eslint/no-unsafe-function-type": "off",
338
+ "@typescript-eslint/method-signature-style": ["error", "property"],
339
+ "@typescript-eslint/no-dynamic-delete": "off",
340
+ "@typescript-eslint/no-empty-object-type": [
341
+ "error",
342
+ {
343
+ allowInterfaces: "always"
344
+ }
345
+ ],
346
+ "@typescript-eslint/no-explicit-any": "off",
347
+ "@typescript-eslint/no-import-type-side-effects": "error",
348
+ "@typescript-eslint/no-non-null-assertion": "off",
349
+ "@typescript-eslint/no-this-alias": "off",
350
+ "@typescript-eslint/no-unsafe-assignment": "off",
351
+ "@typescript-eslint/no-unsafe-call": "off",
352
+ "@typescript-eslint/no-unsafe-member-access": "off",
353
+ "@typescript-eslint/no-unsafe-return": "off",
354
+ // "@typescript-eslint/explicit-function-return-type": [
355
+ // "error",
356
+ // {
357
+ // allowExpressions: true,
358
+ // allowDirectConstAssertionInArrowFunctions: true,
359
+ // allowTypedFunctionExpressions: true,
360
+ // allowHigherOrderFunctions: true,
361
+ // allowFunctionsWithoutTypeParameters: true,
362
+ // allowIIFEs: true
363
+ // }
364
+ // ],
365
+ "@typescript-eslint/no-invalid-void-type": "off",
366
+ // ============================================================================
367
+ // Import Lite Rules
368
+ // Rules for managing imports and module organization
369
+ // ============================================================================
370
+ "import-lite/consistent-type-specifier-style": ["error", "top-level"],
371
+ "import-lite/first": "error",
372
+ "import-lite/no-duplicates": "error",
373
+ "import-lite/no-mutable-exports": "error",
374
+ "import-lite/no-named-default": "error",
375
+ "import-lite/newline-after-import": [
376
+ "error",
377
+ {
378
+ count: 1
379
+ }
380
+ ],
381
+ // ============================================================================
382
+ // Unicorn Rules
383
+ // Modern JavaScript best practices and code quality improvements
384
+ // ============================================================================
385
+ "unicorn/consistent-empty-array-spread": "error",
386
+ "unicorn/error-message": "error",
387
+ "unicorn/escape-case": "error",
388
+ "unicorn/import-style": [
389
+ "error",
390
+ {
391
+ extendDefaultStyles: false,
392
+ checkDynamicImport: false
393
+ }
394
+ ],
395
+ "unicorn/new-for-builtins": "error",
396
+ "unicorn/no-array-reduce": "off",
397
+ "unicorn/no-instanceof-builtins": "error",
398
+ "unicorn/no-new-array": "error",
399
+ "unicorn/no-new-buffer": "error",
400
+ "unicorn/no-null": "off",
401
+ "unicorn/number-literal-case": "error",
402
+ "unicorn/prefer-dom-node-text-content": "error",
403
+ "unicorn/prefer-includes": "error",
404
+ "unicorn/prefer-node-protocol": "error",
405
+ "unicorn/prefer-number-properties": "error",
406
+ "unicorn/prefer-string-starts-ends-with": "error",
407
+ "unicorn/prefer-type-error": "error",
408
+ "unicorn/throw-new-error": "error",
409
+ "unicorn/filename-case": [
410
+ "error",
411
+ {
412
+ case: "kebabCase",
413
+ ignore: ["README.md", "AGENTS.md", "CLAUDE.md"]
414
+ }
415
+ ],
416
+ "unicorn/prefer-date-now": "error",
417
+ "unicorn/prefer-event-target": "off",
418
+ "unicorn/prefer-string-trim-start-end": "error",
419
+ "unicorn/prefer-string-raw": "error",
420
+ "unicorn/prefer-object-from-entries": "error",
421
+ "unicorn/prefer-default-parameters": "error",
422
+ "unicorn/prefer-array-find": "error",
423
+ "unicorn/prefer-array-flat": "error",
424
+ "unicorn/prefer-array-flat-map": "error",
425
+ "unicorn/prefer-array-index-of": "error",
426
+ "unicorn/prefer-array-some": "error",
427
+ "unicorn/prefer-logical-operator-over-ternary": "error",
428
+ "unicorn/prefer-single-call": "error",
429
+ "unicorn/require-module-specifiers": "off",
430
+ "unicorn/no-empty-file": "error",
431
+ "unicorn/no-array-for-each": "error",
432
+ "unicorn/no-for-loop": "error",
433
+ "unicorn/no-unnecessary-await": "error",
434
+ "unicorn/no-unnecessary-polyfills": "error",
435
+ "unicorn/no-useless-undefined": "error",
436
+ "unicorn/no-useless-switch-case": "error",
437
+ "unicorn/no-useless-spread": "error",
438
+ "unicorn/no-console-spaces": "error",
439
+ "unicorn/no-unused-properties": "error",
440
+ "unicorn/no-useless-promise-resolve-reject": "error",
441
+ "unicorn/no-nested-ternary": "off",
442
+ "unicorn/prevent-abbreviations": "off",
443
+ "unicorn/text-encoding-identifier-case": [
444
+ "error",
445
+ {
446
+ withDash: true
447
+ }
448
+ ],
449
+ // ============================================================================
450
+ // React Rules
451
+ // React-specific rules for component best practices
452
+ // ============================================================================
453
+ "@eslint-react/jsx-key-before-spread": "error",
454
+ "@eslint-react/jsx-no-duplicate-props": "error",
455
+ "@eslint-react/jsx-uses-vars": "error",
456
+ "@eslint-react/jsx-no-comment-textnodes": "error",
457
+ "@eslint-react/jsx-shorthand-boolean": "error",
458
+ "@eslint-react/jsx-no-iife": "error",
459
+ "@eslint-react/no-access-state-in-setstate": "error",
460
+ "@eslint-react/no-array-index-key": "error",
461
+ "@eslint-react/no-component-will-mount": "error",
462
+ "@eslint-react/no-component-will-receive-props": "error",
463
+ "@eslint-react/no-component-will-update": "error",
464
+ "@eslint-react/no-context-provider": "error",
465
+ "@eslint-react/no-create-ref": "error",
466
+ "@eslint-react/no-default-props": "error",
467
+ "@eslint-react/no-direct-mutation-state": "error",
468
+ "@eslint-react/no-duplicate-key": "error",
469
+ "@eslint-react/no-forward-ref": "error",
470
+ "@eslint-react/no-useless-forward-ref": "error",
471
+ "@eslint-react/no-implicit-key": "error",
472
+ "@eslint-react/no-missing-key": "error",
473
+ "@eslint-react/no-nested-component-definitions": "error",
474
+ "@eslint-react/no-prop-types": "error",
475
+ "@eslint-react/no-redundant-should-component-update": "error",
476
+ "@eslint-react/no-set-state-in-component-did-mount": "error",
477
+ "@eslint-react/no-set-state-in-component-did-update": "error",
478
+ "@eslint-react/no-set-state-in-component-will-update": "error",
479
+ "@eslint-react/no-string-refs": "error",
480
+ "@eslint-react/no-unsafe-component-will-mount": "error",
481
+ "@eslint-react/no-unsafe-component-will-receive-props": "error",
482
+ "@eslint-react/no-unsafe-component-will-update": "error",
483
+ "@eslint-react/no-unstable-context-value": "error",
484
+ "@eslint-react/no-unstable-default-props": "error",
485
+ "@eslint-react/no-unused-class-component-members": "error",
486
+ "@eslint-react/no-unused-state": "error",
487
+ "@eslint-react/no-use-context": "error",
488
+ "@eslint-react/no-clone-element": "off",
489
+ "@eslint-react/no-children-map": "off",
490
+ "@eslint-react/no-children-to-array": "off",
491
+ "@eslint-react/no-children-for-each": "off",
492
+ "@eslint-react/no-class-component": "error",
493
+ "@eslint-react/no-unnecessary-use-prefix": "error",
494
+ "@eslint-react/prefer-use-state-lazy-initialization": "error",
495
+ "@eslint-react/no-unnecessary-use-memo": "error",
496
+ "@eslint-react/no-unnecessary-use-callback": "error",
497
+ "@eslint-react/no-unnecessary-key": "error",
498
+ "@eslint-react/dom/no-dangerously-set-innerhtml": "error",
499
+ "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
500
+ "@eslint-react/dom/no-find-dom-node": "error",
501
+ "@eslint-react/dom/no-flush-sync": "error",
502
+ "@eslint-react/dom/no-hydrate": "error",
503
+ "@eslint-react/dom/no-namespace": "error",
504
+ "@eslint-react/dom/no-missing-button-type": "error",
505
+ "@eslint-react/dom/no-missing-iframe-sandbox": "error",
506
+ "@eslint-react/dom/no-render": "error",
507
+ "@eslint-react/dom/no-render-return-value": "error",
508
+ "@eslint-react/dom/no-script-url": "error",
509
+ "@eslint-react/dom/no-unsafe-iframe-sandbox": "error",
510
+ "@eslint-react/dom/no-unsafe-target-blank": "error",
511
+ "@eslint-react/dom/no-use-form-state": "error",
512
+ "@eslint-react/dom/no-void-elements-with-children": "error",
513
+ "@eslint-react/dom/no-string-style-prop": "error",
514
+ "@eslint-react/dom/no-unknown-property": [
515
+ "error",
516
+ {
517
+ ignore: ["css"]
518
+ }
519
+ ],
520
+ "@eslint-react/web-api/no-leaked-event-listener": "error",
521
+ "@eslint-react/web-api/no-leaked-interval": "error",
522
+ "@eslint-react/web-api/no-leaked-resize-observer": "error",
523
+ "@eslint-react/web-api/no-leaked-timeout": "error",
524
+ "@eslint-react/naming-convention/component-name": ["error", "PascalCase"],
525
+ "@eslint-react/naming-convention/filename-extension": [
526
+ "error",
527
+ {
528
+ allow: "as-needed",
529
+ extensions: [".tsx"]
530
+ }
531
+ ],
532
+ "@eslint-react/naming-convention/context-name": "error",
533
+ "@eslint-react/naming-convention/use-state": "off",
534
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "off",
535
+ // ============================================================================
536
+ // React Hooks Rules
537
+ // Rules for proper React Hooks usage and dependencies
538
+ // ============================================================================
539
+ "react-hooks/exhaustive-deps": [
540
+ "error",
541
+ {
542
+ additionalHooks: "^use(Deep|Shallow|Isomorphic)|^useDidUpdate"
543
+ }
544
+ ],
545
+ // ============================================================================
546
+ // Antfu Rules
547
+ // Additional code style and quality rules
548
+ // ============================================================================
549
+ "antfu/consistent-chaining": "error",
550
+ "antfu/consistent-list-newline": "error",
551
+ "antfu/curly": "error",
552
+ "antfu/if-newline": "error",
553
+ "antfu/top-level-function": "error",
554
+ "antfu/indent-unindent": "error",
555
+ // ============================================================================
556
+ // Unused Imports Rules
557
+ // Rules for cleaning up unused imports and variables
558
+ // ============================================================================
559
+ "unused-imports/no-unused-imports": "error",
560
+ "unused-imports/no-unused-vars": [
561
+ "error",
562
+ {
563
+ vars: "all",
564
+ varsIgnorePattern: "^_",
565
+ args: "after-used",
566
+ argsIgnorePattern: "^_"
567
+ }
568
+ ],
569
+ // ============================================================================
570
+ // Perfectionist Rules
571
+ // Rules for sorting and organizing code elements
572
+ // ============================================================================
573
+ "perfectionist/sort-exports": [
574
+ "error",
575
+ {
576
+ order: "asc",
577
+ type: "natural"
578
+ }
579
+ ],
580
+ "perfectionist/sort-imports": [
581
+ "error",
582
+ {
583
+ groups: [
584
+ "type",
585
+ ["parent-type", "sibling-type", "index-type", "internal-type"],
586
+ "builtin",
587
+ "external",
588
+ "internal",
589
+ ["parent", "sibling", "index"],
590
+ "side-effect",
591
+ "object",
592
+ "unknown"
593
+ ],
594
+ newlinesBetween: 1,
595
+ order: "asc",
596
+ type: "natural"
597
+ }
598
+ ],
599
+ "perfectionist/sort-named-exports": [
600
+ "error",
601
+ {
602
+ order: "asc",
603
+ type: "natural",
604
+ groups: [
605
+ "value-export",
606
+ "type-export"
607
+ ],
608
+ newlinesBetween: "ignore"
609
+ }
610
+ ],
611
+ "perfectionist/sort-named-imports": [
612
+ "error",
613
+ {
614
+ order: "asc",
615
+ type: "natural",
616
+ groups: [
617
+ "value-import",
618
+ "type-import"
619
+ ],
620
+ newlinesBetween: "ignore"
621
+ }
622
+ ],
623
+ // ============================================================================
624
+ // Stylistic Rules
625
+ // Code formatting and style consistency rules
626
+ // ============================================================================
627
+ "@stylistic/arrow-parens": ["error", "as-needed"],
628
+ "@stylistic/line-comment-position": [
629
+ "error",
630
+ {
631
+ position: "above"
632
+ }
633
+ ],
634
+ "@stylistic/jsx-self-closing-comp": [
635
+ "error",
636
+ {
637
+ component: true,
638
+ html: true
639
+ }
640
+ ],
641
+ "@stylistic/jsx-newline": [
642
+ "error",
643
+ {
644
+ prevent: true,
645
+ allowMultilines: true
646
+ }
647
+ ],
648
+ "@stylistic/curly-newline": [
649
+ "error",
650
+ {
651
+ consistent: true
652
+ }
653
+ ],
654
+ "@stylistic/jsx-sort-props": [
655
+ "error",
656
+ {
657
+ callbacksLast: true,
658
+ shorthandFirst: true,
659
+ shorthandLast: false,
660
+ multiline: "last",
661
+ ignoreCase: true,
662
+ noSortAlphabetically: false,
663
+ reservedFirst: ["key", "ref"]
664
+ }
665
+ ],
666
+ "@stylistic/jsx-max-props-per-line": [
667
+ "error",
668
+ {
669
+ maximum: {
670
+ single: 5,
671
+ multi: 1
672
+ }
673
+ }
674
+ ],
675
+ "@stylistic/newline-per-chained-call": [
676
+ "error",
677
+ {
678
+ ignoreChainWithDepth: 6
679
+ }
680
+ ],
681
+ "@stylistic/object-curly-newline": [
682
+ "error",
683
+ {
684
+ ObjectExpression: {
685
+ multiline: true,
686
+ consistent: true,
687
+ minProperties: 3
688
+ },
689
+ ObjectPattern: {
690
+ multiline: true,
691
+ consistent: true,
692
+ minProperties: 3
693
+ },
694
+ ImportDeclaration: {
695
+ consistent: true,
696
+ multiline: true
697
+ },
698
+ ExportDeclaration: {
699
+ consistent: true,
700
+ multiline: true
701
+ }
702
+ }
703
+ ],
704
+ "@stylistic/object-property-newline": [
705
+ "error",
706
+ {
707
+ allowAllPropertiesOnSameLine: true
708
+ }
709
+ ],
710
+ "@stylistic/multiline-comment-style": [
711
+ "error",
712
+ "separate-lines",
713
+ {
714
+ checkJSDoc: false
715
+ }
716
+ ],
717
+ "@stylistic/implicit-arrow-linebreak": [
718
+ "error",
719
+ "beside"
720
+ ],
721
+ "@stylistic/no-extra-semi": "error",
722
+ "@stylistic/array-element-newline": [
723
+ "error",
724
+ "consistent"
725
+ ],
726
+ "@stylistic/array-bracket-newline": [
727
+ "error",
728
+ {
729
+ multiline: true
730
+ }
731
+ ],
732
+ "@stylistic/function-paren-newline": ["error", "multiline-arguments"],
733
+ "@stylistic/padding-line-between-statements": [
734
+ "error",
735
+ {
736
+ blankLine: "always",
737
+ prev: "*",
738
+ next: [
739
+ "block",
740
+ "multiline-block-like",
741
+ "type",
742
+ "interface",
743
+ "enum",
744
+ "function",
745
+ "function-overload"
746
+ ]
747
+ },
748
+ {
749
+ blankLine: "always",
750
+ prev: [
751
+ "block",
752
+ "multiline-block-like",
753
+ "type",
754
+ "interface",
755
+ "enum",
756
+ "function",
757
+ "function-overload"
758
+ ],
759
+ next: "*"
760
+ }
761
+ ],
762
+ "@stylistic/jsx-pascal-case": [
763
+ "error",
764
+ {
765
+ allowAllCaps: false,
766
+ allowLeadingUnderscore: false,
767
+ allowNamespace: false,
768
+ ignore: []
769
+ }
770
+ ],
771
+ "@stylistic/switch-colon-spacing": [
772
+ "error",
773
+ {
774
+ before: false,
775
+ after: true
776
+ }
777
+ ],
778
+ "@stylistic/no-extra-parens": [
779
+ "error",
780
+ "all",
781
+ {
782
+ nestedBinaryExpressions: false,
783
+ ternaryOperandBinaryExpressions: false,
784
+ ignoreJSX: "multi-line"
785
+ }
786
+ ],
787
+ "@stylistic/no-multiple-empty-lines": [
788
+ "error",
789
+ {
790
+ max: 1,
791
+ maxBOF: 0,
792
+ maxEOF: 0
793
+ }
794
+ ],
795
+ "@stylistic/generator-star-spacing": [
796
+ "error",
797
+ {
798
+ after: true,
799
+ before: false
800
+ }
801
+ ],
802
+ "@stylistic/yield-star-spacing": [
803
+ "error",
804
+ {
805
+ after: true,
806
+ before: false
807
+ }
808
+ ],
809
+ "@stylistic/max-statements-per-line": [
810
+ "error",
811
+ {
812
+ max: 1
813
+ }
814
+ ],
815
+ // ============================================================================
816
+ // ESLint Comments Rules
817
+ // Rules for managing eslint-disable comments
818
+ // ============================================================================
819
+ "@eslint-community/eslint-comments/no-unlimited-disable": "off",
820
+ "@eslint-community/eslint-comments/disable-enable-pair": "off"
821
+ }
822
+ },
823
+ {
824
+ files: ["**/*.css"],
825
+ languageOptions: {
826
+ parser: format.parserPlain
827
+ },
828
+ plugins: {
829
+ format
830
+ },
831
+ rules: {
832
+ "format/prettier": [
833
+ "error",
834
+ {
835
+ ...prettierOptions,
836
+ parser: "css"
837
+ }
838
+ ]
839
+ }
840
+ },
841
+ {
842
+ files: ["**/*.scss"],
843
+ languageOptions: {
844
+ parser: format.parserPlain
845
+ },
846
+ plugins: {
847
+ format
848
+ },
849
+ rules: {
850
+ "format/prettier": [
851
+ "error",
852
+ {
853
+ ...prettierOptions,
854
+ parser: "scss"
855
+ }
856
+ ]
857
+ }
858
+ },
859
+ {
860
+ files: ["**/*.html"],
861
+ languageOptions: {
862
+ parser: format.parserPlain
863
+ },
864
+ plugins: {
865
+ format
866
+ },
867
+ rules: {
868
+ "format/prettier": [
869
+ "error",
870
+ {
871
+ ...prettierOptions,
872
+ parser: "html"
873
+ }
874
+ ]
875
+ }
876
+ },
877
+ {
878
+ files: ["**/*.json"],
879
+ languageOptions: {
880
+ parser: format.parserPlain
881
+ },
882
+ plugins: {
883
+ format
884
+ },
885
+ rules: {
886
+ "format/prettier": [
887
+ "error",
888
+ {
889
+ ...prettierOptions,
890
+ parser: "json"
891
+ }
892
+ ]
893
+ }
894
+ },
895
+ {
896
+ files: ["**/*.jsonc"],
897
+ languageOptions: {
898
+ parser: format.parserPlain
899
+ },
900
+ plugins: {
901
+ format
902
+ },
903
+ rules: {
904
+ "format/prettier": [
905
+ "error",
906
+ {
907
+ ...prettierOptions,
908
+ parser: "jsonc"
909
+ }
910
+ ]
911
+ }
912
+ },
913
+ {
914
+ files: ["**/*.md"],
915
+ languageOptions: {
916
+ parser: format.parserPlain
917
+ },
918
+ plugins: {
919
+ format
920
+ },
921
+ rules: {
922
+ "format/prettier": [
923
+ "error",
924
+ {
925
+ ...prettierOptions,
926
+ parser: "markdown",
927
+ embeddedLanguageFormatting: "off",
928
+ printWidth: 320
929
+ }
930
+ ]
931
+ }
932
+ },
933
+ {
934
+ files: ["**/*.mdx"],
935
+ languageOptions: {
936
+ parser: format.parserPlain
937
+ },
938
+ plugins: {
939
+ format
940
+ },
941
+ rules: {
942
+ "format/prettier": [
943
+ "error",
944
+ {
945
+ ...prettierOptions,
946
+ parser: "mdx",
947
+ embeddedLanguageFormatting: "off",
948
+ printWidth: 320
949
+ }
950
+ ]
951
+ }
952
+ },
953
+ ...args
954
+ );
955
+ return config;
956
+ }
957
+
958
+ export { defineEslintConfig };