@shibanet0/datamitsu-config 0.0.1-alpha-27 → 0.0.1-alpha-28

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/datamitsu.js CHANGED
@@ -1789,23 +1789,23 @@ var mapOfApps = {
1789
1789
 
1790
1790
  // package.json
1791
1791
  var name = "@shibanet0/datamitsu-config";
1792
- var version = "0.0.1-alpha-27";
1792
+ var version = "0.0.1-alpha-28";
1793
1793
  var dependencies = {
1794
1794
  "@antebudimir/eslint-plugin-vanilla-extract": "1.16.0",
1795
1795
  "@commander-js/extra-typings": "14.0.0",
1796
- "@commitlint/cli": "20.3.0",
1797
- "@commitlint/config-conventional": "20.3.0",
1798
- "@commitlint/format": "20.2.0",
1799
- "@commitlint/types": "20.2.0",
1796
+ "@commitlint/cli": "20.3.1",
1797
+ "@commitlint/config-conventional": "20.3.1",
1798
+ "@commitlint/format": "20.3.1",
1799
+ "@commitlint/types": "20.3.1",
1800
1800
  "@cspell/eslint-plugin": "9.4.0",
1801
1801
  "@datamitsu/datamitsu": "0.0.1-alpha-61",
1802
- "@eslint/config-helpers": "0.5.0",
1802
+ "@eslint/config-helpers": "0.5.1",
1803
1803
  "@eslint/js": "9.39.2",
1804
1804
  "@next/eslint-plugin-next": "16.1.1",
1805
1805
  "@prettier/plugin-xml": "3.4.2",
1806
- "@stylistic/eslint-plugin": "5.6.1",
1806
+ "@stylistic/eslint-plugin": "5.7.0",
1807
1807
  "@vitejs/plugin-react": "5.1.2",
1808
- "@vitest/eslint-plugin": "1.6.5",
1808
+ "@vitest/eslint-plugin": "1.6.6",
1809
1809
  commander: "14.0.2",
1810
1810
  "conventional-changelog-conventionalcommits": "9.1.0",
1811
1811
  eslint: "9.39.2",
@@ -1831,7 +1831,7 @@ var dependencies = {
1831
1831
  "eslint-plugin-html": "8.1.3",
1832
1832
  "eslint-plugin-i18next": "6.1.3",
1833
1833
  "eslint-plugin-import": "2.32.0",
1834
- "eslint-plugin-jsdoc": "61.5.0",
1834
+ "eslint-plugin-jsdoc": "62.0.0",
1835
1835
  "eslint-plugin-json": "4.0.1",
1836
1836
  "eslint-plugin-json-schema-validator": "5.5.0",
1837
1837
  "eslint-plugin-jsonc": "2.21.0",
@@ -1839,9 +1839,9 @@ var dependencies = {
1839
1839
  "eslint-plugin-n": "17.23.1",
1840
1840
  "eslint-plugin-no-unsanitized": "4.1.4",
1841
1841
  "eslint-plugin-no-use-extend-native": "0.7.2",
1842
- "eslint-plugin-oxlint": "1.36.0",
1843
- "eslint-plugin-perfectionist": "4.15.1",
1844
- "eslint-plugin-playwright": "2.4.0",
1842
+ "eslint-plugin-oxlint": "1.38.0",
1843
+ "eslint-plugin-perfectionist": "5.3.1",
1844
+ "eslint-plugin-playwright": "2.4.1",
1845
1845
  "eslint-plugin-pnpm": "1.4.3",
1846
1846
  "eslint-plugin-promise": "7.2.1",
1847
1847
  "eslint-plugin-react": "7.37.5",
@@ -1854,15 +1854,15 @@ var dependencies = {
1854
1854
  "eslint-plugin-security": "3.0.1",
1855
1855
  "eslint-plugin-sonarjs": "3.0.5",
1856
1856
  "eslint-plugin-storybook": "10.1.11",
1857
- "eslint-plugin-toml": "0.12.0",
1858
- "eslint-plugin-turbo": "2.7.2",
1857
+ "eslint-plugin-toml": "0.13.0",
1858
+ "eslint-plugin-turbo": "2.7.3",
1859
1859
  "eslint-plugin-unicorn": "62.0.0",
1860
1860
  "eslint-plugin-yml": "1.19.1",
1861
1861
  execa: "9.6.1",
1862
1862
  "fast-glob": "3.3.3",
1863
1863
  globals: "17.0.0",
1864
- knip: "5.79.0",
1865
- oxlint: "1.36.0",
1864
+ knip: "5.80.2",
1865
+ oxlint: "1.38.0",
1866
1866
  prettier: "3.7.4",
1867
1867
  "prettier-plugin-embed": "0.5.1",
1868
1868
  "prettier-plugin-jsdoc": "1.8.0",
@@ -1874,7 +1874,7 @@ var dependencies = {
1874
1874
  tsx: "4.21.0",
1875
1875
  "type-fest": "5.3.1",
1876
1876
  typescript: "5.9.3",
1877
- "typescript-eslint": "8.51.0"
1877
+ "typescript-eslint": "8.52.0"
1878
1878
  };
1879
1879
 
1880
1880
  // src/oxlint/index.ts
@@ -0,0 +1,145 @@
1
+ // ../../../../Library/pnpm/store/v10/links/eslint-plugin-unused-imports/4.3.0/552a99718c30ac2262c9ec5a25f0220f2413b4d956fac071aafccabc4382d44f/node_modules/eslint-plugin-unused-imports/dist/index.mjs
2
+ import { createRequire } from "module";
3
+ var commaFilter = { filter: (token) => token.value === "," };
4
+ var includeCommentsFilter = { includeComments: true };
5
+ function isUsedInJSDoc(identifierName, sourceCode) {
6
+ const comments = sourceCode.getAllComments();
7
+ const jsdocPattern = new RegExp(
8
+ // {@link Name} or @see Name
9
+ `(?:@(?:link|linkcode|linkplain|see)\\s+${identifierName}\\b)|(?:\\{@(?:link|linkcode|linkplain)\\s+${identifierName}\\b\\})|(?:[@{](?:type|typedef|param|returns?|template|augments|extends|implements)\\s+[^}]*\\b${identifierName}\\b)`
10
+ );
11
+ return comments.some((comment) => {
12
+ if (comment.type !== "Block") {
13
+ return false;
14
+ }
15
+ return jsdocPattern.test(comment.value);
16
+ });
17
+ }
18
+ function makePredicate(isImport, addFixer) {
19
+ return (problem, context) => {
20
+ const sourceCode = context.sourceCode || context.getSourceCode();
21
+ const node = problem.node ?? // typescript-eslint >= 7.8 sets a range instead of a node
22
+ sourceCode.getNodeByRangeIndex(sourceCode.getIndexFromLoc(problem.loc.start));
23
+ const { parent } = node;
24
+ if (parent && /^Import(|Default|Namespace)Specifier$/.test(parent.type) && isImport) {
25
+ const identifierName = node.name;
26
+ if (identifierName && isUsedInJSDoc(identifierName, sourceCode)) {
27
+ return false;
28
+ }
29
+ }
30
+ return parent ? /^Import(|Default|Namespace)Specifier$/.test(parent.type) == isImport ? Object.assign(problem, addFixer?.(parent, sourceCode)) : false : isImport ? false : problem;
31
+ };
32
+ }
33
+ var unusedVarsPredicate = makePredicate(false);
34
+ var unusedImportsPredicate = makePredicate(true, (parent, sourceCode) => ({
35
+ fix(fixer) {
36
+ const grandParent = parent.parent;
37
+ if (!grandParent) {
38
+ return null;
39
+ }
40
+ if (grandParent.specifiers.length === 1) {
41
+ const nextToken = sourceCode.getTokenAfter(grandParent, includeCommentsFilter);
42
+ const newLinesBetween = nextToken ? nextToken.loc.start.line - grandParent.loc.start.line : 0;
43
+ const endOfReplaceRange = nextToken ? nextToken.range[0] : grandParent.range[1];
44
+ const count = Math.max(0, newLinesBetween - 1);
45
+ return [
46
+ fixer.remove(grandParent),
47
+ fixer.replaceTextRange(
48
+ [grandParent.range[1], endOfReplaceRange],
49
+ "\n".repeat(count)
50
+ )
51
+ ];
52
+ }
53
+ if (parent !== grandParent.specifiers[grandParent.specifiers.length - 1]) {
54
+ const comma = sourceCode.getTokenAfter(parent, commaFilter);
55
+ const prevNode = sourceCode.getTokenBefore(parent);
56
+ return [
57
+ fixer.removeRange([prevNode.range[1], parent.range[0]]),
58
+ fixer.remove(parent),
59
+ fixer.remove(comma)
60
+ ];
61
+ }
62
+ if (grandParent.specifiers.filter((specifier) => specifier.type === "ImportSpecifier").length === 1) {
63
+ const start = sourceCode.getTokenBefore(parent, commaFilter);
64
+ const end = sourceCode.getTokenAfter(parent, {
65
+ filter: (token) => token.value === "}"
66
+ });
67
+ return fixer.removeRange([start.range[0], end.range[1]]);
68
+ }
69
+ return fixer.removeRange([
70
+ sourceCode.getTokenBefore(parent, commaFilter).range[0],
71
+ parent.range[1]
72
+ ]);
73
+ }
74
+ }));
75
+ function createRuleWithPredicate(name, baseRule, predicate) {
76
+ return {
77
+ ...baseRule,
78
+ meta: {
79
+ ...baseRule.meta,
80
+ fixable: "code",
81
+ docs: {
82
+ ...baseRule.meta?.docs,
83
+ url: `https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/${name}.md`
84
+ }
85
+ },
86
+ create(context) {
87
+ return baseRule.create(
88
+ Object.create(context, {
89
+ report: {
90
+ enumerable: true,
91
+ value(problem) {
92
+ const result = predicate(problem, context);
93
+ if (result) {
94
+ context.report(result);
95
+ }
96
+ }
97
+ }
98
+ })
99
+ );
100
+ }
101
+ };
102
+ }
103
+ var rule;
104
+ var require2 = createRequire(import.meta.url);
105
+ function getBaseRule() {
106
+ if (!rule) {
107
+ rule = getRuleFromTSLintPlugin() ?? getRuleFromTSLint() ?? getESLintBaseRule();
108
+ }
109
+ return rule;
110
+ }
111
+ function getRuleFromTSLintPlugin() {
112
+ try {
113
+ const tslintPlugin = require2("@typescript-eslint/eslint-plugin");
114
+ return tslintPlugin.rules["no-unused-vars"];
115
+ } catch (_) {
116
+ return null;
117
+ }
118
+ }
119
+ function getRuleFromTSLint() {
120
+ try {
121
+ const tslint = require2("typescript-eslint");
122
+ return tslint.plugin.rules["no-unused-vars"];
123
+ } catch (_) {
124
+ return null;
125
+ }
126
+ }
127
+ function getESLintBaseRule() {
128
+ const eslint = require2("eslint");
129
+ return new eslint.Linter({ configType: "eslintrc" }).getRules().get("no-unused-vars");
130
+ }
131
+ var no_unused_vars_default = createRuleWithPredicate("no-unused-vars", getBaseRule(), unusedVarsPredicate);
132
+ var no_unused_imports_default = createRuleWithPredicate("no-unused-imports", getBaseRule(), unusedImportsPredicate);
133
+ var plugin = {
134
+ meta: {
135
+ name: "unused-imports"
136
+ },
137
+ rules: {
138
+ "no-unused-vars": no_unused_vars_default,
139
+ "no-unused-imports": no_unused_imports_default
140
+ }
141
+ };
142
+ var index_default = plugin;
143
+ export {
144
+ index_default as default
145
+ };
@@ -69,7 +69,7 @@ var defineConfig = async (packageJSON, config, options) => {
69
69
  configs.push(import("../arrayFunc-E2CQDPH7.js").then((r) => r.arrayFunc()));
70
70
  }
71
71
  if (!_options?.plugins?.["unused-imports"]?.disabled) {
72
- configs.push(import("../unused-imports-B24FSXNB.js").then((r) => r.unusedImports()));
72
+ configs.push(import("../unused-imports-4KLZJTXK.js").then((r) => r.unusedImports()));
73
73
  }
74
74
  if (!_options?.plugins?.["fsecond"]?.disabled) {
75
75
  configs.push(import("../fsecond-U7QFID4J.js").then((r) => r.fsecond()));
@@ -0,0 +1,29 @@
1
+ // src/eslint/plugins/unused-imports.ts
2
+ async function unusedImports() {
3
+ const plugin = await import("./dist-E66E7N4U.js");
4
+ return [
5
+ {
6
+ name: "shibanet0/unused-imports/rules",
7
+ plugins: {
8
+ "unused-imports": plugin.default
9
+ },
10
+ rules: {
11
+ "no-unused-vars": "off",
12
+ // or "@typescript-eslint/no-unused-vars": "off",
13
+ "unused-imports/no-unused-imports": "error",
14
+ "unused-imports/no-unused-vars": [
15
+ "warn",
16
+ {
17
+ args: "after-used",
18
+ argsIgnorePattern: "^_",
19
+ vars: "all",
20
+ varsIgnorePattern: "^_"
21
+ }
22
+ ]
23
+ }
24
+ }
25
+ ];
26
+ }
27
+ export {
28
+ unusedImports
29
+ };
@@ -60,7 +60,7 @@
60
60
  "markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
61
61
  },
62
62
  "jsPlugins": {
63
- "description": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
63
+ "description": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present.",
64
64
  "anyOf": [
65
65
  {
66
66
  "type": "null"
@@ -73,7 +73,7 @@
73
73
  "uniqueItems": true
74
74
  }
75
75
  ],
76
- "markdownDescription": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
76
+ "markdownDescription": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present."
77
77
  },
78
78
  "overrides": {
79
79
  "description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
@@ -246,9 +246,9 @@
246
246
  ],
247
247
  "properties": {
248
248
  "name": {
249
- "description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
249
+ "description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
250
250
  "type": "string",
251
- "markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
251
+ "markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
252
252
  },
253
253
  "specifier": {
254
254
  "description": "Path or package name of the plugin",
@@ -518,7 +518,7 @@
518
518
  "markdownDescription": "Enabled or disabled specific global variables."
519
519
  },
520
520
  "jsPlugins": {
521
- "description": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
521
+ "description": "JS plugins for this override, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present.",
522
522
  "anyOf": [
523
523
  {
524
524
  "type": "null"
@@ -531,7 +531,7 @@
531
531
  "uniqueItems": true
532
532
  }
533
533
  ],
534
- "markdownDescription": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
534
+ "markdownDescription": "JS plugins for this override, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present."
535
535
  },
536
536
  "plugins": {
537
537
  "description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shibanet0/datamitsu-config",
3
- "version": "0.0.1-alpha-27",
3
+ "version": "0.0.1-alpha-28",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -66,19 +66,19 @@
66
66
  "dependencies": {
67
67
  "@antebudimir/eslint-plugin-vanilla-extract": "1.16.0",
68
68
  "@commander-js/extra-typings": "14.0.0",
69
- "@commitlint/cli": "20.3.0",
70
- "@commitlint/config-conventional": "20.3.0",
71
- "@commitlint/format": "20.2.0",
72
- "@commitlint/types": "20.2.0",
69
+ "@commitlint/cli": "20.3.1",
70
+ "@commitlint/config-conventional": "20.3.1",
71
+ "@commitlint/format": "20.3.1",
72
+ "@commitlint/types": "20.3.1",
73
73
  "@cspell/eslint-plugin": "9.4.0",
74
74
  "@datamitsu/datamitsu": "0.0.1-alpha-61",
75
- "@eslint/config-helpers": "0.5.0",
75
+ "@eslint/config-helpers": "0.5.1",
76
76
  "@eslint/js": "9.39.2",
77
77
  "@next/eslint-plugin-next": "16.1.1",
78
78
  "@prettier/plugin-xml": "3.4.2",
79
- "@stylistic/eslint-plugin": "5.6.1",
79
+ "@stylistic/eslint-plugin": "5.7.0",
80
80
  "@vitejs/plugin-react": "5.1.2",
81
- "@vitest/eslint-plugin": "1.6.5",
81
+ "@vitest/eslint-plugin": "1.6.6",
82
82
  "commander": "14.0.2",
83
83
  "conventional-changelog-conventionalcommits": "9.1.0",
84
84
  "eslint": "9.39.2",
@@ -104,7 +104,7 @@
104
104
  "eslint-plugin-html": "8.1.3",
105
105
  "eslint-plugin-i18next": "6.1.3",
106
106
  "eslint-plugin-import": "2.32.0",
107
- "eslint-plugin-jsdoc": "61.5.0",
107
+ "eslint-plugin-jsdoc": "62.0.0",
108
108
  "eslint-plugin-json": "4.0.1",
109
109
  "eslint-plugin-json-schema-validator": "5.5.0",
110
110
  "eslint-plugin-jsonc": "2.21.0",
@@ -112,9 +112,9 @@
112
112
  "eslint-plugin-n": "17.23.1",
113
113
  "eslint-plugin-no-unsanitized": "4.1.4",
114
114
  "eslint-plugin-no-use-extend-native": "0.7.2",
115
- "eslint-plugin-oxlint": "1.36.0",
116
- "eslint-plugin-perfectionist": "4.15.1",
117
- "eslint-plugin-playwright": "2.4.0",
115
+ "eslint-plugin-oxlint": "1.38.0",
116
+ "eslint-plugin-perfectionist": "5.3.1",
117
+ "eslint-plugin-playwright": "2.4.1",
118
118
  "eslint-plugin-pnpm": "1.4.3",
119
119
  "eslint-plugin-promise": "7.2.1",
120
120
  "eslint-plugin-react": "7.37.5",
@@ -127,15 +127,15 @@
127
127
  "eslint-plugin-security": "3.0.1",
128
128
  "eslint-plugin-sonarjs": "3.0.5",
129
129
  "eslint-plugin-storybook": "10.1.11",
130
- "eslint-plugin-toml": "0.12.0",
131
- "eslint-plugin-turbo": "2.7.2",
130
+ "eslint-plugin-toml": "0.13.0",
131
+ "eslint-plugin-turbo": "2.7.3",
132
132
  "eslint-plugin-unicorn": "62.0.0",
133
133
  "eslint-plugin-yml": "1.19.1",
134
134
  "execa": "9.6.1",
135
135
  "fast-glob": "3.3.3",
136
136
  "globals": "17.0.0",
137
- "knip": "5.79.0",
138
- "oxlint": "1.36.0",
137
+ "knip": "5.80.2",
138
+ "oxlint": "1.38.0",
139
139
  "prettier": "3.7.4",
140
140
  "prettier-plugin-embed": "0.5.1",
141
141
  "prettier-plugin-jsdoc": "1.8.0",
@@ -147,6 +147,6 @@
147
147
  "tsx": "4.21.0",
148
148
  "type-fest": "5.3.1",
149
149
  "typescript": "5.9.3",
150
- "typescript-eslint": "8.51.0"
150
+ "typescript-eslint": "8.52.0"
151
151
  }
152
152
  }