@shibanet0/datamitsu-config 0.0.1-alpha-11 → 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.
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
+ }
package/datamitsu.js CHANGED
@@ -6,63 +6,63 @@
6
6
  // src/datamitsu-config/appState.json
7
7
  var appState_default = {
8
8
  lefthook: {
9
- type: "github",
10
- tag: "v2.0.11",
11
9
  binaries: {
12
10
  darwin: {
13
11
  amd64: {
14
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_MacOS_x86_64.gz",
15
- hash: "62991a2d8f30b145c58e1142b55b6737502d98064a05507a41b51e0ba2dd1b65",
16
- contentType: "gz"
12
+ contentType: "gz",
13
+ hash: "8c62194853bf74aacdb6a13f16b74b384c97cb8a0d11a7f29ca1e1e40ea506e8",
14
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_MacOS_x86_64.gz"
17
15
  },
18
16
  arm64: {
19
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_MacOS_arm64.gz",
20
- hash: "d1cb520a846d7ae7ebc2d680ade137272934e168244df6f9dea101b7c0c38477",
21
- contentType: "gz"
17
+ contentType: "gz",
18
+ hash: "9aa9461773162ddbd2aa64750d521d3381bcc1f4f78a012c4f05e7b20f1cb1ce",
19
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_MacOS_arm64.gz"
22
20
  }
23
21
  },
24
22
  freebsd: {
25
23
  amd64: {
26
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_Freebsd_x86_64.gz",
27
- hash: "047118ec2d46acbf89c48635db8fafd6433e6e04f76cf2f19467caab7f880d8f",
28
- contentType: "gz"
24
+ contentType: "gz",
25
+ hash: "1226f91d6c25499cb2eb84020b19dfa4b73fafe95d1d32d57f377c6bda1463b2",
26
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_Freebsd_x86_64.gz"
29
27
  },
30
28
  arm64: {
31
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_Freebsd_arm64.gz",
32
- hash: "e62b06b954a144f0d7f4c697c2265d5f7b48741e3e6c716a87b23269e3f6f75d",
33
- contentType: "gz"
29
+ contentType: "gz",
30
+ hash: "9a90255d85f6bbfa05eef5ccc30eee44d889c157dfdef0f8776f2c9ac073b9d2",
31
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_Freebsd_arm64.gz"
34
32
  }
35
33
  },
36
34
  linux: {
37
35
  aarch64: {
38
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_Linux_aarch64.gz",
39
- hash: "d17b46dda220e4f2e42c5028adfde05c0f94268e077a2e8e256c635c10f7eb23",
40
- contentType: "gz"
36
+ contentType: "gz",
37
+ hash: "4405c0c936c2209202107b4f78a7fe7451f0b4c35ed41ba874901c89fc9d6466",
38
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_Linux_aarch64.gz"
41
39
  },
42
40
  amd64: {
43
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_Linux_x86_64.gz",
44
- hash: "868ada33133b924926f162e603b10bf526c662f8504d7b477a5e09b97b29463d",
45
- contentType: "gz"
41
+ contentType: "gz",
42
+ hash: "6faaf1bdfcb3f654fc236b76872aeb6d8258cf0a2a5793ddafeac7ed8527bd14",
43
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_Linux_x86_64.gz"
46
44
  },
47
45
  arm64: {
48
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_Linux_arm64.gz",
49
- hash: "7d64803bb0f63eb5c75f1ff762b21488bb18d97de29dbd4ea68f8d5485181fa6",
50
- contentType: "gz"
46
+ contentType: "gz",
47
+ hash: "d27e462f0e998ec4f45684fc0fa759b4806cafe98414cef55d935328d10df898",
48
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_Linux_arm64.gz"
51
49
  }
52
50
  },
53
51
  windows: {
54
52
  amd64: {
55
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_Windows_x86_64.gz",
56
- hash: "a42b3ab94f6bd7dafca6dea08bfec7eade24fa9ef5d58b17105db42768cfc6f4",
57
- contentType: "gz"
53
+ contentType: "gz",
54
+ hash: "e5e002b6551694fedaf0e90d0464ae734dcf8f07f1fa79d036ee0421a0768729",
55
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_Windows_x86_64.gz"
58
56
  },
59
57
  arm64: {
60
- url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.11/lefthook_2.0.11_Windows_arm64.gz",
61
- hash: "0b84a8283fd3187ff27ae53aec0b384c87f9713657dc85d639711d5eeec1d48d",
62
- contentType: "gz"
58
+ contentType: "gz",
59
+ hash: "3f0f952a520d3dbb044e46d092182fc97e6a809aa44f5a02751cf15eb3369711",
60
+ url: "https://github.com/evilmartians/lefthook/releases/download/v2.0.12/lefthook_2.0.12_Windows_arm64.gz"
63
61
  }
64
62
  }
65
- }
63
+ },
64
+ tag: "v2.0.12",
65
+ type: "github"
66
66
  },
67
67
  "golangci-lint": {
68
68
  type: "github",
@@ -865,29 +865,40 @@ var mapOfApps = {
865
865
 
866
866
  // package.json
867
867
  var name = "@shibanet0/datamitsu-config";
868
- var version = "0.0.1-alpha-11";
868
+ var version = "0.0.1-alpha-12";
869
869
  var dependencies = {
870
870
  "@antebudimir/eslint-plugin-vanilla-extract": "1.16.0",
871
871
  "@commitlint/cli": "20.2.0",
872
872
  "@commitlint/config-conventional": "20.2.0",
873
873
  "@commitlint/format": "20.2.0",
874
874
  "@commitlint/types": "20.2.0",
875
- "@datamitsu/datamitsu": "0.0.1-alpha-22",
875
+ "@cspell/eslint-plugin": "9.4.0",
876
+ "@datamitsu/datamitsu": "0.0.1-alpha-26",
876
877
  "@eslint/config-helpers": "0.5.0",
877
878
  "@eslint/js": "9.39.2",
878
879
  "@prettier/plugin-xml": "3.4.2",
880
+ "@stylistic/eslint-plugin": "5.6.1",
879
881
  "@typescript/native-preview": "7.0.0-dev.20251215.1",
880
882
  "conventional-changelog-conventionalcommits": "9.1.0",
881
883
  eslint: "9.39.2",
882
884
  "eslint-config-prettier": "10.1.8",
883
885
  "eslint-flat-config-utils": "2.1.4",
884
886
  "eslint-plugin-array-func": "5.1.0",
887
+ "eslint-plugin-arrow-return-style": "1.3.1",
888
+ "eslint-plugin-boundaries": "5.3.1",
889
+ "eslint-plugin-compat": "6.0.2",
885
890
  "eslint-plugin-de-morgan": "2.0.0",
891
+ "eslint-plugin-depend": "1.4.0",
892
+ "eslint-plugin-eslint-comments": "3.2.0",
893
+ "eslint-plugin-fsecond": "1.4.0",
894
+ "eslint-plugin-functional": "9.0.2",
886
895
  "eslint-plugin-import": "2.32.0",
896
+ "eslint-plugin-jsdoc": "61.5.0",
887
897
  "eslint-plugin-json": "4.0.1",
888
898
  "eslint-plugin-json-schema-validator": "5.5.0",
889
899
  "eslint-plugin-jsx-a11y": "6.10.2",
890
900
  "eslint-plugin-n": "17.23.1",
901
+ "eslint-plugin-no-unsanitized": "4.1.4",
891
902
  "eslint-plugin-no-use-extend-native": "0.7.2",
892
903
  "eslint-plugin-oxlint": "1.34.0",
893
904
  "eslint-plugin-perfectionist": "4.15.1",
@@ -898,6 +909,7 @@ var dependencies = {
898
909
  "eslint-plugin-react-perf": "3.3.3",
899
910
  "eslint-plugin-react-prefer-function-component": "5.0.0",
900
911
  "eslint-plugin-react-refresh": "0.4.26",
912
+ "eslint-plugin-react-you-might-not-need-an-effect": "0.8.1",
901
913
  "eslint-plugin-regexp": "2.10.0",
902
914
  "eslint-plugin-security": "3.0.1",
903
915
  "eslint-plugin-sonarjs": "3.0.5",
@@ -1225,6 +1237,100 @@ var init = {
1225
1237
  },
1226
1238
  rootOnly: true
1227
1239
  },
1240
+ ".editorconfig": {
1241
+ content: (context) => {
1242
+ const existing = INI.toRecord(INI.parse(context.existingContent || ""));
1243
+ const data = [
1244
+ {
1245
+ name: "DEFAULT",
1246
+ properties: { root: String(context.isRoot) }
1247
+ },
1248
+ {
1249
+ name: "*",
1250
+ properties: {
1251
+ end_of_line: "lf",
1252
+ indent_size: "2",
1253
+ insert_final_newline: "true",
1254
+ ...existing["*"]
1255
+ }
1256
+ }
1257
+ // {
1258
+ // name: "*",
1259
+ // properties: { ...existing["*"], ...baseParams },
1260
+ // },
1261
+ // {
1262
+ // name: "*.go",
1263
+ // properties: {
1264
+ // ...existing["*.go"],
1265
+ // ...baseParams,
1266
+ // indent_size: "2",
1267
+ // },
1268
+ // },
1269
+ // {
1270
+ // name: "*.{js,cjs,mjs,ts,cts,mts,tsx,ctsx,mtsx,scss}",
1271
+ // properties: {
1272
+ // ...existing["*.{js,cjs,mjs,ts,cts,mts,tsx,ctsx,mtsx,scss}"],
1273
+ // ...baseParams,
1274
+ // quote_type: "double",
1275
+ // },
1276
+ // },
1277
+ // {
1278
+ // name: "*.{kt,kts}",
1279
+ // properties: {
1280
+ // ...existing["*.{kt,kts}"],
1281
+ // ...baseParams,
1282
+ // indent_size: "2",
1283
+ // },
1284
+ // },
1285
+ // {
1286
+ // name: "*.md",
1287
+ // properties: {
1288
+ // ...existing["*.md"],
1289
+ // indent_style: "space",
1290
+ // trim_trailing_whitespace: "false",
1291
+ // },
1292
+ // },
1293
+ // {
1294
+ // name: "GNUmakefile",
1295
+ // properties: { ...existing["GNUmakefile"], indent_size: "2" },
1296
+ // },
1297
+ // {
1298
+ // name: "Makefile",
1299
+ // properties: { ...existing["Makefile"], indent_size: "2" },
1300
+ // },
1301
+ // {
1302
+ // name: "COMMIT_EDITMSG",
1303
+ // properties: { ...existing["COMMIT_EDITMSG"], max_line_length: "0" },
1304
+ // },
1305
+ // {
1306
+ // name: "*.{yml,yaml,json}",
1307
+ // properties: {
1308
+ // ...existing["*.{yml,json}"],
1309
+ // indent_style: "space",
1310
+ // indent_size: "2",
1311
+ // },
1312
+ // },
1313
+ ];
1314
+ return INI.stringify(data);
1315
+ },
1316
+ rootOnly: true
1317
+ },
1318
+ ".editorconfig-checker.json": {
1319
+ content: (context) => {
1320
+ const data = JSON.parse(context.existingContent || "{}");
1321
+ return JSON.stringify(
1322
+ {
1323
+ ...data,
1324
+ Disable: {
1325
+ ...data.Disable
1326
+ }
1327
+ },
1328
+ null,
1329
+ 2
1330
+ ) + "\n";
1331
+ },
1332
+ rootOnly: true
1333
+ },
1228
1334
  ".gitignore": {
1229
1335
  content: (context) => {
1230
1336
  const mergedRules = tools.Ignore.parse(
@@ -1282,82 +1388,6 @@ var init = {
1282
1388
  },
1283
1389
  projectTypes: ["npm-package"]
1284
1390
  },
1285
- // ".editorconfig": {
1286
- // content: (context) => {
1287
- // // https://editorconfig.org
1288
- // // https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
1289
- // const existing = INI.toRecord(INI.parse(context.existingContent || ""));
1290
- // const baseParams: Record<string, string> = {
1291
- // indent_style: "tab",
1292
- // indent_size: "2",
1293
- // end_of_line: "lf",
1294
- // charset: "utf-8",
1295
- // max_line_length: "120",
1296
- // insert_final_newline: "true",
1297
- // trim_trailing_whitespace: "true",
1298
- // };
1299
- // const data: INI.SectionEntry[] = [
1300
- // {
1301
- // name: "DEFAULT",
1302
- // properties: { root: String(context.isRoot) },
1303
- // },
1304
- // {
1305
- // name: "*",
1306
- // properties: { ...existing["*"], ...baseParams },
1307
- // },
1308
- // {
1309
- // name: "*.go",
1310
- // properties: {
1311
- // ...existing["*.go"],
1312
- // ...baseParams,
1313
- // indent_size: "2",
1314
- // },
1315
- // },
1316
- // {
1317
- // name: "*.{js,cjs,mjs,ts,cts,mts,tsx,ctsx,mtsx,scss}",
1318
- // properties: {
1319
- // ...existing["*.{js,cjs,mjs,ts,cts,mts,tsx,ctsx,mtsx,scss}"],
1320
- // ...baseParams,
1321
- // quote_type: "double",
1322
- // },
1323
- // },
1324
- // {
1325
- // name: "*.{kt,kts}",
1326
- // properties: {
1327
- // ...existing["*.{kt,kts}"],
1328
- // ...baseParams,
1329
- // indent_size: "2",
1330
- // },
1331
- // },
1332
- // {
1333
- // name: "*.md",
1334
- // properties: {
1335
- // ...existing["*.md"],
1336
- // indent_style: "space",
1337
- // trim_trailing_whitespace: "false",
1338
- // },
1339
- // },
1340
- // {
1341
- // name: "GNUmakefile",
1342
- // properties: { ...existing["GNUmakefile"], indent_size: "2" },
1343
- // },
1344
- // {
1345
- // name: "Makefile",
1346
- // properties: { ...existing["Makefile"], indent_size: "2" },
1347
- // },
1348
- // {
1349
- // name: "COMMIT_EDITMSG",
1350
- // properties: { ...existing["COMMIT_EDITMSG"], max_line_length: "0" },
1351
- // },
1352
- // {
1353
- // name: "*.{yml,yaml,json}",
1354
- // properties: {
1355
- // ...existing["*.{yml,json}"],
1356
- // indent_style: "space",
1357
- // indent_size: "2",
1358
- // },
1359
- // },
1360
- // ];
1361
1391
  ".syncpackrc.json": {
1362
1392
  content: () => {
1363
1393
  return JSON.stringify(
@@ -1646,10 +1676,6 @@ var init = {
1646
1676
  projectTypes: ["npm-package"],
1647
1677
  rootOnly: true
1648
1678
  },
1649
- // ".editorconfig-checker.json": {
1650
- // rootOnly: true,
1651
- // content: (context) => {
1652
- // const data = JSON.parse(context.existingContent || "{}");
1653
1679
  "lefthook.yaml": {
1654
1680
  content: (context) => {
1655
1681
  const existing = YAML.parse(context.existingContent || "");
@@ -1829,11 +1855,11 @@ var gitHooks = {
1829
1855
  var projectTypes = {
1830
1856
  "golang-package": {
1831
1857
  description: "Go module",
1832
- markers: ["go.mod"]
1858
+ markers: ["**/go.mod"]
1833
1859
  },
1834
1860
  "npm-package": {
1835
1861
  description: "Node.js/npm project",
1836
- markers: ["package.json"]
1862
+ markers: ["**/package.json"]
1837
1863
  },
1838
1864
  "pnpm-package": {
1839
1865
  description: "pnpm project",
@@ -1841,15 +1867,15 @@ var projectTypes = {
1841
1867
  },
1842
1868
  "terraform-project": {
1843
1869
  description: "Terraform infrastructure",
1844
- markers: ["*.tf"]
1870
+ markers: ["**/*.tf"]
1845
1871
  },
1846
1872
  "typescript-project": {
1847
1873
  description: "",
1848
- markers: ["tsconfig.json"]
1874
+ markers: ["**/tsconfig.json"]
1849
1875
  },
1850
1876
  "typst-project": {
1851
1877
  description: "Typst document",
1852
- markers: ["*.typ"]
1878
+ markers: ["**/*.typ"]
1853
1879
  }
1854
1880
  };
1855
1881
 
@@ -1863,17 +1889,17 @@ var indentSettings = {
1863
1889
 
1864
1890
  // src/datamitsu-config/tools.ts
1865
1891
  var prettierGlobs = [
1866
- "**/*.js",
1867
- "**/*.mjs",
1868
- "**/*.cjs",
1869
- "**/*.d.ts",
1870
- "**/*.ts",
1871
- "**/*.mts",
1872
- "**/*.cts",
1873
- "**/*.tsx",
1874
- "**/*.json",
1875
- "**/*.yaml",
1876
- "**/*.md"
1892
+ // "**/*.js",
1893
+ // "**/*.mjs",
1894
+ // "**/*.cjs",
1895
+ // "**/*.d.ts",
1896
+ // "**/*.ts",
1897
+ // "**/*.mts",
1898
+ // "**/*.cts",
1899
+ // "**/*.tsx",
1900
+ // "**/*.json",
1901
+ // "**/*.yaml",
1902
+ // "**/*.md",
1877
1903
  ];
1878
1904
  var eslintGlobs = [
1879
1905
  "**/*.js",
@@ -1913,6 +1939,18 @@ var toolPriority = [...new Set(_toolPriority)].reduce(
1913
1939
  {}
1914
1940
  );
1915
1941
  var toolsConfig = {
1942
+ "editorconfig-checker": {
1943
+ name: "EditorConfig Checker",
1944
+ operations: {
1945
+ lint: {
1946
+ args: ["-config", ".editorconfig-checker.json"],
1947
+ command: "editorconfig-checker",
1948
+ globs: ["**/*"],
1949
+ mode: "whole-project",
1950
+ rootOnly: true
1951
+ }
1952
+ }
1953
+ },
1916
1954
  eslint: {
1917
1955
  name: "Eslint",
1918
1956
  operations: {
@@ -2131,18 +2169,6 @@ var toolsConfig = {
2131
2169
  },
2132
2170
  projectTypes: ["typescript-project"]
2133
2171
  },
2134
- // "editorconfig-checker": {
2135
- // name: "EditorConfig Checker",
2136
- // operations: {
2137
- // lint: {
2138
- // command: "editorconfig-checker",
2139
- // args: ["-config", ".editorconfig-checker.json"],
2140
- // mode: "whole-project",
2141
- // globs: ["**/*"],
2142
- // rootOnly: true,
2143
- // },
2144
- // },
2145
- // },
2146
2172
  typstyle: {
2147
2173
  name: "typstyle - Typst Code Formatter",
2148
2174
  operations: {
@@ -1,7 +1,7 @@
1
1
  // src/eslint/index.ts
2
2
  import { FlatConfigComposer } from "eslint-flat-config-utils";
3
3
  import oxlint from "eslint-plugin-oxlint";
4
- import { defineConfig as eslintDefineConfig, globalIgnores } from "eslint/config";
4
+ import { globalIgnores } from "eslint/config";
5
5
 
6
6
  // package.json
7
7
  var name = "@shibanet0/datamitsu-config";
@@ -305,6 +305,32 @@ var javascript = async () => {
305
305
  ];
306
306
  };
307
307
 
308
+ // src/eslint/plugins/json.ts
309
+ async function json() {
310
+ const plugin = await import("eslint-plugin-json");
311
+ return [
312
+ // {
313
+ // files: ["**/*.json"],
314
+ // ...json.configs["recommended"],
315
+ // },
316
+ // {
317
+ // files: ["**/tsconfig*.json"],
318
+ // rules: {
319
+ // "json/*": ["error", { allowComments: true }],
320
+ // },
321
+ // },
322
+ {
323
+ name: "shibanet0/json/rules",
324
+ plugins: {
325
+ json: plugin.default
326
+ },
327
+ rules: {
328
+ ...plugin.default.configs.recommended.rules
329
+ }
330
+ }
331
+ ];
332
+ }
333
+
308
334
  // src/eslint/plugins/jsx-a11y.ts
309
335
  async function jsxA11y() {
310
336
  const plugin = await import("eslint-plugin-jsx-a11y");
@@ -442,6 +468,22 @@ async function perfectionist() {
442
468
  ];
443
469
  }
444
470
 
471
+ // src/eslint/plugins/prettier.ts
472
+ async function prettier() {
473
+ const plugin = await import("eslint-config-prettier/flat");
474
+ return [
475
+ {
476
+ name: "shibanet0/prettier/rules",
477
+ plugins: {
478
+ prettier: plugin.default
479
+ },
480
+ rules: {
481
+ ...plugin.default.rules
482
+ }
483
+ }
484
+ ];
485
+ }
486
+
445
487
  // src/eslint/plugins/promise.ts
446
488
  async function promise() {
447
489
  const plugin = await import("eslint-plugin-promise");
@@ -666,6 +708,22 @@ async function storybook() {
666
708
  ];
667
709
  }
668
710
 
711
+ // src/eslint/plugins/toml.ts
712
+ async function toml() {
713
+ const plugin = await import("eslint-plugin-toml");
714
+ return [
715
+ {
716
+ name: "shibanet0/toml/rules",
717
+ plugins: {
718
+ toml: plugin.default
719
+ },
720
+ rules: {
721
+ // ...plugin.default.configs["flat/recommended"].rules,
722
+ }
723
+ }
724
+ ];
725
+ }
726
+
669
727
  // src/eslint/plugins/turbo.ts
670
728
  async function turbo() {
671
729
  const plugin = await import("eslint-plugin-turbo");
@@ -806,16 +864,6 @@ async function unusedImports() {
806
864
 
807
865
  // src/eslint/index.ts
808
866
  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
867
  var oxlintRules = oxlint.buildFromOxlintConfig(
820
868
  oxlintConfig
821
869
  );
@@ -833,23 +881,6 @@ var defineConfig2 = async (config, options) => {
833
881
  ...options?.plugins
834
882
  }
835
883
  };
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
884
  const configs = [
854
885
  [Promise.resolve(globalIgnores(GLOB_EXCLUDE, "shibanet0/ignores"))],
855
886
  javascript(),
@@ -891,6 +922,15 @@ var defineConfig2 = async (config, options) => {
891
922
  if (!_options?.plugins?.["security"]?.disabled) {
892
923
  configs.push(security());
893
924
  }
925
+ if (!_options?.plugins?.["prettier"]?.disabled) {
926
+ configs.push(prettier());
927
+ }
928
+ if (!_options?.plugins?.["toml"]?.disabled) {
929
+ configs.push(toml());
930
+ }
931
+ if (!_options?.plugins?.["json"]?.disabled) {
932
+ configs.push(json());
933
+ }
894
934
  if (_options?.react) {
895
935
  if (!_options?.plugins?.["react"]?.disabled) {
896
936
  configs.push(react());
@@ -912,57 +952,11 @@ var defineConfig2 = async (config, options) => {
912
952
  }
913
953
  }
914
954
  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
955
  const composer = new FlatConfigComposer();
955
956
  composer.append(...resolved);
957
+ composer.append(...oxlintRules);
956
958
  composer.append(...config || []);
957
959
  return composer;
958
- return eslintDefineConfig([
959
- ...resolved.map((el) => ({
960
- files: ["**/*.ts"],
961
- ...el
962
- })),
963
- ...oxlintRules,
964
- ...todoEnable
965
- ]);
966
960
  };
967
961
  export {
968
962
  defineConfig2 as defineConfig,
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const jsonSchemaValidatorRules: ConfigWithExtends[];
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function jsonSchemaValidator(): Promise<TypedFlatConfigItem[]>;
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const jsonRules: ConfigWithExtends[];
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function json(): Promise<TypedFlatConfigItem[]>;
@@ -1,4 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const nRules: ConfigWithExtends;
3
1
  import type { TypedFlatConfigItem } from "../types";
4
2
  export declare function n(): Promise<TypedFlatConfigItem[]>;
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const playwrightRules: ConfigWithExtends;
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function playwright(): Promise<TypedFlatConfigItem[]>;
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const prettierRules: ConfigWithExtends;
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function prettier(): Promise<TypedFlatConfigItem[]>;
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const tomlRules: ConfigWithExtends[];
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function toml(): Promise<TypedFlatConfigItem[]>;
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const vanillaExtractRules: ConfigWithExtends;
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function vanillaExtract(): Promise<TypedFlatConfigItem[]>;
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const yamlRules: ConfigWithExtends[];
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function yaml(): Promise<TypedFlatConfigItem[]>;
@@ -1,2 +1,2 @@
1
- import { type ConfigWithExtends } from "@eslint/config-helpers";
2
- export declare const ymlRules: ConfigWithExtends[];
1
+ import type { TypedFlatConfigItem } from "../types";
2
+ export declare function yaml(): Promise<TypedFlatConfigItem[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shibanet0/datamitsu-config",
3
- "version": "0.0.1-alpha-11",
3
+ "version": "0.0.1-alpha-12",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -49,6 +49,7 @@
49
49
  "bin": {
50
50
  "clean-package": "bin/clean-package.mjs",
51
51
  "datamitsu": "bin/datamitsu.mjs",
52
+ "mitsu": "bin/mitsu.mjs",
52
53
  "tsc": "bin/tsc.mjs",
53
54
  "tsx": "bin/tsx.mjs"
54
55
  },
@@ -65,22 +66,33 @@
65
66
  "@commitlint/config-conventional": "20.2.0",
66
67
  "@commitlint/format": "20.2.0",
67
68
  "@commitlint/types": "20.2.0",
68
- "@datamitsu/datamitsu": "0.0.1-alpha-22",
69
+ "@cspell/eslint-plugin": "9.4.0",
70
+ "@datamitsu/datamitsu": "0.0.1-alpha-26",
69
71
  "@eslint/config-helpers": "0.5.0",
70
72
  "@eslint/js": "9.39.2",
71
73
  "@prettier/plugin-xml": "3.4.2",
74
+ "@stylistic/eslint-plugin": "5.6.1",
72
75
  "@typescript/native-preview": "7.0.0-dev.20251215.1",
73
76
  "conventional-changelog-conventionalcommits": "9.1.0",
74
77
  "eslint": "9.39.2",
75
78
  "eslint-config-prettier": "10.1.8",
76
79
  "eslint-flat-config-utils": "2.1.4",
77
80
  "eslint-plugin-array-func": "5.1.0",
81
+ "eslint-plugin-arrow-return-style": "1.3.1",
82
+ "eslint-plugin-boundaries": "5.3.1",
83
+ "eslint-plugin-compat": "6.0.2",
78
84
  "eslint-plugin-de-morgan": "2.0.0",
85
+ "eslint-plugin-depend": "1.4.0",
86
+ "eslint-plugin-eslint-comments": "3.2.0",
87
+ "eslint-plugin-fsecond": "1.4.0",
88
+ "eslint-plugin-functional": "9.0.2",
79
89
  "eslint-plugin-import": "2.32.0",
90
+ "eslint-plugin-jsdoc": "61.5.0",
80
91
  "eslint-plugin-json": "4.0.1",
81
92
  "eslint-plugin-json-schema-validator": "5.5.0",
82
93
  "eslint-plugin-jsx-a11y": "6.10.2",
83
94
  "eslint-plugin-n": "17.23.1",
95
+ "eslint-plugin-no-unsanitized": "4.1.4",
84
96
  "eslint-plugin-no-use-extend-native": "0.7.2",
85
97
  "eslint-plugin-oxlint": "1.34.0",
86
98
  "eslint-plugin-perfectionist": "4.15.1",
@@ -91,6 +103,7 @@
91
103
  "eslint-plugin-react-perf": "3.3.3",
92
104
  "eslint-plugin-react-prefer-function-component": "5.0.0",
93
105
  "eslint-plugin-react-refresh": "0.4.26",
106
+ "eslint-plugin-react-you-might-not-need-an-effect": "0.8.1",
94
107
  "eslint-plugin-regexp": "2.10.0",
95
108
  "eslint-plugin-security": "3.0.1",
96
109
  "eslint-plugin-sonarjs": "3.0.5",