@shibanet0/datamitsu-config 0.0.1-alpha-9 → 0.0.1-alpha-11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/bin/datamitsu.mjs +15 -8
  2. package/bin/tsc.mjs +8 -4
  3. package/bin/tsx.mjs +1 -1
  4. package/datamitsu.js +343 -101
  5. package/dist/array-func-M6KDQ7DN.js +14 -0
  6. package/dist/array-func-NPT6GB52.js +14 -0
  7. package/dist/chunk-7PGRJISO.js +24 -0
  8. package/dist/clean-package/index.js +12 -4
  9. package/dist/dist-SV6KNVWH.js +145 -0
  10. package/dist/eslint/globs.d.ts +16 -0
  11. package/dist/eslint/index.d.ts +1 -0
  12. package/dist/eslint/index.js +954 -55
  13. package/dist/eslint/plugins/array-func.d.ts +2 -0
  14. package/dist/eslint/plugins/arrayFunc.d.ts +2 -0
  15. package/dist/eslint/plugins/deMorgan.d.ts +2 -0
  16. package/dist/eslint/plugins/import.d.ts +2 -0
  17. package/dist/eslint/plugins/javascript.d.ts +2 -0
  18. package/dist/eslint/plugins/json-schema-validator.d.ts +2 -0
  19. package/dist/eslint/plugins/json.d.ts +2 -0
  20. package/dist/eslint/plugins/jsx-a11y.d.ts +2 -0
  21. package/dist/eslint/plugins/n.d.ts +4 -0
  22. package/dist/eslint/plugins/no-use-extend-native.d.ts +2 -0
  23. package/dist/eslint/plugins/perfectionist copy.d.ts +2 -0
  24. package/dist/eslint/plugins/perfectionist.d.ts +2 -2
  25. package/dist/eslint/plugins/playwright.d.ts +2 -0
  26. package/dist/eslint/plugins/prettier.d.ts +2 -0
  27. package/dist/eslint/plugins/promise.d.ts +2 -0
  28. package/dist/eslint/plugins/react copy.d.ts +2 -0
  29. package/dist/eslint/plugins/react-hooks.d.ts +2 -0
  30. package/dist/eslint/plugins/react-perf.d.ts +2 -0
  31. package/dist/eslint/plugins/react-prefer-function-component.d.ts +2 -0
  32. package/dist/eslint/plugins/react-refresh.d.ts +2 -0
  33. package/dist/eslint/plugins/react.d.ts +2 -0
  34. package/dist/eslint/plugins/security.d.ts +2 -0
  35. package/dist/eslint/plugins/sonarjs.d.ts +2 -0
  36. package/dist/eslint/plugins/storybook.d.ts +2 -0
  37. package/dist/eslint/plugins/toml.d.ts +2 -0
  38. package/dist/eslint/plugins/turbo.d.ts +2 -0
  39. package/dist/eslint/plugins/typescript.d.ts +2 -0
  40. package/dist/eslint/plugins/unicorn copy.d.ts +2 -0
  41. package/dist/eslint/plugins/unicorn.d.ts +2 -0
  42. package/dist/eslint/plugins/unused-imports.d.ts +2 -0
  43. package/dist/eslint/plugins/vanilla-extract.d.ts +2 -0
  44. package/dist/eslint/plugins/yml.d.ts +2 -0
  45. package/dist/eslint/types.d.ts +34 -0
  46. package/dist/globs/globs.d.ts +1 -0
  47. package/dist/json-LWTL4ZNK.js +18 -0
  48. package/dist/json-ZAIWY2QG.js +18 -0
  49. package/dist/jsx-a11y-DENBIOMT.js +7 -0
  50. package/dist/no-use-extend-native-WXT3EZT4.js +7 -0
  51. package/dist/no-use-extend-native-ZPCF5GPF.js +7 -0
  52. package/dist/oxlint/index.d.ts +2 -0
  53. package/dist/playwright-BGT6YZAD.js +15 -0
  54. package/dist/playwright-EQJ74ILC.js +15 -0
  55. package/dist/prettier/index.js +1 -1
  56. package/dist/prettier-STALF5K5.js +7 -0
  57. package/dist/prettier-VWVEU6BH.js +7 -0
  58. package/dist/promise-4UOFB7NK.js +7 -0
  59. package/dist/promise-GMCQOXN6.js +7 -0
  60. package/dist/react-QIEZHZI3.js +61 -0
  61. package/dist/react-SBV4CSZW.js +10 -0
  62. package/dist/react-hooks-KCD4FRWS.js +7 -0
  63. package/dist/react-hooks-R6UCTUUG.js +7 -0
  64. package/dist/react-perf-I32W4SW7.js +7 -0
  65. package/dist/react-prefer-function-component-ZCGU3TJA.js +7 -0
  66. package/dist/security-QVOYXU25.js +7 -0
  67. package/dist/sonarjs-L2LS4QXC.js +16 -0
  68. package/dist/storybook-HBDSOOCR.js +7 -0
  69. package/dist/storybook-IETULN4Z.js +8 -0
  70. package/dist/storybook-IFYU76LT.js +7 -0
  71. package/dist/toml-UYLTOG46.js +7 -0
  72. package/dist/toml-Y76F5J2F.js +7 -0
  73. package/dist/turbo-BF4PT2F4.js +7 -0
  74. package/dist/turbo-ZBSVFMOO.js +23 -0
  75. package/dist/unicorn-CIVFI3IM.js +17 -0
  76. package/dist/unused-imports-7PV5NHDW.js +25 -0
  77. package/dist/unused-imports-GCXR6T7K.js +31 -0
  78. package/dist/unused-imports-PHM72DI2.js +25 -0
  79. package/dist/vanilla-extract-52HEEDJV.js +11 -0
  80. package/oxlint_configuration_schema.json +712 -0
  81. package/package.json +12 -4
@@ -1,71 +1,970 @@
1
1
  // src/eslint/index.ts
2
- import eslint from "@eslint/js";
2
+ import { FlatConfigComposer } from "eslint-flat-config-utils";
3
+ import oxlint from "eslint-plugin-oxlint";
3
4
  import { defineConfig as eslintDefineConfig, globalIgnores } from "eslint/config";
4
- import tseslint from "typescript-eslint";
5
- var todoDisable = [
6
- {
7
- rules: {
8
- "@typescript-eslint/no-explicit-any": "off",
9
- "@typescript-eslint/no-unused-vars": "off",
10
- "no-undef": "off"
5
+
6
+ // package.json
7
+ var name = "@shibanet0/datamitsu-config";
8
+
9
+ // src/oxlint/index.ts
10
+ var disabledRules = {
11
+ "no-unsafe-optional-chaining": "off",
12
+ "no-unused-vars": "off",
13
+ "no-useless-rename": "off",
14
+ "typescript/triple-slash-reference": "off",
15
+ "unicorn/no-single-promise-in-promise-methods": "off"
16
+ };
17
+ var oxlintConfig = {
18
+ $schema: `./node_modules/${name}/oxlint_configuration_schema.json`,
19
+ categories: {},
20
+ env: {
21
+ builtin: true
22
+ },
23
+ globals: {},
24
+ ignorePatterns: [],
25
+ plugins: ["unicorn", "typescript", "oxc"],
26
+ rules: {
27
+ "constructor-super": "warn",
28
+ "for-direction": "warn",
29
+ "no-async-promise-executor": "warn",
30
+ "no-caller": "warn",
31
+ "no-class-assign": "warn",
32
+ "no-compare-neg-zero": "warn",
33
+ "no-cond-assign": "warn",
34
+ "no-const-assign": "warn",
35
+ "no-constant-binary-expression": "warn",
36
+ "no-constant-condition": "warn",
37
+ "no-control-regex": "warn",
38
+ "no-debugger": "warn",
39
+ "no-delete-var": "warn",
40
+ "no-dupe-class-members": "warn",
41
+ "no-dupe-else-if": "warn",
42
+ "no-dupe-keys": "warn",
43
+ "no-duplicate-case": "warn",
44
+ "no-empty-character-class": "warn",
45
+ "no-empty-pattern": "warn",
46
+ "no-empty-static-block": "warn",
47
+ "no-eval": "warn",
48
+ "no-ex-assign": "warn",
49
+ "no-extra-boolean-cast": "warn",
50
+ "no-func-assign": "warn",
51
+ "no-global-assign": "warn",
52
+ "no-import-assign": "warn",
53
+ "no-invalid-regexp": "warn",
54
+ "no-irregular-whitespace": "warn",
55
+ "no-loss-of-precision": "warn",
56
+ "no-new-native-nonconstructor": "warn",
57
+ "no-nonoctal-decimal-escape": "warn",
58
+ "no-obj-calls": "warn",
59
+ "no-self-assign": "warn",
60
+ "no-setter-return": "warn",
61
+ "no-shadow-restricted-names": "warn",
62
+ "no-sparse-arrays": "warn",
63
+ "no-this-before-super": "warn",
64
+ "no-unassigned-vars": "warn",
65
+ "no-unsafe-finally": "warn",
66
+ "no-unsafe-negation": "warn",
67
+ "no-unsafe-optional-chaining": "warn",
68
+ "no-unused-expressions": "warn",
69
+ "no-unused-labels": "warn",
70
+ "no-unused-private-class-members": "warn",
71
+ "no-unused-vars": "warn",
72
+ "no-useless-backreference": "warn",
73
+ "no-useless-catch": "warn",
74
+ "no-useless-escape": "warn",
75
+ "no-useless-rename": "warn",
76
+ "no-with": "warn",
77
+ "oxc/bad-array-method-on-arguments": "warn",
78
+ "oxc/bad-char-at-comparison": "warn",
79
+ "oxc/bad-comparison-sequence": "warn",
80
+ "oxc/bad-min-max-func": "warn",
81
+ "oxc/bad-object-literal-comparison": "warn",
82
+ "oxc/bad-replace-all-arg": "warn",
83
+ "oxc/const-comparisons": "warn",
84
+ "oxc/double-comparisons": "warn",
85
+ "oxc/erasing-op": "warn",
86
+ "oxc/missing-throw": "warn",
87
+ "oxc/number-arg-out-of-range": "warn",
88
+ "oxc/only-used-in-recursion": "warn",
89
+ "oxc/uninvoked-array-callback": "warn",
90
+ "require-yield": "warn",
91
+ "typescript/await-thenable": "warn",
92
+ "typescript/no-array-delete": "warn",
93
+ "typescript/no-base-to-string": "warn",
94
+ "typescript/no-duplicate-enum-values": "warn",
95
+ "typescript/no-duplicate-type-constituents": "warn",
96
+ "typescript/no-extra-non-null-assertion": "warn",
97
+ "typescript/no-floating-promises": "warn",
98
+ "typescript/no-for-in-array": "warn",
99
+ "typescript/no-implied-eval": "warn",
100
+ "typescript/no-meaningless-void-operator": "warn",
101
+ "typescript/no-misused-new": "warn",
102
+ "typescript/no-misused-spread": "warn",
103
+ "typescript/no-non-null-asserted-optional-chain": "warn",
104
+ "typescript/no-redundant-type-constituents": "warn",
105
+ "typescript/no-this-alias": "warn",
106
+ "typescript/no-unnecessary-parameter-property-assignment": "warn",
107
+ "typescript/no-unsafe-declaration-merging": "warn",
108
+ "typescript/no-unsafe-unary-minus": "warn",
109
+ "typescript/no-useless-empty-export": "warn",
110
+ "typescript/no-wrapper-object-types": "warn",
111
+ "typescript/prefer-as-const": "warn",
112
+ "typescript/require-array-sort-compare": "warn",
113
+ "typescript/restrict-template-expressions": "warn",
114
+ "typescript/unbound-method": "warn",
115
+ "unicorn/no-await-in-promise-methods": "warn",
116
+ "unicorn/no-empty-file": "warn",
117
+ "unicorn/no-invalid-fetch-options": "warn",
118
+ "unicorn/no-invalid-remove-event-listener": "warn",
119
+ "unicorn/no-new-array": "warn",
120
+ "unicorn/no-single-promise-in-promise-methods": "warn",
121
+ "unicorn/no-thenable": "warn",
122
+ "unicorn/no-unnecessary-await": "warn",
123
+ "unicorn/no-useless-fallback-in-spread": "warn",
124
+ "unicorn/no-useless-length-check": "warn",
125
+ "unicorn/no-useless-spread": "warn",
126
+ "unicorn/prefer-set-size": "warn",
127
+ "unicorn/prefer-string-starts-ends-with": "warn",
128
+ "use-isnan": "warn",
129
+ "valid-typeof": "warn",
130
+ ...disabledRules
131
+ },
132
+ settings: {
133
+ jsdoc: {
134
+ augmentsExtendsReplacesDocs: false,
135
+ exemptDestructuredRootsFromChecks: false,
136
+ ignoreInternal: false,
137
+ ignorePrivate: false,
138
+ ignoreReplacesDocs: true,
139
+ implementsReplacesDocs: false,
140
+ overrideReplacesDocs: true,
141
+ tagNamePreference: {}
142
+ },
143
+ "jsx-a11y": {
144
+ attributes: {},
145
+ components: {},
146
+ polymorphicPropName: null
147
+ },
148
+ next: {
149
+ rootDir: []
150
+ },
151
+ react: {
152
+ formComponents: [],
153
+ linkComponents: []
154
+ },
155
+ vitest: {
156
+ typecheck: false
11
157
  }
12
158
  }
159
+ };
160
+
161
+ // src/eslint/globs.ts
162
+ var GLOB_TS = "**/*.?([cm])ts";
163
+ var GLOB_TSX = "**/*.?([cm])tsx";
164
+ var GLOB_EXCLUDE = [
165
+ "**/node_modules",
166
+ "**/dist",
167
+ "**/package-lock.json",
168
+ "**/yarn.lock",
169
+ "**/pnpm-lock.yaml",
170
+ "**/bun.lockb",
171
+ "**/generated/**",
172
+ "**/output",
173
+ "**/coverage",
174
+ "**/temp",
175
+ "**/.temp",
176
+ "**/tmp",
177
+ "**/build",
178
+ "**/.tmp",
179
+ "**/.history",
180
+ "**/.vitepress/cache",
181
+ "**/.nuxt",
182
+ "**/.turbo/**",
183
+ "**/playwright-report-html/**",
184
+ "**/playwright-report-allure/**",
185
+ "**/playwright-report-*/**",
186
+ "**/.git/**",
187
+ "**/.next",
188
+ "**/out/**",
189
+ "**/storybook-static/**",
190
+ "**/.svelte-kit",
191
+ "**/.vercel",
192
+ "**/.changeset",
193
+ "**/.idea",
194
+ "**/.cache",
195
+ "**/.output",
196
+ "**/.vite-inspect",
197
+ "**/.yarn",
198
+ "**/vite.config.*.timestamp-*",
199
+ "**/CHANGELOG*.md",
200
+ "**/*.min.*",
201
+ "**/LICENSE*",
202
+ "**/__snapshots__",
203
+ "**/auto-import?(s).d.ts",
204
+ "**/components.d.ts"
13
205
  ];
14
- var defineConfig = async (config, options = {
15
- plugins: {
16
- compat: { disabled: true },
17
- perfectionist: { disabled: true },
18
- vitest: { disabled: true },
19
- yaml: { disabled: true }
20
- }
21
- }) => {
22
- const arguments_ = [
23
- globalIgnores(
24
- options?.globalIgnores || [
25
- "**/.next/**",
26
- "**/storybook-static/**",
27
- "**/.git/**",
28
- "**/.turbo/**",
29
- "**/out/**",
30
- "**/generated/**",
31
- "**/playwright-report-html/**",
32
- "**/playwright-report-allure/**",
33
- "**/dist",
34
- "**/build",
35
- "**/node_modules"
36
- ]
37
- ),
38
- eslint.configs.recommended,
39
- tseslint.configs.recommended,
40
- {
41
- rules: {
42
- "@typescript-eslint/consistent-type-imports": [
206
+
207
+ // src/eslint/plugins/arrayFunc.ts
208
+ async function arrayFunc() {
209
+ const plugin = await import("eslint-plugin-array-func");
210
+ return [
211
+ {
212
+ name: "shibanet0/array-func/rules",
213
+ plugins: {
214
+ "array-func": plugin.default
215
+ },
216
+ rules: {
217
+ ...plugin.default.configs.recommended.rules
218
+ }
219
+ },
220
+ {
221
+ rules: {
222
+ "array-func/from-map": "off",
223
+ "array-func/prefer-array-from": "off"
224
+ }
225
+ }
226
+ ];
227
+ }
228
+
229
+ // src/eslint/plugins/deMorgan.ts
230
+ async function deMorgan() {
231
+ const plugin = await import("eslint-plugin-de-morgan");
232
+ return [
233
+ {
234
+ name: "shibanet0/de-morgan/rules",
235
+ plugins: {
236
+ "de-morgan": plugin.default
237
+ },
238
+ rules: {
239
+ ...plugin.default.configs.recommended.rules
240
+ }
241
+ }
242
+ ];
243
+ }
244
+
245
+ // src/eslint/plugins/import.ts
246
+ async function pluginImport() {
247
+ const plugin = await import("eslint-plugin-import");
248
+ return [
249
+ {
250
+ name: "shibanet0/import/rules",
251
+ plugins: {
252
+ import: plugin.default
253
+ },
254
+ rules: {
255
+ ...plugin.flatConfigs.recommended.rules
256
+ }
257
+ },
258
+ {
259
+ rules: {
260
+ "import/default": "off",
261
+ "import/extensions": "off",
262
+ "import/named": "off",
263
+ "import/namespace": "off",
264
+ "import/no-extraneous-dependencies": "off",
265
+ "import/no-relative-packages": "off",
266
+ "import/no-unresolved": "off",
267
+ "import/order": "off",
268
+ "import/prefer-default-export": "off"
269
+ }
270
+ }
271
+ ];
272
+ }
273
+
274
+ // src/eslint/plugins/javascript.ts
275
+ var javascript = async () => {
276
+ const [plugin, globals] = await Promise.all([import("@eslint/js"), import("globals")]);
277
+ return [
278
+ { ...plugin.default.configs.recommended, name: "shibanet0/js" },
279
+ {
280
+ languageOptions: {
281
+ ecmaVersion: "latest",
282
+ globals: {
283
+ ...globals.browser,
284
+ ...globals.es2026,
285
+ ...globals.node,
286
+ document: "readonly",
287
+ navigator: "readonly",
288
+ window: "readonly"
289
+ },
290
+ parserOptions: {
291
+ ecmaFeatures: {
292
+ jsx: true
293
+ },
294
+ ecmaVersion: "latest",
295
+ sourceType: "module"
296
+ },
297
+ sourceType: "module"
298
+ },
299
+ linterOptions: {
300
+ reportUnusedDisableDirectives: false
301
+ },
302
+ name: "shibanet0/js/setup"
303
+ },
304
+ { rules: { "no-empty": "off", "no-restricted-imports": "off", "no-undef": "off" } }
305
+ ];
306
+ };
307
+
308
+ // src/eslint/plugins/jsx-a11y.ts
309
+ async function jsxA11y() {
310
+ const plugin = await import("eslint-plugin-jsx-a11y");
311
+ return [
312
+ {
313
+ name: "shibanet0/jsx-a11y/rules",
314
+ plugins: {
315
+ "jsx-a11y": plugin.default
316
+ },
317
+ rules: {
318
+ ...plugin.default.flatConfigs.recommended.rules
319
+ }
320
+ },
321
+ {
322
+ rules: {
323
+ "jsx-a11y/click-events-have-key-events": "off",
324
+ "jsx-a11y/interactive-supports-focus": "off",
325
+ "jsx-a11y/no-autofocus": "off",
326
+ "jsx-a11y/tabindex-no-positive": "off"
327
+ }
328
+ }
329
+ ];
330
+ }
331
+
332
+ // src/eslint/plugins/no-use-extend-native.ts
333
+ async function noUseExtendNative() {
334
+ const plugin = await import("eslint-plugin-no-use-extend-native");
335
+ return [
336
+ {
337
+ name: "shibanet0/no-use-extend-native/rules",
338
+ plugins: {
339
+ "no-use-extend-native": plugin.default
340
+ },
341
+ rules: {
342
+ ...plugin.default.configs.recommended.rules
343
+ }
344
+ }
345
+ ];
346
+ }
347
+
348
+ // src/eslint/plugins/perfectionist.ts
349
+ async function perfectionist() {
350
+ const plugin = await import("eslint-plugin-perfectionist");
351
+ return [
352
+ {
353
+ files: ["**/*.css.ts"],
354
+ name: "shibanet0/perfectionist/vanilla-extract/rules",
355
+ plugins: {
356
+ perfectionist: plugin.default
357
+ },
358
+ rules: {
359
+ "perfectionist/sort-objects": "off"
360
+ }
361
+ },
362
+ {
363
+ name: "shibanet0/perfectionist/rules",
364
+ plugins: {
365
+ perfectionist: plugin.default
366
+ },
367
+ rules: {
368
+ ...plugin.default.configs["recommended-natural"].rules,
369
+ "perfectionist/sort-imports": [
43
370
  "error",
44
371
  {
45
- disallowTypeAnnotations: true,
46
- fixStyle: "separate-type-imports",
47
- prefer: "type-imports"
372
+ customGroups: [
373
+ {
374
+ elementNamePattern: ["^i18next$", "^i18next-.+"],
375
+ groupName: "i18next"
376
+ },
377
+ {
378
+ elementNamePattern: [
379
+ "^react$",
380
+ "^react-.+",
381
+ "^@react-.+",
382
+ "^swr$",
383
+ "^next$",
384
+ "^next/.+",
385
+ "^next-.+",
386
+ "^@next-.+"
387
+ ],
388
+ groupName: "react"
389
+ },
390
+ {
391
+ elementNamePattern: ["^antd$", "^@ant-design.+"],
392
+ groupName: "antd"
393
+ },
394
+ {
395
+ elementNamePattern: ["^fastify$", "^@fastify.+", "^@sinclair/typebox$"],
396
+ groupName: "fastify"
397
+ }
398
+ // {
399
+ // elementNamePattern: [
400
+ // String.raw`.+\.avif$`,
401
+ // String.raw`.+\.webp$`,
402
+ // String.raw`.+\.svg$`,
403
+ // String.raw`.+\.png$`,
404
+ // String.raw`.+\.jpg$`,
405
+ // String.raw`.+\.jpeg$`,
406
+ // String.raw`.+\.gif$`,
407
+ // ],
408
+ // groupName: "media/images",
409
+ // },
410
+ ],
411
+ groups: [
412
+ "i18next",
413
+ "react",
414
+ "antd",
415
+ "fastify",
416
+ // "media/images",
417
+ "type-import",
418
+ ["value-builtin", "value-external"],
419
+ "type-internal",
420
+ "value-internal",
421
+ ["type-parent", "type-sibling", "type-index"],
422
+ ["value-parent", "value-sibling", "value-index"],
423
+ "ts-equals-import",
424
+ "unknown"
425
+ ],
426
+ order: "asc",
427
+ type: "alphabetical"
428
+ }
429
+ ]
430
+ }
431
+ },
432
+ {
433
+ rules: {
434
+ // "perfectionist/sort-objects": "off",
435
+ // "perfectionist/sort-variable-declarations": "off",
436
+ // "perfectionist/sort-jsx-props": "off",
437
+ // "perfectionist/sort-modules": "off",
438
+ // "perfectionist/sort-classes": "off",
439
+ // "perfectionist/sort-enums": "off",
440
+ }
441
+ }
442
+ ];
443
+ }
444
+
445
+ // src/eslint/plugins/promise.ts
446
+ async function promise() {
447
+ const plugin = await import("eslint-plugin-promise");
448
+ return [
449
+ {
450
+ name: "shibanet0/promise/rules",
451
+ plugins: {
452
+ promise: plugin.default
453
+ },
454
+ rules: {
455
+ ...plugin.default.configs["flat/recommended"].rules
456
+ }
457
+ },
458
+ {
459
+ rules: {
460
+ "promise/always-return": "off",
461
+ "promise/catch-or-return": "off",
462
+ "promise/no-nesting": "off"
463
+ }
464
+ }
465
+ ];
466
+ }
467
+
468
+ // src/eslint/plugins/react.ts
469
+ async function react() {
470
+ const plugin = await import("eslint-plugin-react");
471
+ return [
472
+ {
473
+ name: "shibanet0/react/rules",
474
+ plugins: {
475
+ react: plugin.default
476
+ },
477
+ rules: {
478
+ ...plugin.default.configs["jsx-runtime"].rules,
479
+ ...plugin.default.configs.recommended.rules,
480
+ "react/destructuring-assignment": "off",
481
+ // TODO
482
+ "react/display-name": "off",
483
+ "react/forbid-component-props": "off",
484
+ // TODO
485
+ "react/forward-ref-uses-ref": "off",
486
+ "react/function-component-definition": "off",
487
+ "react/iframe-missing-sandbox": "off",
488
+ "react/jsx-child-element-spacing": "off",
489
+ "react/jsx-closing-tag-location": "off",
490
+ // TODO
491
+ "react/jsx-curly-newline": "off",
492
+ // TODO
493
+ "react/jsx-filename-extension": "off",
494
+ "react/jsx-handler-names": "off",
495
+ "react/jsx-indent": "off",
496
+ // TODO
497
+ // "react/jsx-max-depth": "off", // TODO
498
+ "react/jsx-max-props-per-line": "off",
499
+ // TODO
500
+ "react/jsx-newline": "off",
501
+ // TODO
502
+ "react/jsx-no-bind": "off",
503
+ // TODO
504
+ "react/jsx-no-literals": "off",
505
+ // TODO
506
+ "react/jsx-no-useless-fragment": "off",
507
+ "react/jsx-one-expression-per-line": "off",
508
+ // TODO
509
+ "react/jsx-pascal-case": "off",
510
+ "react/jsx-props-no-spreading": "off",
511
+ "react/jsx-sort-props": "off",
512
+ // TODO
513
+ "react/no-array-index-key": "off",
514
+ // TODO
515
+ "react/no-unknown-property": "off",
516
+ "react/no-unused-prop-types": "warn",
517
+ "react/prefer-read-only-props": "off",
518
+ // TODO
519
+ "react/prop-types": "off",
520
+ "react/react-in-jsx-scope": "off",
521
+ "react/require-default-props": "off"
522
+ }
523
+ }
524
+ ];
525
+ }
526
+
527
+ // src/eslint/plugins/react-hooks.ts
528
+ async function reactHooks() {
529
+ const plugin = await import("eslint-plugin-react-hooks");
530
+ return [
531
+ {
532
+ name: "shibanet0/react-hooks/rules",
533
+ plugins: {
534
+ "react-hooks": plugin.default
535
+ },
536
+ rules: {
537
+ ...plugin.default.configs.flat["recommended-latest"].rules
538
+ }
539
+ }
540
+ ];
541
+ }
542
+
543
+ // src/eslint/plugins/react-perf.ts
544
+ async function reactPerf() {
545
+ const plugin = await import("eslint-plugin-react-perf");
546
+ return [
547
+ {
548
+ name: "shibanet0/react-perf/rules",
549
+ plugins: {
550
+ "react-perf": plugin.default
551
+ },
552
+ rules: {
553
+ ...plugin.default.configs.flat.recommended.rules
554
+ }
555
+ }
556
+ ];
557
+ }
558
+
559
+ // src/eslint/plugins/react-prefer-function-component.ts
560
+ async function reactPreferFunctionComponent() {
561
+ const plugin = await import("eslint-plugin-react-prefer-function-component");
562
+ const cfg = await import("eslint-plugin-react-prefer-function-component/config");
563
+ return [
564
+ {
565
+ name: "shibanet0/react-prefer-function-component/rules",
566
+ plugins: {
567
+ "react-prefer-function-component": plugin.default
568
+ },
569
+ rules: {
570
+ ...cfg.default.configs.recommended.rules
571
+ }
572
+ }
573
+ ];
574
+ }
575
+
576
+ // src/eslint/plugins/react-refresh.ts
577
+ async function reactRefresh() {
578
+ const plugin = await import("eslint-plugin-react-refresh");
579
+ return [
580
+ {
581
+ name: "shibanet0/react-refresh/rules",
582
+ plugins: {
583
+ "react-refresh": plugin.default
584
+ },
585
+ rules: {
586
+ ...plugin.default.configs.recommended.rules
587
+ }
588
+ }
589
+ ];
590
+ }
591
+
592
+ // src/eslint/plugins/security.ts
593
+ async function security() {
594
+ const plugin = await import("eslint-plugin-security");
595
+ return [
596
+ {
597
+ name: "shibanet0/security/rules",
598
+ plugins: {
599
+ security: plugin.default
600
+ },
601
+ rules: {
602
+ ...plugin.default.configs.recommended.rules
603
+ }
604
+ },
605
+ {
606
+ rules: {
607
+ "security/detect-non-literal-fs-filename": "off",
608
+ "security/detect-object-injection": "off"
609
+ }
610
+ }
611
+ ];
612
+ }
613
+
614
+ // src/eslint/plugins/sonarjs.ts
615
+ async function sonarjs() {
616
+ const plugin = await import("eslint-plugin-sonarjs");
617
+ return [
618
+ {
619
+ name: "shibanet0/sonarjs/rules",
620
+ plugins: {
621
+ sonarjs: plugin.default
622
+ },
623
+ rules: {
624
+ ...plugin.default.configs.recommended.rules
625
+ }
626
+ },
627
+ {
628
+ rules: {
629
+ "sonarjs/class-name": "off",
630
+ "sonarjs/cognitive-complexity": "off",
631
+ "sonarjs/constructor-for-side-effects": "off",
632
+ "sonarjs/duplicates-in-character-class": "off",
633
+ "sonarjs/no-commented-code": "off",
634
+ "sonarjs/no-dead-store": "off",
635
+ "sonarjs/no-duplicate-string": "off",
636
+ "sonarjs/no-empty-test-file": "off",
637
+ "sonarjs/no-extra-arguments": "off",
638
+ "sonarjs/no-ignored-exceptions": "off",
639
+ "sonarjs/no-nested-conditional": "off",
640
+ "sonarjs/no-nested-functions": "off",
641
+ "sonarjs/no-nested-template-literals": "off",
642
+ "sonarjs/no-os-command-from-path": "off",
643
+ "sonarjs/no-small-switch": "off",
644
+ "sonarjs/os-command": "off",
645
+ "sonarjs/redundant-type-aliases": "off",
646
+ "sonarjs/slow-regex": "off",
647
+ "sonarjs/todo-tag": "off",
648
+ "sonarjs/unused-import": "off"
649
+ }
650
+ }
651
+ ];
652
+ }
653
+
654
+ // src/eslint/plugins/storybook.ts
655
+ async function storybook() {
656
+ return [
657
+ // {
658
+ // name: "shibanet0/storybook/rules",
659
+ // plugins: {
660
+ // storybook: plugin.default,
661
+ // },
662
+ // rules: {
663
+ // ...plugin.default.configs["flat/recommended"].map(el=>el.rules),
664
+ // },
665
+ // },
666
+ ];
667
+ }
668
+
669
+ // src/eslint/plugins/turbo.ts
670
+ async function turbo() {
671
+ const plugin = await import("eslint-plugin-turbo");
672
+ return [
673
+ {
674
+ name: "shibanet0/turbo/rules",
675
+ plugins: {
676
+ turbo: plugin.default
677
+ },
678
+ rules: {
679
+ ...plugin.default.configs["flat/recommended"].rules
680
+ }
681
+ }
682
+ ];
683
+ }
684
+
685
+ // src/eslint/plugins/typescript.ts
686
+ import { defineConfig } from "eslint/config";
687
+ var typescript = async () => {
688
+ const plugin = await import("typescript-eslint");
689
+ return defineConfig({
690
+ extends: [...plugin.default.configs.recommended],
691
+ files: [GLOB_TS, GLOB_TSX],
692
+ name: "shibanet0/typescript",
693
+ rules: {
694
+ "@typescript-eslint/ban-ts-comment": "off",
695
+ "@typescript-eslint/consistent-type-imports": [
696
+ "error",
697
+ {
698
+ disallowTypeAnnotations: true,
699
+ fixStyle: "separate-type-imports",
700
+ prefer: "type-imports"
701
+ }
702
+ ],
703
+ "@typescript-eslint/no-dynamic-delete": "off",
704
+ "@typescript-eslint/no-empty-interface": "off",
705
+ "@typescript-eslint/no-empty-object-type": "off",
706
+ "@typescript-eslint/no-explicit-any": "off",
707
+ "@typescript-eslint/no-extraneous-class": "off",
708
+ "@typescript-eslint/no-invalid-void-type": "off",
709
+ "@typescript-eslint/no-require-imports": "off",
710
+ // "@typescript-eslint/no-explicit-any": "off",
711
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
712
+ "@typescript-eslint/no-unused-vars": "off",
713
+ // "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
714
+ "@typescript-eslint/no-var-requires": "off",
715
+ "@typescript-eslint/triple-slash-reference": "off"
716
+ }
717
+ });
718
+ };
719
+
720
+ // src/eslint/plugins/unicorn.ts
721
+ async function unicorn() {
722
+ const plugin = await import("eslint-plugin-unicorn");
723
+ return [
724
+ {
725
+ name: "shibanet0/unicorn/rules",
726
+ plugins: {
727
+ unicorn: plugin.default
728
+ },
729
+ rules: {
730
+ ...plugin.default.configs.recommended.rules
731
+ }
732
+ },
733
+ {
734
+ rules: {
735
+ "unicorn/catch-error-name": "off",
736
+ "unicorn/consistent-function-scoping": "off",
737
+ "unicorn/empty-brace-spaces": "off",
738
+ "unicorn/filename-case": "off",
739
+ "unicorn/import-style": "off",
740
+ "unicorn/no-abusive-eslint-disable": "off",
741
+ "unicorn/no-array-for-each": "off",
742
+ "unicorn/no-array-reduce": "off",
743
+ "unicorn/no-array-reverse": "off",
744
+ "unicorn/no-array-sort": "off",
745
+ "unicorn/no-empty-file": "off",
746
+ "unicorn/no-immediate-mutation": "off",
747
+ "unicorn/no-keyword-prefix": ["error", { disallowedPrefixes: ["new"] }],
748
+ "unicorn/no-lonely-if": "off",
749
+ "unicorn/no-negated-condition": "off",
750
+ "unicorn/no-nested-ternary": "off",
751
+ "unicorn/no-null": "off",
752
+ "unicorn/no-process-exit": "off",
753
+ "unicorn/no-single-promise-in-promise-methods": "off",
754
+ "unicorn/no-unreadable-iife": "off",
755
+ "unicorn/no-useless-collection-argument": "off",
756
+ "unicorn/no-useless-error-capture-stack-trace": "off",
757
+ "unicorn/prefer-add-event-listener": "off",
758
+ "unicorn/prefer-array-some": "off",
759
+ "unicorn/prefer-classlist-toggle": "off",
760
+ "unicorn/prefer-dom-node-append": "off",
761
+ "unicorn/prefer-dom-node-remove": "off",
762
+ "unicorn/prefer-dom-node-text-content": "off",
763
+ "unicorn/prefer-global-this": "off",
764
+ "unicorn/prefer-module": "off",
765
+ "unicorn/prefer-number-properties": "off",
766
+ "unicorn/prefer-optional-catch-binding": "off",
767
+ "unicorn/prefer-query-selector": "off",
768
+ "unicorn/prefer-set-has": "off",
769
+ "unicorn/prefer-single-call": "off",
770
+ "unicorn/prefer-spread": "off",
771
+ "unicorn/prefer-string-raw": "off",
772
+ "unicorn/prefer-type-error": "off",
773
+ "unicorn/prevent-abbreviations": "off",
774
+ "unicorn/require-module-specifiers": "off"
775
+ }
776
+ }
777
+ ];
778
+ }
779
+
780
+ // src/eslint/plugins/unused-imports.ts
781
+ async function unusedImports() {
782
+ const plugin = await import("../dist-SV6KNVWH.js");
783
+ return [
784
+ {
785
+ name: "shibanet0/unused-imports/rules",
786
+ plugins: {
787
+ "unused-imports": plugin.default
788
+ },
789
+ rules: {
790
+ "no-unused-vars": "off",
791
+ // or "@typescript-eslint/no-unused-vars": "off",
792
+ "unused-imports/no-unused-imports": "error",
793
+ "unused-imports/no-unused-vars": [
794
+ "warn",
795
+ {
796
+ args: "after-used",
797
+ argsIgnorePattern: "^_",
798
+ vars: "all",
799
+ varsIgnorePattern: "^_"
48
800
  }
49
- ],
50
- "@typescript-eslint/no-empty-interface": "off",
51
- "@typescript-eslint/no-empty-object-type": "off",
52
- "@typescript-eslint/no-explicit-any": "off",
53
- "@typescript-eslint/no-unnecessary-type-constraint": "off",
54
- "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
55
- "@typescript-eslint/no-var-requires": "off"
801
+ ]
56
802
  }
57
803
  }
58
804
  ];
59
- if (!options?.plugins?.["yaml"]?.disabled) {
60
- const { yamlRules } = await import("../yaml-LUJQGNLH.js");
61
- arguments_.push(yamlRules);
805
+ }
806
+
807
+ // src/eslint/index.ts
808
+ import { globalIgnores as globalIgnores2 } from "@eslint/config-helpers";
809
+ var todoEnable = [
810
+ {
811
+ rules: {}
812
+ },
813
+ {
814
+ linterOptions: {
815
+ reportUnusedDisableDirectives: "error"
816
+ }
817
+ }
818
+ ];
819
+ var oxlintRules = oxlint.buildFromOxlintConfig(
820
+ oxlintConfig
821
+ );
822
+ var defaultOptions = {
823
+ plugins: {
824
+ turbo: { disabled: true }
825
+ }
826
+ };
827
+ var defineConfig2 = async (config, options) => {
828
+ const _options = {
829
+ ...defaultOptions,
830
+ ...options,
831
+ plugins: {
832
+ ...defaultOptions.plugins,
833
+ ...options?.plugins
834
+ }
835
+ };
836
+ const arguments_ = [];
837
+ if (!_options?.plugins?.["prettier"]?.disabled) {
838
+ const { prettierRules } = await import("../prettier-VWVEU6BH.js");
839
+ arguments_.push(prettierRules);
840
+ }
841
+ if (!_options?.plugins?.["playwright"]?.disabled) {
842
+ const { playwrightRules } = await import("../playwright-BGT6YZAD.js");
843
+ arguments_.push(playwrightRules);
844
+ }
845
+ if (!_options?.plugins?.["toml"]?.disabled) {
846
+ const { tomlRules } = await import("../toml-Y76F5J2F.js");
847
+ arguments_.push(...tomlRules);
848
+ }
849
+ if (!_options?.plugins?.["json"]?.disabled) {
850
+ const { jsonRules } = await import("../json-LWTL4ZNK.js");
851
+ arguments_.push(...jsonRules);
852
+ }
853
+ const configs = [
854
+ [Promise.resolve(globalIgnores(GLOB_EXCLUDE, "shibanet0/ignores"))],
855
+ javascript(),
856
+ typescript()
857
+ ];
858
+ if (!_options?.plugins?.["unicorn"]?.disabled) {
859
+ configs.push(unicorn());
860
+ }
861
+ if (!_options?.plugins?.["sonarjs"]?.disabled) {
862
+ configs.push(sonarjs());
863
+ }
864
+ if (!_options?.plugins?.["deMorgan"]?.disabled) {
865
+ configs.push(deMorgan());
866
+ }
867
+ if (!_options?.plugins?.["perfectionist"]?.disabled) {
868
+ configs.push(perfectionist());
869
+ }
870
+ if (!_options?.plugins?.["eslint-plugin-array-func"]?.disabled) {
871
+ configs.push(arrayFunc());
872
+ }
873
+ if (!_options?.plugins?.["unused-imports"]?.disabled) {
874
+ configs.push(unusedImports());
62
875
  }
63
- if (!options?.plugins?.["perfectionist"]?.disabled) {
64
- const { perfectionistRules } = await import("../perfectionist-YHPWKMW3.js");
65
- arguments_.push(...perfectionistRules);
876
+ if (!_options?.plugins?.import?.disabled) {
877
+ configs.push(pluginImport());
66
878
  }
67
- return eslintDefineConfig([...arguments_, ...config || [], ...todoDisable]);
879
+ if (!_options?.plugins?.promise?.disabled) {
880
+ configs.push(promise());
881
+ }
882
+ if (!_options?.plugins?.turbo?.disabled) {
883
+ configs.push(turbo());
884
+ }
885
+ if (!_options?.plugins?.["no-use-extend-native"]?.disabled) {
886
+ configs.push(noUseExtendNative());
887
+ }
888
+ if (!_options?.plugins?.["react-prefer-function-component"]?.disabled) {
889
+ configs.push(reactPreferFunctionComponent());
890
+ }
891
+ if (!_options?.plugins?.["security"]?.disabled) {
892
+ configs.push(security());
893
+ }
894
+ if (_options?.react) {
895
+ if (!_options?.plugins?.["react"]?.disabled) {
896
+ configs.push(react());
897
+ }
898
+ if (!_options?.plugins?.["jsx-a11y"]?.disabled) {
899
+ configs.push(jsxA11y());
900
+ }
901
+ if (!_options?.plugins?.["react-hooks"]?.disabled) {
902
+ configs.push(reactHooks());
903
+ }
904
+ if (!_options?.plugins?.["react-perf"]?.disabled) {
905
+ configs.push(reactPerf());
906
+ }
907
+ if (!_options?.plugins?.["storybook"]?.disabled) {
908
+ configs.push(storybook());
909
+ }
910
+ if (!_options?.plugins?.["react-refresh"]?.disabled) {
911
+ configs.push(reactRefresh());
912
+ }
913
+ }
914
+ const resolved = await Promise.all(configs).then((r) => r.flat());
915
+ eslintDefineConfig([
916
+ ...arguments_,
917
+ ...config || [],
918
+ {
919
+ rules: {}
920
+ },
921
+ {
922
+ rules: {
923
+ "no-restricted-imports": [
924
+ "warn",
925
+ {
926
+ paths: [
927
+ { message: "Use 'swiper' instead", name: "react-swipeable-views" },
928
+ { message: "Use '@vanilla-extract/css' instead", name: "styled-components" },
929
+ { message: "Use 'antd/es/*' instead", name: "antd" },
930
+ { message: "Use 'components/Datepicker' instead", name: "antd/es/date-picker" },
931
+ { message: "Use 'antd/es/*' instead", name: "antd/lib" },
932
+ { message: "Use 'antd/es/*' instead", name: "antd/dist" },
933
+ { message: "Use 'date-fns/*' instead", name: "date-fns" },
934
+ { name: "mobx" },
935
+ { name: "moment" },
936
+ { name: "axios" },
937
+ { name: "mobx-utils" },
938
+ { name: "mobx-react-lite" }
939
+ ]
940
+ }
941
+ ]
942
+ }
943
+ },
944
+ {
945
+ rules: {
946
+ "typescript-eslint/no-extraneous-class": "off",
947
+ "unused-imports/no-unused-vars": "off",
948
+ "vanilla-extract/no-empty-style-blocks": "off"
949
+ }
950
+ },
951
+ ...oxlintRules,
952
+ ...todoEnable
953
+ ]);
954
+ const composer = new FlatConfigComposer();
955
+ composer.append(...resolved);
956
+ composer.append(...config || []);
957
+ return composer;
958
+ return eslintDefineConfig([
959
+ ...resolved.map((el) => ({
960
+ files: ["**/*.ts"],
961
+ ...el
962
+ })),
963
+ ...oxlintRules,
964
+ ...todoEnable
965
+ ]);
68
966
  };
69
967
  export {
70
- defineConfig
968
+ defineConfig2 as defineConfig,
969
+ globalIgnores2 as globalIgnores
71
970
  };