@shibanet0/datamitsu-config 0.0.1-alpha-10 → 0.0.1-alpha-12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/bin/datamitsu.mjs +1 -0
  2. package/bin/mitsu.mjs +52 -0
  3. package/datamitsu.js +407 -174
  4. package/dist/chunk-7PGRJISO.js +24 -0
  5. package/dist/dist-SV6KNVWH.js +145 -0
  6. package/dist/eslint/globs.d.ts +16 -0
  7. package/dist/eslint/index.js +867 -265
  8. package/dist/eslint/plugins/arrayFunc.d.ts +2 -0
  9. package/dist/eslint/plugins/deMorgan.d.ts +2 -0
  10. package/dist/eslint/plugins/import.d.ts +2 -2
  11. package/dist/eslint/plugins/javascript.d.ts +2 -0
  12. package/dist/eslint/plugins/json-schema-validator.d.ts +2 -2
  13. package/dist/eslint/plugins/json.d.ts +2 -2
  14. package/dist/eslint/plugins/jsx-a11y.d.ts +2 -2
  15. package/dist/eslint/plugins/n.d.ts +2 -2
  16. package/dist/eslint/plugins/no-use-extend-native.d.ts +2 -2
  17. package/dist/eslint/plugins/perfectionist.d.ts +2 -2
  18. package/dist/eslint/plugins/playwright.d.ts +2 -2
  19. package/dist/eslint/plugins/prettier.d.ts +2 -2
  20. package/dist/eslint/plugins/promise.d.ts +2 -2
  21. package/dist/eslint/plugins/react-hooks.d.ts +2 -2
  22. package/dist/eslint/plugins/react-perf.d.ts +2 -2
  23. package/dist/eslint/plugins/react-prefer-function-component.d.ts +2 -2
  24. package/dist/eslint/plugins/react-refresh.d.ts +2 -2
  25. package/dist/eslint/plugins/react.d.ts +2 -2
  26. package/dist/eslint/plugins/security.d.ts +2 -2
  27. package/dist/eslint/plugins/sonarjs.d.ts +2 -2
  28. package/dist/eslint/plugins/storybook.d.ts +2 -2
  29. package/dist/eslint/plugins/toml.d.ts +2 -2
  30. package/dist/eslint/plugins/turbo.d.ts +2 -2
  31. package/dist/eslint/plugins/typescript.d.ts +2 -0
  32. package/dist/eslint/plugins/unicorn.d.ts +2 -2
  33. package/dist/eslint/plugins/unused-imports.d.ts +2 -2
  34. package/dist/eslint/plugins/vanilla-extract.d.ts +2 -2
  35. package/dist/eslint/plugins/yaml.d.ts +2 -2
  36. package/dist/eslint/plugins/yml.d.ts +2 -2
  37. package/dist/eslint/types.d.ts +34 -0
  38. package/dist/globs/globs.d.ts +1 -0
  39. package/dist/oxlint/index.d.ts +2 -0
  40. package/dist/react-QIEZHZI3.js +61 -0
  41. package/dist/storybook-IETULN4Z.js +8 -0
  42. package/dist/turbo-ZBSVFMOO.js +23 -0
  43. package/dist/unused-imports-GCXR6T7K.js +31 -0
  44. package/oxlint_configuration_schema.json +712 -0
  45. package/package.json +25 -4
package/bin/datamitsu.mjs CHANGED
@@ -25,6 +25,7 @@ const child = spawn(
25
25
  DATAMITSU_APP_COMMITLINT_BINARY_FILEPATH: getBinaryFilepath("@commitlint/cli", "../cli.js"),
26
26
  DATAMITSU_APP_ESLINT_BINARY_FILEPATH: getBinaryFilepath("eslint", "../../bin/eslint.js"),
27
27
  DATAMITSU_APP_KNIP_BINARY_FILEPATH: getBinaryFilepath("knip", "../../bin/knip.js"),
28
+ DATAMITSU_APP_OXLINT_BINARY_FILEPATH: getBinaryFilepath("oxlint", "../../bin/oxlint"),
28
29
  DATAMITSU_APP_PRETTIER_BINARY_FILEPATH: getBinaryFilepath("prettier", "../bin/prettier.cjs"),
29
30
  DATAMITSU_APP_SORT_PACKAGE_JSON_BINARY_FILEPATH: getBinaryFilepath(
30
31
  "sort-package-json",
package/bin/mitsu.mjs ADDED
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from "node:child_process";
4
+ import { join } from "node:path";
5
+
6
+ let currentChild = null;
7
+
8
+ function run(args) {
9
+ return new Promise((resolve, reject) => {
10
+ const child = spawn("node", [join(import.meta.dirname, "datamitsu.mjs"), ...args], {
11
+ stdio: "inherit",
12
+ });
13
+
14
+ currentChild = child;
15
+
16
+ child.on("exit", (code, signal) => {
17
+ currentChild = null;
18
+
19
+ if (signal) {
20
+ reject(signal);
21
+ } else if (code === 0) {
22
+ resolve();
23
+ } else {
24
+ reject(code);
25
+ }
26
+ });
27
+
28
+ child.on("error", reject);
29
+ });
30
+ }
31
+
32
+ // graceful shutdown
33
+ function shutdown(signal) {
34
+ if (currentChild) {
35
+ currentChild.kill(signal);
36
+ }
37
+ process.exit(128 + (signal === "SIGINT" ? 2 : 15));
38
+ }
39
+
40
+ process.on("SIGINT", shutdown);
41
+ process.on("SIGTERM", shutdown);
42
+ process.on("SIGHUP", shutdown);
43
+
44
+ try {
45
+ await run(["fix"]);
46
+ await run(["lint"]);
47
+ } catch (reason) {
48
+ if (typeof reason === "number") {
49
+ process.exit(reason);
50
+ }
51
+ process.exit(1);
52
+ }