@powerlines/plugin-biome 0.2.123 → 0.2.125
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.cjs +87 -1
- package/dist/index.mjs +85 -1
- package/dist/powerlines/src/types/context.d.cts +27 -3
- package/dist/powerlines/src/types/context.d.mts +27 -3
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -1 +1,87 @@
|
|
|
1
|
-
Object.defineProperty(exports
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
3
|
+
let __stryke_cli_execute = require("@stryke/cli/execute");
|
|
4
|
+
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
5
|
+
let __stryke_fs_package_fns = require("@stryke/fs/package-fns");
|
|
6
|
+
let __stryke_path_join = require("@stryke/path/join");
|
|
7
|
+
let __stryke_path_replace = require("@stryke/path/replace");
|
|
8
|
+
|
|
9
|
+
//#region src/index.ts
|
|
10
|
+
/**
|
|
11
|
+
* A Powerlines plugin to assist in linting a project with Biome.
|
|
12
|
+
*/
|
|
13
|
+
function plugin(options = {}) {
|
|
14
|
+
return {
|
|
15
|
+
name: "biome",
|
|
16
|
+
async config() {
|
|
17
|
+
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `biome` linting plugin.");
|
|
18
|
+
let configFile = options.configFile;
|
|
19
|
+
if (!configFile) if ((0, __stryke_fs_exists.existsSync)((0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.json"))) configFile = (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.json");
|
|
20
|
+
else if ((0, __stryke_fs_exists.existsSync)((0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.jsonc"))) configFile = (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.jsonc");
|
|
21
|
+
else if ((0, __stryke_fs_exists.existsSync)((0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, "biome.json"))) configFile = (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, "biome.json");
|
|
22
|
+
else if ((0, __stryke_fs_exists.existsSync)((0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, "biome.jsonc"))) configFile = (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, "biome.jsonc");
|
|
23
|
+
else throw new Error(`No Biome configuration file found. Please specify a valid config file path in the Biome plugin's \`configFile\` options.`);
|
|
24
|
+
return { lint: { biome: {
|
|
25
|
+
configFile,
|
|
26
|
+
maxDiagnostics: 20,
|
|
27
|
+
diagnosticLevel: "info",
|
|
28
|
+
fix: true,
|
|
29
|
+
logKind: "pretty",
|
|
30
|
+
format: "stylish",
|
|
31
|
+
vcsEnabled: true,
|
|
32
|
+
vcsDefaultBranch: this.workspaceConfig.branch || "main",
|
|
33
|
+
...options
|
|
34
|
+
} } };
|
|
35
|
+
},
|
|
36
|
+
async lint() {
|
|
37
|
+
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Linting project files with Biome.`);
|
|
38
|
+
const args = [];
|
|
39
|
+
if (this.config.lint.biome.params) args.push(...this.config.lint.biome.params.split(" ").filter(Boolean));
|
|
40
|
+
if (!args.includes("--log-level")) args.push("--log-level", !this.config.logLevel || this.config.logLevel === "trace" || this.config.logLevel === "debug" ? "info" : this.config.logLevel);
|
|
41
|
+
if (!args.includes("--verbose") && (this.config.logLevel === "trace" || this.config.logLevel === "debug" || this.config.mode === "development")) args.push("--verbose");
|
|
42
|
+
if (this.config.lint.biome.fix !== false && !args.includes("--fix")) {
|
|
43
|
+
args.push("--fix");
|
|
44
|
+
if (this.config.lint.biome.fix === "unsafe" && !args.includes("--unsafe")) args.push("--unsafe");
|
|
45
|
+
}
|
|
46
|
+
if (this.config.lint.biome.configFile && !args.includes("--config-path")) args.push("--config-path", this.config.lint.biome.configFile);
|
|
47
|
+
if (this.config.lint.biome.changed && !args.includes("--changed")) args.push("--changed");
|
|
48
|
+
if (this.config.lint.biome.staged && !args.includes("--staged")) args.push("--staged");
|
|
49
|
+
if (this.config.lint.biome.ignorePatterns && !args.includes("--ignore")) args.push("--ignore", Array.isArray(this.config.lint.biome.ignorePatterns) ? this.config.lint.biome.ignorePatterns.join(",") : this.config.lint.biome.ignorePatterns);
|
|
50
|
+
if (this.config.lint.biome.suppress && !args.includes("--suppress")) args.push("--suppress");
|
|
51
|
+
if (this.config.lint.biome.only && !args.includes("--only")) args.push("--only", Array.isArray(this.config.lint.biome.only) ? this.config.lint.biome.only.join(",") : this.config.lint.biome.only);
|
|
52
|
+
if (this.config.lint.biome.skip && !args.includes("--skip")) args.push("--skip", Array.isArray(this.config.lint.biome.skip) ? this.config.lint.biome.skip.join(",") : this.config.lint.biome.skip);
|
|
53
|
+
if (this.config.lint.biome.stdinFilePath && !args.includes("--stdin-file-path")) args.push("--stdin-file-path", this.config.lint.biome.stdinFilePath);
|
|
54
|
+
if (this.config.lint.biome.maxDiagnostics !== void 0 && !args.includes("--max-diagnostics")) args.push("--max-diagnostics", this.config.lint.biome.maxDiagnostics.toString());
|
|
55
|
+
if (this.config.lint.biome.diagnosticLevel && !args.includes("--diagnostic-level")) args.push("--diagnostic-level", this.config.lint.biome.diagnosticLevel);
|
|
56
|
+
if (this.config.lint.biome.errorOnWarnings && !args.includes("--error-on-warnings")) args.push("--error-on-warnings");
|
|
57
|
+
if (this.config.lint.biome.jsonParseAllowComments && !args.includes("--json-parse-allow-comments")) args.push("--json-parse-allow-comments");
|
|
58
|
+
if (this.config.lint.biome.jsonParseAllowTrailingCommas && !args.includes("--json-parse-allow-trailing-commas")) args.push("--json-parse-allow-trailing-commas");
|
|
59
|
+
if (this.config.lint.biome.reporter && !args.includes("--reporter")) args.push("--reporter", this.config.lint.biome.reporter);
|
|
60
|
+
if (this.config.lint.biome.logKind && !args.includes("--log-kind")) args.push("--log-kind", this.config.lint.biome.logKind);
|
|
61
|
+
if (this.config.lint.biome.filesMaxSize && !args.includes("--files-max-size")) args.push("--files-max-size", this.config.lint.biome.filesMaxSize.toString());
|
|
62
|
+
if (this.config.lint.biome.filesIgnoreUnknown && !args.includes("--files-ignore-unknown")) args.push("--files-ignore-unknown");
|
|
63
|
+
if (this.config.lint.biome.vcsEnabled && !args.includes("--vcs-enabled")) {
|
|
64
|
+
args.push("--vcs-enabled");
|
|
65
|
+
if (!args.includes("--vcs-root")) args.push("--vcs-root", this.workspaceConfig.workspaceRoot);
|
|
66
|
+
if (this.config.lint.biome.vcsClientKind && !args.includes("--vcs-client-kind")) args.push("--vcs-client-kind", this.config.lint.biome.vcsClientKind);
|
|
67
|
+
if (this.config.lint.biome.vcsUseIgnoreFile && !args.includes("--vcs-use-ignore-file")) args.push("--vcs-use-ignore-file");
|
|
68
|
+
if (this.config.lint.biome.vcsDefaultBranch && !args.includes("--vcs-default-branch")) args.push("--vcs-default-branch", this.config.lint.biome.vcsDefaultBranch);
|
|
69
|
+
}
|
|
70
|
+
if (!this.config.lint.biome.biomePath) {
|
|
71
|
+
const isBiomeListed = await (0, __stryke_fs_package_fns.isPackageListed)("@biomejs/biome", this.config.projectRoot);
|
|
72
|
+
args.unshift(isBiomeListed ? (0, __stryke_path_replace.replacePath)(this.config.sourceRoot, this.config.projectRoot) : this.config.sourceRoot);
|
|
73
|
+
const result = await (0, __stryke_cli_execute.executePackage)("biome", args, isBiomeListed ? (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.projectRoot) : this.config.projectRoot);
|
|
74
|
+
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
75
|
+
} else {
|
|
76
|
+
args.unshift(this.config.lint.biome.biomePath, this.config.sourceRoot);
|
|
77
|
+
const result = await (0, __stryke_cli_execute.execute)(args.join(" "), this.workspaceConfig.workspaceRoot);
|
|
78
|
+
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
var src_default = plugin;
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
exports.default = src_default;
|
|
87
|
+
exports.plugin = plugin;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,85 @@
|
|
|
1
|
-
import{LogLevelLabel
|
|
1
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
2
|
+
import { execute, executePackage } from "@stryke/cli/execute";
|
|
3
|
+
import { existsSync } from "@stryke/fs/exists";
|
|
4
|
+
import { isPackageListed } from "@stryke/fs/package-fns";
|
|
5
|
+
import { joinPaths } from "@stryke/path/join";
|
|
6
|
+
import { replacePath } from "@stryke/path/replace";
|
|
7
|
+
|
|
8
|
+
//#region src/index.ts
|
|
9
|
+
/**
|
|
10
|
+
* A Powerlines plugin to assist in linting a project with Biome.
|
|
11
|
+
*/
|
|
12
|
+
function plugin(options = {}) {
|
|
13
|
+
return {
|
|
14
|
+
name: "biome",
|
|
15
|
+
async config() {
|
|
16
|
+
this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `biome` linting plugin.");
|
|
17
|
+
let configFile = options.configFile;
|
|
18
|
+
if (!configFile) if (existsSync(joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.json"))) configFile = joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.json");
|
|
19
|
+
else if (existsSync(joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.jsonc"))) configFile = joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "biome.jsonc");
|
|
20
|
+
else if (existsSync(joinPaths(this.workspaceConfig.workspaceRoot, "biome.json"))) configFile = joinPaths(this.workspaceConfig.workspaceRoot, "biome.json");
|
|
21
|
+
else if (existsSync(joinPaths(this.workspaceConfig.workspaceRoot, "biome.jsonc"))) configFile = joinPaths(this.workspaceConfig.workspaceRoot, "biome.jsonc");
|
|
22
|
+
else throw new Error(`No Biome configuration file found. Please specify a valid config file path in the Biome plugin's \`configFile\` options.`);
|
|
23
|
+
return { lint: { biome: {
|
|
24
|
+
configFile,
|
|
25
|
+
maxDiagnostics: 20,
|
|
26
|
+
diagnosticLevel: "info",
|
|
27
|
+
fix: true,
|
|
28
|
+
logKind: "pretty",
|
|
29
|
+
format: "stylish",
|
|
30
|
+
vcsEnabled: true,
|
|
31
|
+
vcsDefaultBranch: this.workspaceConfig.branch || "main",
|
|
32
|
+
...options
|
|
33
|
+
} } };
|
|
34
|
+
},
|
|
35
|
+
async lint() {
|
|
36
|
+
this.log(LogLevelLabel.TRACE, `Linting project files with Biome.`);
|
|
37
|
+
const args = [];
|
|
38
|
+
if (this.config.lint.biome.params) args.push(...this.config.lint.biome.params.split(" ").filter(Boolean));
|
|
39
|
+
if (!args.includes("--log-level")) args.push("--log-level", !this.config.logLevel || this.config.logLevel === "trace" || this.config.logLevel === "debug" ? "info" : this.config.logLevel);
|
|
40
|
+
if (!args.includes("--verbose") && (this.config.logLevel === "trace" || this.config.logLevel === "debug" || this.config.mode === "development")) args.push("--verbose");
|
|
41
|
+
if (this.config.lint.biome.fix !== false && !args.includes("--fix")) {
|
|
42
|
+
args.push("--fix");
|
|
43
|
+
if (this.config.lint.biome.fix === "unsafe" && !args.includes("--unsafe")) args.push("--unsafe");
|
|
44
|
+
}
|
|
45
|
+
if (this.config.lint.biome.configFile && !args.includes("--config-path")) args.push("--config-path", this.config.lint.biome.configFile);
|
|
46
|
+
if (this.config.lint.biome.changed && !args.includes("--changed")) args.push("--changed");
|
|
47
|
+
if (this.config.lint.biome.staged && !args.includes("--staged")) args.push("--staged");
|
|
48
|
+
if (this.config.lint.biome.ignorePatterns && !args.includes("--ignore")) args.push("--ignore", Array.isArray(this.config.lint.biome.ignorePatterns) ? this.config.lint.biome.ignorePatterns.join(",") : this.config.lint.biome.ignorePatterns);
|
|
49
|
+
if (this.config.lint.biome.suppress && !args.includes("--suppress")) args.push("--suppress");
|
|
50
|
+
if (this.config.lint.biome.only && !args.includes("--only")) args.push("--only", Array.isArray(this.config.lint.biome.only) ? this.config.lint.biome.only.join(",") : this.config.lint.biome.only);
|
|
51
|
+
if (this.config.lint.biome.skip && !args.includes("--skip")) args.push("--skip", Array.isArray(this.config.lint.biome.skip) ? this.config.lint.biome.skip.join(",") : this.config.lint.biome.skip);
|
|
52
|
+
if (this.config.lint.biome.stdinFilePath && !args.includes("--stdin-file-path")) args.push("--stdin-file-path", this.config.lint.biome.stdinFilePath);
|
|
53
|
+
if (this.config.lint.biome.maxDiagnostics !== void 0 && !args.includes("--max-diagnostics")) args.push("--max-diagnostics", this.config.lint.biome.maxDiagnostics.toString());
|
|
54
|
+
if (this.config.lint.biome.diagnosticLevel && !args.includes("--diagnostic-level")) args.push("--diagnostic-level", this.config.lint.biome.diagnosticLevel);
|
|
55
|
+
if (this.config.lint.biome.errorOnWarnings && !args.includes("--error-on-warnings")) args.push("--error-on-warnings");
|
|
56
|
+
if (this.config.lint.biome.jsonParseAllowComments && !args.includes("--json-parse-allow-comments")) args.push("--json-parse-allow-comments");
|
|
57
|
+
if (this.config.lint.biome.jsonParseAllowTrailingCommas && !args.includes("--json-parse-allow-trailing-commas")) args.push("--json-parse-allow-trailing-commas");
|
|
58
|
+
if (this.config.lint.biome.reporter && !args.includes("--reporter")) args.push("--reporter", this.config.lint.biome.reporter);
|
|
59
|
+
if (this.config.lint.biome.logKind && !args.includes("--log-kind")) args.push("--log-kind", this.config.lint.biome.logKind);
|
|
60
|
+
if (this.config.lint.biome.filesMaxSize && !args.includes("--files-max-size")) args.push("--files-max-size", this.config.lint.biome.filesMaxSize.toString());
|
|
61
|
+
if (this.config.lint.biome.filesIgnoreUnknown && !args.includes("--files-ignore-unknown")) args.push("--files-ignore-unknown");
|
|
62
|
+
if (this.config.lint.biome.vcsEnabled && !args.includes("--vcs-enabled")) {
|
|
63
|
+
args.push("--vcs-enabled");
|
|
64
|
+
if (!args.includes("--vcs-root")) args.push("--vcs-root", this.workspaceConfig.workspaceRoot);
|
|
65
|
+
if (this.config.lint.biome.vcsClientKind && !args.includes("--vcs-client-kind")) args.push("--vcs-client-kind", this.config.lint.biome.vcsClientKind);
|
|
66
|
+
if (this.config.lint.biome.vcsUseIgnoreFile && !args.includes("--vcs-use-ignore-file")) args.push("--vcs-use-ignore-file");
|
|
67
|
+
if (this.config.lint.biome.vcsDefaultBranch && !args.includes("--vcs-default-branch")) args.push("--vcs-default-branch", this.config.lint.biome.vcsDefaultBranch);
|
|
68
|
+
}
|
|
69
|
+
if (!this.config.lint.biome.biomePath) {
|
|
70
|
+
const isBiomeListed = await isPackageListed("@biomejs/biome", this.config.projectRoot);
|
|
71
|
+
args.unshift(isBiomeListed ? replacePath(this.config.sourceRoot, this.config.projectRoot) : this.config.sourceRoot);
|
|
72
|
+
const result = await executePackage("biome", args, isBiomeListed ? joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot) : this.config.projectRoot);
|
|
73
|
+
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
74
|
+
} else {
|
|
75
|
+
args.unshift(this.config.lint.biome.biomePath, this.config.sourceRoot);
|
|
76
|
+
const result = await execute(args.join(" "), this.workspaceConfig.workspaceRoot);
|
|
77
|
+
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
var src_default = plugin;
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
export { src_default as default, plugin };
|
|
@@ -78,10 +78,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
78
78
|
*/
|
|
79
79
|
allowReturnOutsideFunction?: boolean;
|
|
80
80
|
}
|
|
81
|
+
interface EmitOptions extends WriteOptions {
|
|
82
|
+
/**
|
|
83
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
84
|
+
*/
|
|
85
|
+
emitWithBundler?: boolean;
|
|
86
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
87
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
88
|
+
}
|
|
81
89
|
/**
|
|
82
90
|
* Options for emitting entry virtual files
|
|
83
91
|
*/
|
|
84
|
-
type EmitEntryOptions =
|
|
92
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
85
93
|
/**
|
|
86
94
|
* The unresolved Powerlines context.
|
|
87
95
|
*
|
|
@@ -292,6 +300,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
292
300
|
* The Powerlines builtin virtual files
|
|
293
301
|
*/
|
|
294
302
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
303
|
+
/**
|
|
304
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
305
|
+
*
|
|
306
|
+
* @param code - The source code of the file
|
|
307
|
+
* @param path - The path to write the file to
|
|
308
|
+
* @param options - Additional options for writing the file
|
|
309
|
+
*/
|
|
310
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
311
|
+
/**
|
|
312
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
313
|
+
*
|
|
314
|
+
* @param code - The source code of the file
|
|
315
|
+
* @param path - The path to write the file to
|
|
316
|
+
* @param options - Additional options for writing the file
|
|
317
|
+
*/
|
|
318
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
295
319
|
/**
|
|
296
320
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
297
321
|
*
|
|
@@ -300,7 +324,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
300
324
|
* @param path - An optional path to write the builtin file to
|
|
301
325
|
* @param options - Additional options for writing the builtin file
|
|
302
326
|
*/
|
|
303
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
327
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
304
328
|
/**
|
|
305
329
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
306
330
|
*
|
|
@@ -309,7 +333,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
309
333
|
* @param path - An optional path to write the builtin file to
|
|
310
334
|
* @param options - Additional options for writing the builtin file
|
|
311
335
|
*/
|
|
312
|
-
emitBuiltinSync: (code: string, id: string, path?: string, options?:
|
|
336
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
313
337
|
/**
|
|
314
338
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
315
339
|
*
|
|
@@ -80,10 +80,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
80
80
|
*/
|
|
81
81
|
allowReturnOutsideFunction?: boolean;
|
|
82
82
|
}
|
|
83
|
+
interface EmitOptions extends WriteOptions {
|
|
84
|
+
/**
|
|
85
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
86
|
+
*/
|
|
87
|
+
emitWithBundler?: boolean;
|
|
88
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
89
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
90
|
+
}
|
|
83
91
|
/**
|
|
84
92
|
* Options for emitting entry virtual files
|
|
85
93
|
*/
|
|
86
|
-
type EmitEntryOptions =
|
|
94
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
87
95
|
/**
|
|
88
96
|
* The unresolved Powerlines context.
|
|
89
97
|
*
|
|
@@ -294,6 +302,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
294
302
|
* The Powerlines builtin virtual files
|
|
295
303
|
*/
|
|
296
304
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
305
|
+
/**
|
|
306
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
307
|
+
*
|
|
308
|
+
* @param code - The source code of the file
|
|
309
|
+
* @param path - The path to write the file to
|
|
310
|
+
* @param options - Additional options for writing the file
|
|
311
|
+
*/
|
|
312
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
315
|
+
*
|
|
316
|
+
* @param code - The source code of the file
|
|
317
|
+
* @param path - The path to write the file to
|
|
318
|
+
* @param options - Additional options for writing the file
|
|
319
|
+
*/
|
|
320
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
297
321
|
/**
|
|
298
322
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
299
323
|
*
|
|
@@ -302,7 +326,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
302
326
|
* @param path - An optional path to write the builtin file to
|
|
303
327
|
* @param options - Additional options for writing the builtin file
|
|
304
328
|
*/
|
|
305
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
329
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
306
330
|
/**
|
|
307
331
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
308
332
|
*
|
|
@@ -311,7 +335,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
311
335
|
* @param path - An optional path to write the builtin file to
|
|
312
336
|
* @param options - Additional options for writing the builtin file
|
|
313
337
|
*/
|
|
314
|
-
emitBuiltinSync: (code: string, id: string, path?: string, options?:
|
|
338
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
315
339
|
/**
|
|
316
340
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
317
341
|
*
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-biome",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.125",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running Biome linting on the codebase.",
|
|
6
6
|
"repository": {
|
|
@@ -102,20 +102,20 @@
|
|
|
102
102
|
"peerDependencies": { "@biomejs/biome": ">=2.0.0" },
|
|
103
103
|
"peerDependenciesMeta": { "@biomejs/biome": { "optional": false } },
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@storm-software/config-tools": "^1.188.
|
|
106
|
-
"@stryke/cli": "^0.12.
|
|
107
|
-
"@stryke/convert": "^0.6.
|
|
108
|
-
"@stryke/fs": "^0.33.
|
|
109
|
-
"@stryke/path": "^0.24.
|
|
105
|
+
"@storm-software/config-tools": "^1.188.75",
|
|
106
|
+
"@stryke/cli": "^0.12.37",
|
|
107
|
+
"@stryke/convert": "^0.6.30",
|
|
108
|
+
"@stryke/fs": "^0.33.27",
|
|
109
|
+
"@stryke/path": "^0.24.1",
|
|
110
110
|
"defu": "^6.1.4",
|
|
111
|
-
"powerlines": "^0.36.
|
|
111
|
+
"powerlines": "^0.36.24"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@biomejs/biome": "^2.3.10",
|
|
115
|
-
"@powerlines/nx": "^0.11.
|
|
116
|
-
"@storm-software/tsup": "^0.2.
|
|
115
|
+
"@powerlines/nx": "^0.11.50",
|
|
116
|
+
"@storm-software/tsup": "^0.2.73",
|
|
117
117
|
"@types/node": "^24.10.4"
|
|
118
118
|
},
|
|
119
119
|
"publishConfig": { "access": "public" },
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "4b695d4b3476fd9dd79521f92258d52dab2b8d72"
|
|
121
121
|
}
|