@shibanet0/datamitsu-config 0.0.1-alpha-15 → 0.0.1-alpha-16
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/.oxlintrc.json +5 -0
- package/bin/s0.mjs +3 -0
- package/datamitsu.js +25 -1
- package/dist/arrayFunc-5N3GY2F7.js +26 -0
- package/dist/arrow-return-style-OSKSFIYU.js +12 -0
- package/dist/boundaries-YMO2BVMA.js +12 -0
- package/dist/chunk-OYKSRJ7A.js +54 -0
- package/dist/chunk-QGM4M3NI.js +37 -0
- package/dist/compat-5MOKCDXB.js +12 -0
- package/dist/datamitsu-config/ignore.d.ts +1 -1
- package/dist/deMorgan-DBQHOKTA.js +20 -0
- package/dist/depend-LGOLSLHO.js +12 -0
- package/dist/dist-FLFZ46LX.js +147 -0
- package/dist/eslint/index.js +7 -2
- package/dist/import-5CHN52T3.js +33 -0
- package/dist/javascript-4XNVXG56.js +38 -0
- package/dist/jsdoc-BFCHD6BR.js +12 -0
- package/dist/json-JLHKHY5N.js +30 -0
- package/dist/json-schema-validator-G4FJBJG2.js +21 -0
- package/dist/jsx-a11y-2Z3YLKS7.js +28 -0
- package/dist/lib/datamitsu.d.ts +11 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/n-LGSE6NHE.js +21 -0
- package/dist/no-unsanitized-BP3NWBNG.js +12 -0
- package/dist/no-use-extend-native-4252MLPH.js +21 -0
- package/dist/perfectionist-RY3SJXTU.js +101 -0
- package/dist/playwright-DWBJI3E2.js +21 -0
- package/dist/prettier-RATOIHME.js +20 -0
- package/dist/promise-7HLQAS46.js +27 -0
- package/dist/react-YRMI55JC.js +68 -0
- package/dist/react-hooks-7SLMJ6QC.js +20 -0
- package/dist/react-perf-GVJEUZ43.js +20 -0
- package/dist/react-prefer-function-component-HK26GJUW.js +21 -0
- package/dist/react-refresh-DXTW3QQE.js +20 -0
- package/dist/react-you-might-not-need-an-effect-NZS3IU4F.js +12 -0
- package/dist/regexp-352YQCWR.js +12 -0
- package/dist/s0/__tests__/helpers/mockCrypto.d.ts +23 -0
- package/dist/s0/__tests__/helpers/mockExeca.d.ts +47 -0
- package/dist/s0/__tests__/helpers/mockFs.d.ts +44 -0
- package/dist/s0/__tests__/helpers/mockGlob.d.ts +21 -0
- package/dist/s0/cmd/pulumi/__tests__/cleanupState.test.d.ts +1 -0
- package/dist/s0/cmd/pulumi/__tests__/constants.test.d.ts +1 -0
- package/dist/s0/cmd/pulumi/__tests__/decryptState.test.d.ts +1 -0
- package/dist/s0/cmd/pulumi/__tests__/encryptState.test.d.ts +1 -0
- package/dist/s0/cmd/pulumi/__tests__/index.test.d.ts +1 -0
- package/dist/s0/cmd/pulumi/cleanupState.d.ts +1 -0
- package/dist/s0/cmd/pulumi/constants.d.ts +41 -0
- package/dist/s0/cmd/pulumi/decryptState.d.ts +1 -0
- package/dist/s0/cmd/pulumi/encryptState.d.ts +1 -0
- package/dist/s0/cmd/pulumi/index.d.ts +2 -0
- package/dist/s0/datamitsu.d.ts +3 -0
- package/dist/s0/index.d.ts +1 -0
- package/dist/s0/index.js +543 -0
- package/dist/s0/pulumi-sops/091c1ddb-facd-4171-b791-1b386a32e4ff/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/0c33559a-d7ab-4978-a363-a7105dd51350/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/16bd8ff6-4193-4420-b1b2-9646088ede53/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/3e66133e-f7c0-4453-a2c9-e83b62e4af3c/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/40bbde68-2cb9-41aa-a556-d606ac9c84c4/editor.mjs +116 -0
- package/dist/s0/pulumi-sops/41cae216-86eb-46e3-8091-84956fd6316e/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/439e1c86-700c-401b-bd9a-2b12b013a3bc/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/4bb9d4a2-74c1-4e1a-9d78-4d871fc9bd48/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/4cc4d490-1c23-4f9e-9e70-8ef87cad02b5/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/6bd9118e-c679-4030-9000-4e4273eb0ce0/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/87bab9bf-c7c3-45fb-9acb-0a1350e97ad0/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/8f30068d-012c-4dc8-b655-ea74b3b8164b/editor.mjs +116 -0
- package/dist/s0/pulumi-sops/970bfc17-bd57-4a35-928b-f69958b56329/editor.mjs +120 -0
- package/dist/s0/pulumi-sops/9776aa01-2a97-4725-bdd4-b434de5e42f6/editor.mjs +120 -0
- package/dist/s0/pulumi-sops/c0e9b360-f4b4-46d7-a3d4-a30651e9409b/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/c329990d-d211-4e60-82d2-c66d424661b8/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/cbbb9669-c8a7-4f72-83a5-312a9bcab43b/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/cc0b68e9-2731-463d-bab2-c179b7b6c5fc/editor.mjs +116 -0
- package/dist/s0/pulumi-sops/cc0d81df-f72c-4b21-9f6e-9ac595b05380/editor.mjs +116 -0
- package/dist/s0/pulumi-sops/d1a660b7-1bbd-40f1-836e-7c2ea852d5a8/editor.mjs +121 -0
- package/dist/s0/pulumi-sops/d5ddd29b-6bfd-4b21-8bce-56440c90a526/editor.mjs +116 -0
- package/dist/s0/pulumi-sops/d9248914-c396-4c14-81b5-9ff9fcd0d3fb/editor.mjs +122 -0
- package/dist/s0/pulumi-sops/e985abca-2949-4ebe-87a0-55f67ac0904d/editor.mjs +116 -0
- package/dist/s0/pulumi-sops/f9514550-0f7e-4ee1-b96a-2d9cf02a10fd/editor.mjs +115 -0
- package/dist/s0/utils/__tests__/datamitsu.test.d.ts +1 -0
- package/dist/s0/utils/__tests__/encryption.test.d.ts +1 -0
- package/dist/s0/utils/__tests__/tty.test.d.ts +1 -0
- package/dist/s0/utils/datamitsu.d.ts +3 -0
- package/dist/s0/utils/encryption.d.ts +26 -0
- package/dist/s0/utils/tty.d.ts +1 -0
- package/dist/security-C5XVZJVE.js +26 -0
- package/dist/sonarjs-7NEHWSQM.js +44 -0
- package/dist/storybook-HSR4AZ5R.js +21 -0
- package/dist/toml-O5VFIDLY.js +21 -0
- package/dist/turbo-UMGZCDB6.js +21 -0
- package/dist/typescript-KIXWXTZM.js +42 -0
- package/dist/typescript-O2GSPRJG.js +43 -0
- package/dist/unicorn-LX3V6FPZ.js +64 -0
- package/dist/unused-imports-JO2R752C.js +31 -0
- package/dist/vanilla-extract-LH7JF5I5.js +23 -0
- package/dist/yml-CJIIAGHQ.js +27 -0
- package/package.json +6 -1
package/.oxlintrc.json
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"no-magic-numbers": "off",
|
|
20
20
|
"no-ternary": "off",
|
|
21
21
|
"no-warning-comments": "off",
|
|
22
|
+
"init-declarations": "off",
|
|
23
|
+
"prefer-destructuring": "off",
|
|
24
|
+
"no-await-in-loop": "off",
|
|
25
|
+
"require-await":"off",
|
|
26
|
+
"unicorn/no-object-as-default-parameter":"off",
|
|
22
27
|
"prefer-template": "off",
|
|
23
28
|
"sort-imports": "off",
|
|
24
29
|
"triple-slash-reference": "off",
|
package/bin/s0.mjs
ADDED
package/datamitsu.js
CHANGED
|
@@ -1958,9 +1958,10 @@ var mapOfApps = {
|
|
|
1958
1958
|
|
|
1959
1959
|
// package.json
|
|
1960
1960
|
var name = "@shibanet0/datamitsu-config";
|
|
1961
|
-
var version = "0.0.1-alpha-
|
|
1961
|
+
var version = "0.0.1-alpha-16";
|
|
1962
1962
|
var dependencies = {
|
|
1963
1963
|
"@antebudimir/eslint-plugin-vanilla-extract": "1.16.0",
|
|
1964
|
+
"@commander-js/extra-typings": "14.0.0",
|
|
1964
1965
|
"@commitlint/cli": "20.2.0",
|
|
1965
1966
|
"@commitlint/config-conventional": "20.2.0",
|
|
1966
1967
|
"@commitlint/format": "20.2.0",
|
|
@@ -1971,6 +1972,7 @@ var dependencies = {
|
|
|
1971
1972
|
"@eslint/js": "9.39.2",
|
|
1972
1973
|
"@prettier/plugin-xml": "3.4.2",
|
|
1973
1974
|
"@stylistic/eslint-plugin": "5.6.1",
|
|
1975
|
+
commander: "14.0.2",
|
|
1974
1976
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
1975
1977
|
eslint: "9.39.2",
|
|
1976
1978
|
"eslint-config-prettier": "10.1.8",
|
|
@@ -2009,6 +2011,8 @@ var dependencies = {
|
|
|
2009
2011
|
"eslint-plugin-turbo": "2.6.3",
|
|
2010
2012
|
"eslint-plugin-unicorn": "62.0.0",
|
|
2011
2013
|
"eslint-plugin-yml": "1.19.1",
|
|
2014
|
+
execa: "9.6.1",
|
|
2015
|
+
"fast-glob": "3.3.3",
|
|
2012
2016
|
globals: "16.5.0",
|
|
2013
2017
|
knip: "5.75.1",
|
|
2014
2018
|
oxlint: "1.34.0",
|
|
@@ -2042,18 +2046,23 @@ var oxlintConfig = {
|
|
|
2042
2046
|
"capitalized-comments": "off",
|
|
2043
2047
|
"func-style": "off",
|
|
2044
2048
|
"id-length": "off",
|
|
2049
|
+
"init-declarations": "off",
|
|
2045
2050
|
"max-lines": "off",
|
|
2046
2051
|
"max-lines-per-function": "off",
|
|
2052
|
+
"no-await-in-loop": "off",
|
|
2047
2053
|
"no-inline-comments": "off",
|
|
2048
2054
|
"no-magic-numbers": "off",
|
|
2049
2055
|
"no-ternary": "off",
|
|
2050
2056
|
"no-warning-comments": "off",
|
|
2057
|
+
"prefer-destructuring": "off",
|
|
2051
2058
|
"prefer-template": "off",
|
|
2059
|
+
"require-await": "off",
|
|
2052
2060
|
"sort-imports": "off",
|
|
2053
2061
|
"triple-slash-reference": "off",
|
|
2054
2062
|
"unicorn/filename-case": "off",
|
|
2055
2063
|
"unicorn/no-array-sort": "off",
|
|
2056
2064
|
"unicorn/no-null": "off",
|
|
2065
|
+
"unicorn/no-object-as-default-parameter": "off",
|
|
2057
2066
|
"unicorn/require-module-specifiers": "off"
|
|
2058
2067
|
}
|
|
2059
2068
|
};
|
|
@@ -2148,6 +2157,21 @@ var ignoreGroups = {
|
|
|
2148
2157
|
"**/*.log"
|
|
2149
2158
|
],
|
|
2150
2159
|
Other: ["**/*.gpg"],
|
|
2160
|
+
Pulumi: [
|
|
2161
|
+
"**/.pulumi/**/*.attrs",
|
|
2162
|
+
"**/.pulumi/locks/",
|
|
2163
|
+
"**/.pulumi/backups/",
|
|
2164
|
+
"**/.pulumi/history/",
|
|
2165
|
+
"**/.pulumi/**/*.bak",
|
|
2166
|
+
"**/.pulumi/**/*.json",
|
|
2167
|
+
"**/.pulumi/**/*.json.tmp",
|
|
2168
|
+
"**/.pulumi/**/*.yaml.tmp",
|
|
2169
|
+
"!**/.pulumi/**/*.enc.json",
|
|
2170
|
+
"**/.pulumi/**/*.yaml",
|
|
2171
|
+
"!**/.pulumi/**/*.enc.yaml",
|
|
2172
|
+
"**/.pulumi/**/*.yml",
|
|
2173
|
+
"!**/.pulumi/**/*.enc.yml"
|
|
2174
|
+
],
|
|
2151
2175
|
"Security & Secrets": [
|
|
2152
2176
|
"**/*.key",
|
|
2153
2177
|
"**/*.pem",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/arrayFunc.ts
|
|
4
|
+
async function arrayFunc() {
|
|
5
|
+
const plugin = await import("eslint-plugin-array-func");
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
name: "shibanet0/array-func/rules",
|
|
9
|
+
plugins: {
|
|
10
|
+
"array-func": plugin.default
|
|
11
|
+
},
|
|
12
|
+
rules: {
|
|
13
|
+
...plugin.default.configs.recommended.rules
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
rules: {
|
|
18
|
+
"array-func/from-map": "off",
|
|
19
|
+
"array-func/prefer-array-from": "off"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
arrayFunc
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/arrow-return-style.ts
|
|
4
|
+
async function arrowReturnStyle() {
|
|
5
|
+
const plugin = await import("eslint-plugin-arrow-return-style");
|
|
6
|
+
return [
|
|
7
|
+
plugin.default.configs.recommended
|
|
8
|
+
];
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
arrowReturnStyle
|
|
12
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/eslint/globs.ts
|
|
2
|
+
var GLOB_TS = "**/*.?([cm])ts";
|
|
3
|
+
var GLOB_TSX = "**/*.?([cm])tsx";
|
|
4
|
+
var GLOB_EXCLUDE = [
|
|
5
|
+
"**/node_modules",
|
|
6
|
+
"**/dist",
|
|
7
|
+
"**/package-lock.json",
|
|
8
|
+
"**/yarn.lock",
|
|
9
|
+
"**/pnpm-lock.yaml",
|
|
10
|
+
"**/bun.lockb",
|
|
11
|
+
"**/generated/**",
|
|
12
|
+
"**/output",
|
|
13
|
+
"**/coverage",
|
|
14
|
+
"**/temp",
|
|
15
|
+
"**/.temp",
|
|
16
|
+
"**/tmp",
|
|
17
|
+
"**/build",
|
|
18
|
+
"**/.tmp",
|
|
19
|
+
"**/.history",
|
|
20
|
+
"**/.vitepress/cache",
|
|
21
|
+
"**/.nuxt",
|
|
22
|
+
"**/.turbo/**",
|
|
23
|
+
"**/playwright-report-html/**",
|
|
24
|
+
"**/playwright-report-allure/**",
|
|
25
|
+
"**/playwright-report-*/**",
|
|
26
|
+
"**/.git/**",
|
|
27
|
+
"**/.next",
|
|
28
|
+
"**/out/**",
|
|
29
|
+
"**/storybook-static/**",
|
|
30
|
+
"**/.svelte-kit",
|
|
31
|
+
"**/.vercel",
|
|
32
|
+
"**/.changeset",
|
|
33
|
+
"**/.idea",
|
|
34
|
+
"**/.cache",
|
|
35
|
+
"**/.output",
|
|
36
|
+
"**/.vite-inspect",
|
|
37
|
+
"**/.yarn",
|
|
38
|
+
"**/vite.config.*.timestamp-*",
|
|
39
|
+
"**/CHANGELOG*.md",
|
|
40
|
+
"**/*.min.*",
|
|
41
|
+
"**/LICENSE*",
|
|
42
|
+
"**/__snapshots__",
|
|
43
|
+
"**/auto-import?(s).d.ts",
|
|
44
|
+
"**/components.d.ts",
|
|
45
|
+
"**/.enc.json",
|
|
46
|
+
"**/.enc.yaml",
|
|
47
|
+
"**/.enc.yml"
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
GLOB_TS,
|
|
52
|
+
GLOB_TSX,
|
|
53
|
+
GLOB_EXCLUDE
|
|
54
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
+
});
|
|
13
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
+
mod
|
|
31
|
+
));
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
__require,
|
|
35
|
+
__commonJS,
|
|
36
|
+
__toESM
|
|
37
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ignoreGroups: tools.Ignore.IgnoreMap<"Build outputs" | "Cache & temporary files" | "Dependencies" | "Environment" | "Golang specific" | "IDE & OS" | "Logs" | "Other" | "Security & Secrets" | "Testing">;
|
|
1
|
+
export declare const ignoreGroups: tools.Ignore.IgnoreMap<"Build outputs" | "Cache & temporary files" | "Dependencies" | "Environment" | "Golang specific" | "IDE & OS" | "Logs" | "Other" | "Pulumi" | "Security & Secrets" | "Testing">;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/deMorgan.ts
|
|
4
|
+
async function deMorgan() {
|
|
5
|
+
const plugin = await import("eslint-plugin-de-morgan");
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
name: "shibanet0/de-morgan/rules",
|
|
9
|
+
plugins: {
|
|
10
|
+
"de-morgan": plugin.default
|
|
11
|
+
},
|
|
12
|
+
rules: {
|
|
13
|
+
...plugin.default.configs.recommended.rules
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
deMorgan
|
|
20
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// ../../../../Library/pnpm/store/v10/links/eslint-plugin-unused-imports/4.3.0/a3da1d10a18945ddc6e862b5d66008b63149462a15f7eaa5392918a3262b9e2b/node_modules/eslint-plugin-unused-imports/dist/index.mjs
|
|
4
|
+
import { createRequire } from "module";
|
|
5
|
+
var commaFilter = { filter: (token) => token.value === "," };
|
|
6
|
+
var includeCommentsFilter = { includeComments: true };
|
|
7
|
+
function isUsedInJSDoc(identifierName, sourceCode) {
|
|
8
|
+
const comments = sourceCode.getAllComments();
|
|
9
|
+
const jsdocPattern = new RegExp(
|
|
10
|
+
// {@link Name} or @see Name
|
|
11
|
+
`(?:@(?: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)`
|
|
12
|
+
);
|
|
13
|
+
return comments.some((comment) => {
|
|
14
|
+
if (comment.type !== "Block") {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return jsdocPattern.test(comment.value);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function makePredicate(isImport, addFixer) {
|
|
21
|
+
return (problem, context) => {
|
|
22
|
+
const sourceCode = context.sourceCode || context.getSourceCode();
|
|
23
|
+
const node = problem.node ?? // typescript-eslint >= 7.8 sets a range instead of a node
|
|
24
|
+
sourceCode.getNodeByRangeIndex(sourceCode.getIndexFromLoc(problem.loc.start));
|
|
25
|
+
const { parent } = node;
|
|
26
|
+
if (parent && /^Import(|Default|Namespace)Specifier$/.test(parent.type) && isImport) {
|
|
27
|
+
const identifierName = node.name;
|
|
28
|
+
if (identifierName && isUsedInJSDoc(identifierName, sourceCode)) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return parent ? /^Import(|Default|Namespace)Specifier$/.test(parent.type) == isImport ? Object.assign(problem, addFixer?.(parent, sourceCode)) : false : isImport ? false : problem;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
var unusedVarsPredicate = makePredicate(false);
|
|
36
|
+
var unusedImportsPredicate = makePredicate(true, (parent, sourceCode) => ({
|
|
37
|
+
fix(fixer) {
|
|
38
|
+
const grandParent = parent.parent;
|
|
39
|
+
if (!grandParent) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
if (grandParent.specifiers.length === 1) {
|
|
43
|
+
const nextToken = sourceCode.getTokenAfter(grandParent, includeCommentsFilter);
|
|
44
|
+
const newLinesBetween = nextToken ? nextToken.loc.start.line - grandParent.loc.start.line : 0;
|
|
45
|
+
const endOfReplaceRange = nextToken ? nextToken.range[0] : grandParent.range[1];
|
|
46
|
+
const count = Math.max(0, newLinesBetween - 1);
|
|
47
|
+
return [
|
|
48
|
+
fixer.remove(grandParent),
|
|
49
|
+
fixer.replaceTextRange(
|
|
50
|
+
[grandParent.range[1], endOfReplaceRange],
|
|
51
|
+
"\n".repeat(count)
|
|
52
|
+
)
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
if (parent !== grandParent.specifiers[grandParent.specifiers.length - 1]) {
|
|
56
|
+
const comma = sourceCode.getTokenAfter(parent, commaFilter);
|
|
57
|
+
const prevNode = sourceCode.getTokenBefore(parent);
|
|
58
|
+
return [
|
|
59
|
+
fixer.removeRange([prevNode.range[1], parent.range[0]]),
|
|
60
|
+
fixer.remove(parent),
|
|
61
|
+
fixer.remove(comma)
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
if (grandParent.specifiers.filter((specifier) => specifier.type === "ImportSpecifier").length === 1) {
|
|
65
|
+
const start = sourceCode.getTokenBefore(parent, commaFilter);
|
|
66
|
+
const end = sourceCode.getTokenAfter(parent, {
|
|
67
|
+
filter: (token) => token.value === "}"
|
|
68
|
+
});
|
|
69
|
+
return fixer.removeRange([start.range[0], end.range[1]]);
|
|
70
|
+
}
|
|
71
|
+
return fixer.removeRange([
|
|
72
|
+
sourceCode.getTokenBefore(parent, commaFilter).range[0],
|
|
73
|
+
parent.range[1]
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
function createRuleWithPredicate(name, baseRule, predicate) {
|
|
78
|
+
return {
|
|
79
|
+
...baseRule,
|
|
80
|
+
meta: {
|
|
81
|
+
...baseRule.meta,
|
|
82
|
+
fixable: "code",
|
|
83
|
+
docs: {
|
|
84
|
+
...baseRule.meta?.docs,
|
|
85
|
+
url: `https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/${name}.md`
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
create(context) {
|
|
89
|
+
return baseRule.create(
|
|
90
|
+
Object.create(context, {
|
|
91
|
+
report: {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
value(problem) {
|
|
94
|
+
const result = predicate(problem, context);
|
|
95
|
+
if (result) {
|
|
96
|
+
context.report(result);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
var rule;
|
|
106
|
+
var require2 = createRequire(import.meta.url);
|
|
107
|
+
function getBaseRule() {
|
|
108
|
+
if (!rule) {
|
|
109
|
+
rule = getRuleFromTSLintPlugin() ?? getRuleFromTSLint() ?? getESLintBaseRule();
|
|
110
|
+
}
|
|
111
|
+
return rule;
|
|
112
|
+
}
|
|
113
|
+
function getRuleFromTSLintPlugin() {
|
|
114
|
+
try {
|
|
115
|
+
const tslintPlugin = require2("@typescript-eslint/eslint-plugin");
|
|
116
|
+
return tslintPlugin.rules["no-unused-vars"];
|
|
117
|
+
} catch (_) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function getRuleFromTSLint() {
|
|
122
|
+
try {
|
|
123
|
+
const tslint = require2("typescript-eslint");
|
|
124
|
+
return tslint.plugin.rules["no-unused-vars"];
|
|
125
|
+
} catch (_) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function getESLintBaseRule() {
|
|
130
|
+
const eslint = require2("eslint");
|
|
131
|
+
return new eslint.Linter({ configType: "eslintrc" }).getRules().get("no-unused-vars");
|
|
132
|
+
}
|
|
133
|
+
var no_unused_vars_default = createRuleWithPredicate("no-unused-vars", getBaseRule(), unusedVarsPredicate);
|
|
134
|
+
var no_unused_imports_default = createRuleWithPredicate("no-unused-imports", getBaseRule(), unusedImportsPredicate);
|
|
135
|
+
var plugin = {
|
|
136
|
+
meta: {
|
|
137
|
+
name: "unused-imports"
|
|
138
|
+
},
|
|
139
|
+
rules: {
|
|
140
|
+
"no-unused-vars": no_unused_vars_default,
|
|
141
|
+
"no-unused-imports": no_unused_imports_default
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
var index_default = plugin;
|
|
145
|
+
export {
|
|
146
|
+
index_default as default
|
|
147
|
+
};
|
package/dist/eslint/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GLOB_EXCLUDE
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-OYKSRJ7A.js";
|
|
4
4
|
|
|
5
5
|
// src/eslint/index.ts
|
|
6
6
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
@@ -26,18 +26,23 @@ var oxlintConfig = {
|
|
|
26
26
|
"capitalized-comments": "off",
|
|
27
27
|
"func-style": "off",
|
|
28
28
|
"id-length": "off",
|
|
29
|
+
"init-declarations": "off",
|
|
29
30
|
"max-lines": "off",
|
|
30
31
|
"max-lines-per-function": "off",
|
|
32
|
+
"no-await-in-loop": "off",
|
|
31
33
|
"no-inline-comments": "off",
|
|
32
34
|
"no-magic-numbers": "off",
|
|
33
35
|
"no-ternary": "off",
|
|
34
36
|
"no-warning-comments": "off",
|
|
37
|
+
"prefer-destructuring": "off",
|
|
35
38
|
"prefer-template": "off",
|
|
39
|
+
"require-await": "off",
|
|
36
40
|
"sort-imports": "off",
|
|
37
41
|
"triple-slash-reference": "off",
|
|
38
42
|
"unicorn/filename-case": "off",
|
|
39
43
|
"unicorn/no-array-sort": "off",
|
|
40
44
|
"unicorn/no-null": "off",
|
|
45
|
+
"unicorn/no-object-as-default-parameter": "off",
|
|
41
46
|
"unicorn/require-module-specifiers": "off"
|
|
42
47
|
}
|
|
43
48
|
};
|
|
@@ -86,7 +91,7 @@ var defineConfig = async (packageJSON, config, options) => {
|
|
|
86
91
|
const configs = [
|
|
87
92
|
[Promise.resolve(globalIgnores(GLOB_EXCLUDE, "shibanet0/ignores"))],
|
|
88
93
|
import("../javascript-KSG5RSYY.js").then((r) => r.javascript()),
|
|
89
|
-
import("../typescript-
|
|
94
|
+
import("../typescript-KIXWXTZM.js").then((r) => r.typescript())
|
|
90
95
|
];
|
|
91
96
|
if (!_options?.plugins?.["unicorn"]?.disabled) {
|
|
92
97
|
configs.push(import("../unicorn-DIQEKCM2.js").then((r) => r.unicorn()));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/import.ts
|
|
4
|
+
async function pluginImport() {
|
|
5
|
+
const plugin = await import("eslint-plugin-import");
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
name: "shibanet0/import/rules",
|
|
9
|
+
plugins: {
|
|
10
|
+
import: plugin.default
|
|
11
|
+
},
|
|
12
|
+
rules: {
|
|
13
|
+
...plugin.flatConfigs.recommended.rules
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
rules: {
|
|
18
|
+
"import/default": "off",
|
|
19
|
+
"import/extensions": "off",
|
|
20
|
+
"import/named": "off",
|
|
21
|
+
"import/namespace": "off",
|
|
22
|
+
"import/no-extraneous-dependencies": "off",
|
|
23
|
+
"import/no-relative-packages": "off",
|
|
24
|
+
"import/no-unresolved": "off",
|
|
25
|
+
"import/order": "off",
|
|
26
|
+
"import/prefer-default-export": "off"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
pluginImport
|
|
33
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/javascript.ts
|
|
4
|
+
var javascript = async () => {
|
|
5
|
+
const [plugin, globals] = await Promise.all([import("@eslint/js"), import("globals")]);
|
|
6
|
+
return [
|
|
7
|
+
{ ...plugin.default.configs.recommended, name: "shibanet0/js" },
|
|
8
|
+
{
|
|
9
|
+
languageOptions: {
|
|
10
|
+
ecmaVersion: "latest",
|
|
11
|
+
globals: {
|
|
12
|
+
...globals.browser,
|
|
13
|
+
...globals.es2026,
|
|
14
|
+
...globals.node,
|
|
15
|
+
document: "readonly",
|
|
16
|
+
navigator: "readonly",
|
|
17
|
+
window: "readonly"
|
|
18
|
+
},
|
|
19
|
+
parserOptions: {
|
|
20
|
+
ecmaFeatures: {
|
|
21
|
+
jsx: true
|
|
22
|
+
},
|
|
23
|
+
ecmaVersion: "latest",
|
|
24
|
+
sourceType: "module"
|
|
25
|
+
},
|
|
26
|
+
sourceType: "module"
|
|
27
|
+
},
|
|
28
|
+
linterOptions: {
|
|
29
|
+
reportUnusedDisableDirectives: false
|
|
30
|
+
},
|
|
31
|
+
name: "shibanet0/js/setup"
|
|
32
|
+
},
|
|
33
|
+
{ rules: { "no-empty": "off", "no-restricted-imports": "off", "no-undef": "off" } }
|
|
34
|
+
];
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
javascript
|
|
38
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/json.ts
|
|
4
|
+
async function json() {
|
|
5
|
+
const plugin = await import("eslint-plugin-json");
|
|
6
|
+
return [
|
|
7
|
+
// {
|
|
8
|
+
// files: ["**/*.json"],
|
|
9
|
+
// ...json.configs["recommended"],
|
|
10
|
+
// },
|
|
11
|
+
// {
|
|
12
|
+
// files: ["**/tsconfig*.json"],
|
|
13
|
+
// rules: {
|
|
14
|
+
// "json/*": ["error", { allowComments: true }],
|
|
15
|
+
// },
|
|
16
|
+
// },
|
|
17
|
+
{
|
|
18
|
+
name: "shibanet0/json/rules",
|
|
19
|
+
plugins: {
|
|
20
|
+
json: plugin.default
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
...plugin.default.configs.recommended.rules
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
json
|
|
30
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/json-schema-validator.ts
|
|
4
|
+
async function jsonSchemaValidator() {
|
|
5
|
+
const plugin = await import("eslint-plugin-json-schema-validator");
|
|
6
|
+
return [
|
|
7
|
+
...plugin.default.configs["flat/recommended"]
|
|
8
|
+
// {
|
|
9
|
+
// name: "shibanet0/json-schema-validator/rules",
|
|
10
|
+
// plugins: {
|
|
11
|
+
// "json-schema-validator": plugin.default,
|
|
12
|
+
// },
|
|
13
|
+
// rules: {
|
|
14
|
+
// ...plugin.default.configs["flat/recommended"].rules,
|
|
15
|
+
// },
|
|
16
|
+
// },
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
jsonSchemaValidator
|
|
21
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "./chunk-QGM4M3NI.js";
|
|
2
|
+
|
|
3
|
+
// src/eslint/plugins/jsx-a11y.ts
|
|
4
|
+
async function jsxA11y() {
|
|
5
|
+
const plugin = await import("eslint-plugin-jsx-a11y");
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
name: "shibanet0/jsx-a11y/rules",
|
|
9
|
+
plugins: {
|
|
10
|
+
"jsx-a11y": plugin.default
|
|
11
|
+
},
|
|
12
|
+
rules: {
|
|
13
|
+
...plugin.default.flatConfigs.recommended.rules
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
rules: {
|
|
18
|
+
"jsx-a11y/click-events-have-key-events": "off",
|
|
19
|
+
"jsx-a11y/interactive-supports-focus": "off",
|
|
20
|
+
"jsx-a11y/no-autofocus": "off",
|
|
21
|
+
"jsx-a11y/tabindex-no-positive": "off"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
jsxA11y
|
|
28
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Options as ExecaOptions } from "execa";
|
|
2
|
+
export interface DatamitsuGlobalFlags {
|
|
3
|
+
configs?: string[];
|
|
4
|
+
}
|
|
5
|
+
export declare class Datamitsu {
|
|
6
|
+
#private;
|
|
7
|
+
get binaryPath(): string;
|
|
8
|
+
get globalFlags(): string[];
|
|
9
|
+
constructor(globalFlags?: DatamitsuGlobalFlags);
|
|
10
|
+
exec(toolName: string, args?: string[], options?: ExecaOptions): import("execa").ResultPromise<ExecaOptions>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./datamitsu";
|