@sushichan044/eslint-config-array-resolver 0.1.4 → 0.2.1
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/dist/index.d.mts +7 -1
- package/dist/index.mjs +9 -2
- package/package.json +25 -22
package/dist/index.d.mts
CHANGED
|
@@ -2,13 +2,19 @@ import { RuleMetaData } from "@typescript-eslint/utils/ts-eslint";
|
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
|
|
4
4
|
//#region src/resolver.d.ts
|
|
5
|
-
|
|
6
5
|
interface ESLintConfig {
|
|
7
6
|
configs: FlatConfigItem[];
|
|
8
7
|
dependencies: string[];
|
|
9
8
|
payload: Payload;
|
|
10
9
|
}
|
|
11
10
|
interface ReadFlatConfigOptions {
|
|
11
|
+
/**
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
debug?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
12
18
|
suppressOutput?: boolean;
|
|
13
19
|
}
|
|
14
20
|
declare const resolveFlatConfig: (root: string, options?: ReadFlatConfigOptions) => Promise<ESLintConfig>;
|
package/dist/index.mjs
CHANGED
|
@@ -61,9 +61,16 @@ const findConfigPath = (root) => {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
const resolveFlatConfig = async (root, options = {}) => {
|
|
64
|
-
const { suppressOutput = false } = options;
|
|
64
|
+
const { debug = false, suppressOutput = false } = options;
|
|
65
65
|
const { basePath, fullPath } = findConfigPath(root);
|
|
66
|
-
const startImportConfig = async () => runInDirectory(basePath, async () => unrun({
|
|
66
|
+
const startImportConfig = async () => runInDirectory(basePath, async () => unrun({
|
|
67
|
+
debug,
|
|
68
|
+
inputOptions: {
|
|
69
|
+
platform: "node",
|
|
70
|
+
transform: { define: { "process.env.NODE_ENV": "'production'" } }
|
|
71
|
+
},
|
|
72
|
+
path: fullPath
|
|
73
|
+
}));
|
|
67
74
|
const { dependencies, module: configModule } = await (suppressOutput ? executeWithSilentLogs(startImportConfig) : startImportConfig());
|
|
68
75
|
const rawConfigs = Array.isArray(configModule) ? configModule : [configModule];
|
|
69
76
|
rawConfigs.unshift({
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sushichan044/eslint-config-array-resolver",
|
|
3
|
+
"version": "0.2.1",
|
|
3
4
|
"description": "Resolves flat config module. For internal use only.",
|
|
4
|
-
"version": "0.1.4",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"license": "Apache-2.0",
|
|
7
6
|
"author": {
|
|
8
7
|
"name": "sushichan044",
|
|
@@ -13,45 +12,49 @@
|
|
|
13
12
|
"url": "git+https://github.com/sushichan044/eslint-toolbox.git",
|
|
14
13
|
"directory": "packages/eslint-config-array-resolver"
|
|
15
14
|
},
|
|
16
|
-
"publishConfig": {
|
|
17
|
-
"access": "public",
|
|
18
|
-
"registry": "https://registry.npmjs.org/",
|
|
19
|
-
"provenance": true
|
|
20
|
-
},
|
|
21
15
|
"files": [
|
|
22
16
|
"dist"
|
|
23
17
|
],
|
|
18
|
+
"type": "module",
|
|
24
19
|
"exports": {
|
|
25
20
|
".": {
|
|
26
21
|
"types": "./dist/index.d.mts",
|
|
27
22
|
"import": "./dist/index.mjs"
|
|
28
23
|
}
|
|
29
24
|
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public",
|
|
27
|
+
"provenance": true,
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@typescript-eslint/utils": "^8.54.0",
|
|
32
|
+
"empathic": "^2.0.0",
|
|
33
|
+
"mlly": "^1.8.0",
|
|
34
|
+
"pathe": "^2.0.3",
|
|
35
|
+
"unrun": "^0.2.26"
|
|
36
|
+
},
|
|
30
37
|
"devDependencies": {
|
|
31
38
|
"@arethetypeswrong/core": "^0.18.2",
|
|
32
|
-
"@biomejs/biome": "^2.3.4",
|
|
33
39
|
"@types/node": "^24.10.0",
|
|
34
40
|
"@virtual-live-lab/eslint-config": "^2.3.1",
|
|
35
41
|
"@virtual-live-lab/tsconfig": "^2.1.21",
|
|
36
|
-
"eslint": "^9.39.
|
|
37
|
-
"fs-fixture": "^2.
|
|
38
|
-
"
|
|
39
|
-
"
|
|
42
|
+
"eslint": "^9.39.2",
|
|
43
|
+
"fs-fixture": "^2.11.0",
|
|
44
|
+
"oxfmt": "^0.28.0",
|
|
45
|
+
"publint": "^0.3.17",
|
|
46
|
+
"tsdown": "^0.20.1",
|
|
40
47
|
"typescript": "^5.9.3",
|
|
41
|
-
"typescript-eslint": "^8.
|
|
42
|
-
"unplugin-unused": "^0.5.
|
|
43
|
-
"vitest": "^4.0.
|
|
48
|
+
"typescript-eslint": "^8.54.0",
|
|
49
|
+
"unplugin-unused": "^0.5.7",
|
|
50
|
+
"vitest": "^4.0.18"
|
|
44
51
|
},
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"empathic": "^2.0.0",
|
|
48
|
-
"mlly": "^1.8.0",
|
|
49
|
-
"pathe": "^2.0.3",
|
|
50
|
-
"unrun": "^0.2.7"
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"eslint": "^9.0.0"
|
|
51
54
|
},
|
|
52
55
|
"scripts": {
|
|
53
56
|
"lint": "eslint --max-warnings 0 --fix .",
|
|
54
|
-
"format": "
|
|
57
|
+
"format": "oxfmt",
|
|
55
58
|
"typecheck": "tsc --noEmit",
|
|
56
59
|
"test": "vitest --run",
|
|
57
60
|
"build": "tsdown"
|