@powerlines/plugin-biome 0.2.406 → 0.2.408
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 +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/plugin.d.cts +5 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +5 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -14,10 +14,10 @@ function plugin(options = {}) {
|
|
|
14
14
|
async config() {
|
|
15
15
|
this.debug("Providing default configuration for the Powerlines `biome` linting plugin.");
|
|
16
16
|
let configFile = options.configFile;
|
|
17
|
-
if (!configFile) if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.
|
|
18
|
-
else if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.
|
|
19
|
-
else if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.
|
|
20
|
-
else if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.
|
|
17
|
+
if (!configFile) if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", this.config.root, "biome.json"))) configFile = (0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", this.config.root, "biome.json");
|
|
18
|
+
else if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", this.config.root, "biome.jsonc"))) configFile = (0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", this.config.root, "biome.jsonc");
|
|
19
|
+
else if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", "biome.json"))) configFile = (0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", "biome.json");
|
|
20
|
+
else if ((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", "biome.jsonc"))) configFile = (0, _stryke_path_join.joinPaths)(this.config.cwd ?? "./", "biome.jsonc");
|
|
21
21
|
else throw new Error(`No Biome configuration file found. Please specify a valid config file path in the Biome plugin's \`configFile\` options.`);
|
|
22
22
|
return { biome: {
|
|
23
23
|
configFile,
|
|
@@ -27,7 +27,7 @@ function plugin(options = {}) {
|
|
|
27
27
|
logKind: "pretty",
|
|
28
28
|
format: "stylish",
|
|
29
29
|
vcsEnabled: true,
|
|
30
|
-
vcsDefaultBranch:
|
|
30
|
+
vcsDefaultBranch: "main",
|
|
31
31
|
...options
|
|
32
32
|
} };
|
|
33
33
|
},
|
|
@@ -60,7 +60,7 @@ function plugin(options = {}) {
|
|
|
60
60
|
if (this.config.biome.filesIgnoreUnknown && !args.includes("--files-ignore-unknown")) args.push("--files-ignore-unknown");
|
|
61
61
|
if (this.config.biome.vcsEnabled && !args.includes("--vcs-enabled")) {
|
|
62
62
|
args.push("--vcs-enabled");
|
|
63
|
-
if (!args.includes("--vcs-root")) args.push("--vcs-root", this.
|
|
63
|
+
if (!args.includes("--vcs-root")) args.push("--vcs-root", this.config.cwd);
|
|
64
64
|
if (this.config.biome.vcsClientKind && !args.includes("--vcs-client-kind")) args.push("--vcs-client-kind", this.config.biome.vcsClientKind);
|
|
65
65
|
if (this.config.biome.vcsUseIgnoreFile && !args.includes("--vcs-use-ignore-file")) args.push("--vcs-use-ignore-file");
|
|
66
66
|
if (this.config.biome.vcsDefaultBranch && !args.includes("--vcs-default-branch")) args.push("--vcs-default-branch", this.config.biome.vcsDefaultBranch);
|
|
@@ -68,11 +68,11 @@ function plugin(options = {}) {
|
|
|
68
68
|
if (!this.config.biome.biomePath) {
|
|
69
69
|
const isBiomeListed = await (0, _stryke_fs_package_fns.isPackageListed)("@biomejs/biome", this.config.root);
|
|
70
70
|
args.unshift(isBiomeListed ? "./" : (0, _stryke_path_join.joinPaths)(this.config.root, "src"));
|
|
71
|
-
const result = await (0, _stryke_cli_execute.executePackage)("biome", args, isBiomeListed ? (0, _stryke_path_join.joinPaths)(this.
|
|
71
|
+
const result = await (0, _stryke_cli_execute.executePackage)("biome", args, isBiomeListed ? (0, _stryke_path_join.joinPaths)(this.config.cwd, this.config.root) : this.config.root);
|
|
72
72
|
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
73
73
|
} else {
|
|
74
74
|
args.unshift(this.config.biome.biomePath, (0, _stryke_path_join.joinPaths)(this.config.root, "src"));
|
|
75
|
-
const result = await (0, _stryke_cli_execute.execute)(args.join(" "), this.
|
|
75
|
+
const result = await (0, _stryke_cli_execute.execute)(args.join(" "), this.config.cwd);
|
|
76
76
|
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
77
77
|
}
|
|
78
78
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig } from "./types/plugin.cjs";
|
|
1
|
+
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig } from "./types/plugin.cjs";
|
|
2
2
|
import { Plugin } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
@@ -12,5 +12,5 @@ declare module "powerlines" {
|
|
|
12
12
|
*/
|
|
13
13
|
declare function plugin(options?: BiomePluginOptions): Plugin<BiomePluginContext>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, plugin as default, plugin };
|
|
15
|
+
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig, plugin as default, plugin };
|
|
16
16
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YA4BY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;iBAOI,MAAA,CACd,OAAA,GAAS,kBAAA,GACR,MAAA,CAAO,kBAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig } from "./types/plugin.mjs";
|
|
1
|
+
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig } from "./types/plugin.mjs";
|
|
2
2
|
import { Plugin } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
@@ -12,5 +12,5 @@ declare module "powerlines" {
|
|
|
12
12
|
*/
|
|
13
13
|
declare function plugin(options?: BiomePluginOptions): Plugin<BiomePluginContext>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, plugin as default, plugin };
|
|
15
|
+
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig, plugin as default, plugin };
|
|
16
16
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YA4BY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;iBAOI,MAAA,CACd,OAAA,GAAS,kBAAA,GACR,MAAA,CAAO,kBAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -13,10 +13,10 @@ function plugin(options = {}) {
|
|
|
13
13
|
async config() {
|
|
14
14
|
this.debug("Providing default configuration for the Powerlines `biome` linting plugin.");
|
|
15
15
|
let configFile = options.configFile;
|
|
16
|
-
if (!configFile) if (existsSync(joinPaths(this.
|
|
17
|
-
else if (existsSync(joinPaths(this.
|
|
18
|
-
else if (existsSync(joinPaths(this.
|
|
19
|
-
else if (existsSync(joinPaths(this.
|
|
16
|
+
if (!configFile) if (existsSync(joinPaths(this.config.cwd ?? "./", this.config.root, "biome.json"))) configFile = joinPaths(this.config.cwd ?? "./", this.config.root, "biome.json");
|
|
17
|
+
else if (existsSync(joinPaths(this.config.cwd ?? "./", this.config.root, "biome.jsonc"))) configFile = joinPaths(this.config.cwd ?? "./", this.config.root, "biome.jsonc");
|
|
18
|
+
else if (existsSync(joinPaths(this.config.cwd ?? "./", "biome.json"))) configFile = joinPaths(this.config.cwd ?? "./", "biome.json");
|
|
19
|
+
else if (existsSync(joinPaths(this.config.cwd ?? "./", "biome.jsonc"))) configFile = joinPaths(this.config.cwd ?? "./", "biome.jsonc");
|
|
20
20
|
else throw new Error(`No Biome configuration file found. Please specify a valid config file path in the Biome plugin's \`configFile\` options.`);
|
|
21
21
|
return { biome: {
|
|
22
22
|
configFile,
|
|
@@ -26,7 +26,7 @@ function plugin(options = {}) {
|
|
|
26
26
|
logKind: "pretty",
|
|
27
27
|
format: "stylish",
|
|
28
28
|
vcsEnabled: true,
|
|
29
|
-
vcsDefaultBranch:
|
|
29
|
+
vcsDefaultBranch: "main",
|
|
30
30
|
...options
|
|
31
31
|
} };
|
|
32
32
|
},
|
|
@@ -59,7 +59,7 @@ function plugin(options = {}) {
|
|
|
59
59
|
if (this.config.biome.filesIgnoreUnknown && !args.includes("--files-ignore-unknown")) args.push("--files-ignore-unknown");
|
|
60
60
|
if (this.config.biome.vcsEnabled && !args.includes("--vcs-enabled")) {
|
|
61
61
|
args.push("--vcs-enabled");
|
|
62
|
-
if (!args.includes("--vcs-root")) args.push("--vcs-root", this.
|
|
62
|
+
if (!args.includes("--vcs-root")) args.push("--vcs-root", this.config.cwd);
|
|
63
63
|
if (this.config.biome.vcsClientKind && !args.includes("--vcs-client-kind")) args.push("--vcs-client-kind", this.config.biome.vcsClientKind);
|
|
64
64
|
if (this.config.biome.vcsUseIgnoreFile && !args.includes("--vcs-use-ignore-file")) args.push("--vcs-use-ignore-file");
|
|
65
65
|
if (this.config.biome.vcsDefaultBranch && !args.includes("--vcs-default-branch")) args.push("--vcs-default-branch", this.config.biome.vcsDefaultBranch);
|
|
@@ -67,11 +67,11 @@ function plugin(options = {}) {
|
|
|
67
67
|
if (!this.config.biome.biomePath) {
|
|
68
68
|
const isBiomeListed = await isPackageListed("@biomejs/biome", this.config.root);
|
|
69
69
|
args.unshift(isBiomeListed ? "./" : joinPaths(this.config.root, "src"));
|
|
70
|
-
const result = await executePackage("biome", args, isBiomeListed ? joinPaths(this.
|
|
70
|
+
const result = await executePackage("biome", args, isBiomeListed ? joinPaths(this.config.cwd, this.config.root) : this.config.root);
|
|
71
71
|
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
72
72
|
} else {
|
|
73
73
|
args.unshift(this.config.biome.biomePath, joinPaths(this.config.root, "src"));
|
|
74
|
-
const result = await execute(args.join(" "), this.
|
|
74
|
+
const result = await execute(args.join(" "), this.config.cwd);
|
|
75
75
|
if (result.failed) throw new Error(`Biome process exited with code ${result.exitCode}.`);
|
|
76
76
|
}
|
|
77
77
|
}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { execute, executePackage } from \"@stryke/cli/execute\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { isPackageListed } from \"@stryke/fs/package-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { Plugin } from \"powerlines\";\nimport {\n BiomePluginContext,\n BiomePluginOptions,\n BiomePluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n biome?: BiomePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in linting a project with Biome.\n */\nexport function plugin(\n options: BiomePluginOptions = {}\n): Plugin<BiomePluginContext> {\n return {\n name: \"biome\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `biome` linting plugin.\"\n );\n\n let configFile = options.configFile;\n if (!configFile) {\n if (\n existsSync(\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"biome.json\"\n )\n )\n ) {\n configFile = joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"biome.json\"\n );\n } else if (\n existsSync(\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"biome.jsonc\"\n )\n )\n ) {\n configFile = joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"biome.jsonc\"\n );\n } else if (\n existsSync(\n joinPaths(this.workspaceConfig.workspaceRoot, \"biome.json\")\n )\n ) {\n configFile = joinPaths(\n this.workspaceConfig.workspaceRoot,\n \"biome.json\"\n );\n } else if (\n existsSync(\n joinPaths(this.workspaceConfig.workspaceRoot, \"biome.jsonc\")\n )\n ) {\n configFile = joinPaths(\n this.workspaceConfig.workspaceRoot,\n \"biome.jsonc\"\n );\n } else {\n throw new Error(\n `No Biome configuration file found. Please specify a valid config file path in the Biome plugin's \\`configFile\\` options.`\n );\n }\n }\n\n return {\n biome: {\n configFile,\n maxDiagnostics: 20,\n diagnosticLevel: \"info\",\n fix: true,\n logKind: \"pretty\",\n format: \"stylish\",\n vcsEnabled: true,\n vcsDefaultBranch: this.workspaceConfig.branch || \"main\",\n ...options\n }\n } as BiomePluginUserConfig;\n },\n async lint() {\n this.debug(`Linting project files with Biome.`);\n\n const args: string[] = [];\n\n if (this.config.biome.params) {\n args.push(...this.config.biome.params.split(\" \").filter(Boolean));\n }\n\n if (!args.includes(\"--log-level\")) {\n args.push(\n \"--log-level\",\n !this.config.logLevel ||\n this.config.logLevel === \"trace\" ||\n this.config.logLevel === \"debug\"\n ? \"info\"\n : this.config.logLevel\n );\n }\n\n if (\n !args.includes(\"--verbose\") &&\n (this.config.logLevel === \"trace\" ||\n this.config.logLevel === \"debug\" ||\n this.config.mode === \"development\")\n ) {\n args.push(\"--verbose\");\n }\n\n if (this.config.biome.fix !== false && !args.includes(\"--fix\")) {\n args.push(\"--fix\");\n if (this.config.biome.fix === \"unsafe\" && !args.includes(\"--unsafe\")) {\n args.push(\"--unsafe\");\n }\n }\n\n if (this.config.biome.configFile && !args.includes(\"--config-path\")) {\n args.push(\"--config-path\", this.config.biome.configFile);\n }\n\n if (this.config.biome.changed && !args.includes(\"--changed\")) {\n args.push(\"--changed\");\n }\n\n if (this.config.biome.staged && !args.includes(\"--staged\")) {\n args.push(\"--staged\");\n }\n\n if (this.config.biome.ignorePatterns && !args.includes(\"--ignore\")) {\n args.push(\n \"--ignore\",\n Array.isArray(this.config.biome.ignorePatterns)\n ? this.config.biome.ignorePatterns.join(\",\")\n : this.config.biome.ignorePatterns\n );\n }\n\n if (this.config.biome.suppress && !args.includes(\"--suppress\")) {\n args.push(\"--suppress\");\n }\n\n if (this.config.biome.only && !args.includes(\"--only\")) {\n args.push(\n \"--only\",\n Array.isArray(this.config.biome.only)\n ? this.config.biome.only.join(\",\")\n : this.config.biome.only\n );\n }\n\n if (this.config.biome.skip && !args.includes(\"--skip\")) {\n args.push(\n \"--skip\",\n Array.isArray(this.config.biome.skip)\n ? this.config.biome.skip.join(\",\")\n : this.config.biome.skip\n );\n }\n\n if (\n this.config.biome.stdinFilePath &&\n !args.includes(\"--stdin-file-path\")\n ) {\n args.push(\"--stdin-file-path\", this.config.biome.stdinFilePath);\n }\n\n if (\n this.config.biome.maxDiagnostics !== undefined &&\n !args.includes(\"--max-diagnostics\")\n ) {\n args.push(\n \"--max-diagnostics\",\n this.config.biome.maxDiagnostics.toString()\n );\n }\n\n if (\n this.config.biome.diagnosticLevel &&\n !args.includes(\"--diagnostic-level\")\n ) {\n args.push(\"--diagnostic-level\", this.config.biome.diagnosticLevel);\n }\n\n if (\n this.config.biome.errorOnWarnings &&\n !args.includes(\"--error-on-warnings\")\n ) {\n args.push(\"--error-on-warnings\");\n }\n\n if (\n this.config.biome.jsonParseAllowComments &&\n !args.includes(\"--json-parse-allow-comments\")\n ) {\n args.push(\"--json-parse-allow-comments\");\n }\n\n if (\n this.config.biome.jsonParseAllowTrailingCommas &&\n !args.includes(\"--json-parse-allow-trailing-commas\")\n ) {\n args.push(\"--json-parse-allow-trailing-commas\");\n }\n\n if (this.config.biome.reporter && !args.includes(\"--reporter\")) {\n args.push(\"--reporter\", this.config.biome.reporter);\n }\n\n if (this.config.biome.logKind && !args.includes(\"--log-kind\")) {\n args.push(\"--log-kind\", this.config.biome.logKind);\n }\n\n if (\n this.config.biome.filesMaxSize &&\n !args.includes(\"--files-max-size\")\n ) {\n args.push(\n \"--files-max-size\",\n this.config.biome.filesMaxSize.toString()\n );\n }\n\n if (\n this.config.biome.filesIgnoreUnknown &&\n !args.includes(\"--files-ignore-unknown\")\n ) {\n args.push(\"--files-ignore-unknown\");\n }\n\n if (this.config.biome.vcsEnabled && !args.includes(\"--vcs-enabled\")) {\n args.push(\"--vcs-enabled\");\n\n if (!args.includes(\"--vcs-root\")) {\n args.push(\"--vcs-root\", this.workspaceConfig.workspaceRoot);\n }\n\n if (\n this.config.biome.vcsClientKind &&\n !args.includes(\"--vcs-client-kind\")\n ) {\n args.push(\"--vcs-client-kind\", this.config.biome.vcsClientKind);\n }\n\n if (\n this.config.biome.vcsUseIgnoreFile &&\n !args.includes(\"--vcs-use-ignore-file\")\n ) {\n args.push(\"--vcs-use-ignore-file\");\n }\n\n if (\n this.config.biome.vcsDefaultBranch &&\n !args.includes(\"--vcs-default-branch\")\n ) {\n args.push(\"--vcs-default-branch\", this.config.biome.vcsDefaultBranch);\n }\n }\n\n if (!this.config.biome.biomePath) {\n const isBiomeListed = await isPackageListed(\n \"@biomejs/biome\",\n this.config.root\n );\n\n args.unshift(isBiomeListed ? \"./\" : joinPaths(this.config.root, \"src\"));\n\n const result = await executePackage(\n \"biome\",\n args,\n isBiomeListed\n ? joinPaths(this.workspaceConfig.workspaceRoot, this.config.root)\n : this.config.root\n );\n if (result.failed) {\n throw new Error(`Biome process exited with code ${result.exitCode}.`);\n }\n } else {\n args.unshift(\n this.config.biome.biomePath,\n joinPaths(this.config.root, \"src\")\n );\n\n const result = await execute(\n args.join(\" \"),\n this.workspaceConfig.workspaceRoot\n );\n if (result.failed) {\n throw new Error(`Biome process exited with code ${result.exitCode}.`);\n }\n }\n }\n };\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;;AAwCA,SAAgB,OACd,UAA8B,EAAE,EACJ;AAC5B,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,QAAK,MACH,6EACD;GAED,IAAI,aAAa,QAAQ;AACzB,OAAI,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wBAAwB;AAGpC,QACE,KAAK,OAAO,MAAM,oBAClB,CAAC,KAAK,SAAS,uBAAuB,CAEtC,MAAK,KAAK,wBAAwB,KAAK,OAAO,MAAM,iBAAiB;;AAIzE,OAAI,CAAC,KAAK,OAAO,MAAM,WAAW;IAChC,MAAM,gBAAgB,MAAM,gBAC1B,kBACA,KAAK,OAAO,KACb;AAED,SAAK,QAAQ,gBAAgB,OAAO,UAAU,KAAK,OAAO,MAAM,MAAM,CAAC;IAEvE,MAAM,SAAS,MAAM,eACnB,SACA,MACA,gBACI,UAAU,KAAK,gBAAgB,eAAe,KAAK,OAAO,KAAK,GAC/D,KAAK,OAAO,KACjB;AACD,QAAI,OAAO,OACT,OAAM,IAAI,MAAM,kCAAkC,OAAO,SAAS,GAAG;UAElE;AACL,SAAK,QACH,KAAK,OAAO,MAAM,WAClB,UAAU,KAAK,OAAO,MAAM,MAAM,CACnC;IAED,MAAM,SAAS,MAAM,QACnB,KAAK,KAAK,IAAI,EACd,KAAK,gBAAgB,cACtB;AACD,QAAI,OAAO,OACT,OAAM,IAAI,MAAM,kCAAkC,OAAO,SAAS,GAAG;;;EAI5E"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { execute, executePackage } from \"@stryke/cli/execute\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { isPackageListed } from \"@stryke/fs/package-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { Plugin } from \"powerlines\";\nimport { BiomePluginContext, BiomePluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n biome?: BiomePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in linting a project with Biome.\n */\nexport function plugin(\n options: BiomePluginOptions = {}\n): Plugin<BiomePluginContext> {\n return {\n name: \"biome\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `biome` linting plugin.\"\n );\n\n let configFile = options.configFile;\n if (!configFile) {\n if (\n existsSync(\n joinPaths(this.config.cwd ?? \"./\", this.config.root, \"biome.json\")\n )\n ) {\n configFile = joinPaths(\n this.config.cwd ?? \"./\",\n this.config.root,\n \"biome.json\"\n );\n } else if (\n existsSync(\n joinPaths(this.config.cwd ?? \"./\", this.config.root, \"biome.jsonc\")\n )\n ) {\n configFile = joinPaths(\n this.config.cwd ?? \"./\",\n this.config.root,\n \"biome.jsonc\"\n );\n } else if (\n existsSync(joinPaths(this.config.cwd ?? \"./\", \"biome.json\"))\n ) {\n configFile = joinPaths(this.config.cwd ?? \"./\", \"biome.json\");\n } else if (\n existsSync(joinPaths(this.config.cwd ?? \"./\", \"biome.jsonc\"))\n ) {\n configFile = joinPaths(this.config.cwd ?? \"./\", \"biome.jsonc\");\n } else {\n throw new Error(\n `No Biome configuration file found. Please specify a valid config file path in the Biome plugin's \\`configFile\\` options.`\n );\n }\n }\n\n return {\n biome: {\n configFile,\n maxDiagnostics: 20,\n diagnosticLevel: \"info\",\n fix: true,\n logKind: \"pretty\",\n format: \"stylish\",\n vcsEnabled: true,\n vcsDefaultBranch: \"main\",\n ...options\n }\n };\n },\n async lint() {\n this.debug(`Linting project files with Biome.`);\n\n const args: string[] = [];\n\n if (this.config.biome.params) {\n args.push(...this.config.biome.params.split(\" \").filter(Boolean));\n }\n\n if (!args.includes(\"--log-level\")) {\n args.push(\n \"--log-level\",\n !this.config.logLevel ||\n this.config.logLevel === \"trace\" ||\n this.config.logLevel === \"debug\"\n ? \"info\"\n : this.config.logLevel\n );\n }\n\n if (\n !args.includes(\"--verbose\") &&\n (this.config.logLevel === \"trace\" ||\n this.config.logLevel === \"debug\" ||\n this.config.mode === \"development\")\n ) {\n args.push(\"--verbose\");\n }\n\n if (this.config.biome.fix !== false && !args.includes(\"--fix\")) {\n args.push(\"--fix\");\n if (this.config.biome.fix === \"unsafe\" && !args.includes(\"--unsafe\")) {\n args.push(\"--unsafe\");\n }\n }\n\n if (this.config.biome.configFile && !args.includes(\"--config-path\")) {\n args.push(\"--config-path\", this.config.biome.configFile);\n }\n\n if (this.config.biome.changed && !args.includes(\"--changed\")) {\n args.push(\"--changed\");\n }\n\n if (this.config.biome.staged && !args.includes(\"--staged\")) {\n args.push(\"--staged\");\n }\n\n if (this.config.biome.ignorePatterns && !args.includes(\"--ignore\")) {\n args.push(\n \"--ignore\",\n Array.isArray(this.config.biome.ignorePatterns)\n ? this.config.biome.ignorePatterns.join(\",\")\n : this.config.biome.ignorePatterns\n );\n }\n\n if (this.config.biome.suppress && !args.includes(\"--suppress\")) {\n args.push(\"--suppress\");\n }\n\n if (this.config.biome.only && !args.includes(\"--only\")) {\n args.push(\n \"--only\",\n Array.isArray(this.config.biome.only)\n ? this.config.biome.only.join(\",\")\n : this.config.biome.only\n );\n }\n\n if (this.config.biome.skip && !args.includes(\"--skip\")) {\n args.push(\n \"--skip\",\n Array.isArray(this.config.biome.skip)\n ? this.config.biome.skip.join(\",\")\n : this.config.biome.skip\n );\n }\n\n if (\n this.config.biome.stdinFilePath &&\n !args.includes(\"--stdin-file-path\")\n ) {\n args.push(\"--stdin-file-path\", this.config.biome.stdinFilePath);\n }\n\n if (\n this.config.biome.maxDiagnostics !== undefined &&\n !args.includes(\"--max-diagnostics\")\n ) {\n args.push(\n \"--max-diagnostics\",\n this.config.biome.maxDiagnostics.toString()\n );\n }\n\n if (\n this.config.biome.diagnosticLevel &&\n !args.includes(\"--diagnostic-level\")\n ) {\n args.push(\"--diagnostic-level\", this.config.biome.diagnosticLevel);\n }\n\n if (\n this.config.biome.errorOnWarnings &&\n !args.includes(\"--error-on-warnings\")\n ) {\n args.push(\"--error-on-warnings\");\n }\n\n if (\n this.config.biome.jsonParseAllowComments &&\n !args.includes(\"--json-parse-allow-comments\")\n ) {\n args.push(\"--json-parse-allow-comments\");\n }\n\n if (\n this.config.biome.jsonParseAllowTrailingCommas &&\n !args.includes(\"--json-parse-allow-trailing-commas\")\n ) {\n args.push(\"--json-parse-allow-trailing-commas\");\n }\n\n if (this.config.biome.reporter && !args.includes(\"--reporter\")) {\n args.push(\"--reporter\", this.config.biome.reporter);\n }\n\n if (this.config.biome.logKind && !args.includes(\"--log-kind\")) {\n args.push(\"--log-kind\", this.config.biome.logKind);\n }\n\n if (\n this.config.biome.filesMaxSize &&\n !args.includes(\"--files-max-size\")\n ) {\n args.push(\n \"--files-max-size\",\n this.config.biome.filesMaxSize.toString()\n );\n }\n\n if (\n this.config.biome.filesIgnoreUnknown &&\n !args.includes(\"--files-ignore-unknown\")\n ) {\n args.push(\"--files-ignore-unknown\");\n }\n\n if (this.config.biome.vcsEnabled && !args.includes(\"--vcs-enabled\")) {\n args.push(\"--vcs-enabled\");\n\n if (!args.includes(\"--vcs-root\")) {\n args.push(\"--vcs-root\", this.config.cwd);\n }\n\n if (\n this.config.biome.vcsClientKind &&\n !args.includes(\"--vcs-client-kind\")\n ) {\n args.push(\"--vcs-client-kind\", this.config.biome.vcsClientKind);\n }\n\n if (\n this.config.biome.vcsUseIgnoreFile &&\n !args.includes(\"--vcs-use-ignore-file\")\n ) {\n args.push(\"--vcs-use-ignore-file\");\n }\n\n if (\n this.config.biome.vcsDefaultBranch &&\n !args.includes(\"--vcs-default-branch\")\n ) {\n args.push(\"--vcs-default-branch\", this.config.biome.vcsDefaultBranch);\n }\n }\n\n if (!this.config.biome.biomePath) {\n const isBiomeListed = await isPackageListed(\n \"@biomejs/biome\",\n this.config.root\n );\n\n args.unshift(isBiomeListed ? \"./\" : joinPaths(this.config.root, \"src\"));\n\n const result = await executePackage(\n \"biome\",\n args,\n isBiomeListed\n ? joinPaths(this.config.cwd, this.config.root)\n : this.config.root\n );\n if (result.failed) {\n throw new Error(`Biome process exited with code ${result.exitCode}.`);\n }\n } else {\n args.unshift(\n this.config.biome.biomePath,\n joinPaths(this.config.root, \"src\")\n );\n\n const result = await execute(args.join(\" \"), this.config.cwd);\n if (result.failed) {\n throw new Error(`Biome process exited with code ${result.exitCode}.`);\n }\n }\n }\n };\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;;AAoCA,SAAgB,OACd,UAA8B,EAAE,EACJ;AAC5B,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,QAAK,MACH,6EACD;GAED,IAAI,aAAa,QAAQ;AACzB,OAAI,CAAC,WACH,KACE,WACE,UAAU,KAAK,OAAO,OAAO,MAAM,KAAK,OAAO,MAAM,aAAa,CACnE,CAED,cAAa,UACX,KAAK,OAAO,OAAO,MACnB,KAAK,OAAO,MACZ,aACD;YAED,WACE,UAAU,KAAK,OAAO,OAAO,MAAM,KAAK,OAAO,MAAM,cAAc,CACpE,CAED,cAAa,UACX,KAAK,OAAO,OAAO,MACnB,KAAK,OAAO,MACZ,cACD;YAED,WAAW,UAAU,KAAK,OAAO,OAAO,MAAM,aAAa,CAAC,CAE5D,cAAa,UAAU,KAAK,OAAO,OAAO,MAAM,aAAa;YAE7D,WAAW,UAAU,KAAK,OAAO,OAAO,MAAM,cAAc,CAAC,CAE7D,cAAa,UAAU,KAAK,OAAO,OAAO,MAAM,cAAc;OAE9D,OAAM,IAAI,MACR,2HACD;AAIL,UAAO,EACL,OAAO;IACL;IACA,gBAAgB;IAChB,iBAAiB;IACjB,KAAK;IACL,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,kBAAkB;IAClB,GAAG;IACJ,EACF;;EAEH,MAAM,OAAO;AACX,QAAK,MAAM,oCAAoC;GAE/C,MAAM,OAAiB,EAAE;AAEzB,OAAI,KAAK,OAAO,MAAM,OACpB,MAAK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ED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig } from "./plugin.cjs";
|
|
2
|
-
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig };
|
|
1
|
+
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig } from "./plugin.cjs";
|
|
2
|
+
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig } from "./plugin.mjs";
|
|
2
|
-
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig };
|
|
1
|
+
import { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig } from "./plugin.mjs";
|
|
2
|
+
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -156,6 +156,10 @@ interface BiomePluginResolvedConfig extends ResolvedConfig {
|
|
|
156
156
|
biome: BiomePluginOptions;
|
|
157
157
|
}
|
|
158
158
|
type BiomePluginContext<TResolvedConfig extends BiomePluginResolvedConfig = BiomePluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
159
|
+
declare type __ΩBiomePluginOptions = any[];
|
|
160
|
+
declare type __ΩBiomePluginUserConfig = any[];
|
|
161
|
+
declare type __ΩBiomePluginResolvedConfig = any[];
|
|
162
|
+
declare type __ΩBiomePluginContext = any[];
|
|
159
163
|
//#endregion
|
|
160
|
-
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig };
|
|
164
|
+
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
|
161
165
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;UAoBiB,kBAAA;;AAAjB;;EAIE,cAAA;EAJiC;;;;;EAWjC,UAAA;EAsBA;;;;;EAfA,GAAA;EAiDA;;;EA5CA,uBAAA;EAgEA;;;EA3DA,iBAAA;EA2FA;;;EAtFA,YAAA;EA0GA;;;EArGA,kBAAA;EA6HA;;;EAxHA,MAAA;EAuIS;;AAGX;;;EAnIE,MAAA;EAmI6C;;;;;EA5H7C,cAAA;EAmIyC;;;EA9HzC,eAAA;EAkIA;;;EA7HA,mBAAA;EAgIU;;;EA3HV,eAAA;EA4HoD;;;EAvHpD,sBAAA;EAwHe;;;EAnHf,4BAAA;EAmHE;;;EA9GF,QAAA;;;;;;EAeA,OAAA;;;;;;EAOA,eAAA;;;;EAKA,QAAA;;;;EAKA,MAAA;;;;EAKA,IAAA;;;;EAKA,IAAA;;;;EAKA,aAAA;;;;EAKA,UAAA;;;;;;EAOA,aAAA;;;;EAKA,gBAAA;;;;;;EAOA,gBAAA;;;;EAKA,MAAA;;;;EAKA,OAAA;;;;EAKA,MAAA;;;;EAKA,SAAA;AAAA;AAAA,UAGe,qBAAA,SAA8B,UAAA;;;;EAI7C,KAAA,GAAQ,kBAAA;AAAA;AAAA,UAGO,yBAAA,SAAkC,cAAA;;;;EAIjD,KAAA,EAAO,kBAAA;AAAA;AAAA,KAGG,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA"}
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;UAoBiB,kBAAA;;AAAjB;;EAIE,cAAA;EAJiC;;;;;EAWjC,UAAA;EAsBA;;;;;EAfA,GAAA;EAiDA;;;EA5CA,uBAAA;EAgEA;;;EA3DA,iBAAA;EA2FA;;;EAtFA,YAAA;EA0GA;;;EArGA,kBAAA;EA6HA;;;EAxHA,MAAA;EAuIS;;AAGX;;;EAnIE,MAAA;EAmI6C;;;;;EA5H7C,cAAA;EAmIyC;;;EA9HzC,eAAA;EAkIA;;;EA7HA,mBAAA;EAgIU;;;EA3HV,eAAA;EA4HoD;;;EAvHpD,sBAAA;EAwHe;;;EAnHf,4BAAA;EAmHE;;;EA9GF,QAAA;;;;;;EAeA,OAAA;;;;;;EAOA,eAAA;;;;EAKA,QAAA;;;;EAKA,MAAA;;;;EAKA,IAAA;;;;EAKA,IAAA;;;;EAKA,aAAA;;;;EAKA,UAAA;;;;;;EAOA,aAAA;;;;EAKA,gBAAA;;;;;;EAOA,gBAAA;;;;EAKA,MAAA;;;;EAKA,OAAA;;;;EAKA,MAAA;;;;EAKA,SAAA;AAAA;AAAA,UAGe,qBAAA,SAA8B,UAAA;;;;EAI7C,KAAA,GAAQ,kBAAA;AAAA;AAAA,UAGO,yBAAA,SAAkC,cAAA;;;;EAIjD,KAAA,EAAO,kBAAA;AAAA;AAAA,KAGG,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -156,6 +156,10 @@ interface BiomePluginResolvedConfig extends ResolvedConfig {
|
|
|
156
156
|
biome: BiomePluginOptions;
|
|
157
157
|
}
|
|
158
158
|
type BiomePluginContext<TResolvedConfig extends BiomePluginResolvedConfig = BiomePluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
159
|
+
declare type __ΩBiomePluginOptions = any[];
|
|
160
|
+
declare type __ΩBiomePluginUserConfig = any[];
|
|
161
|
+
declare type __ΩBiomePluginResolvedConfig = any[];
|
|
162
|
+
declare type __ΩBiomePluginContext = any[];
|
|
159
163
|
//#endregion
|
|
160
|
-
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig };
|
|
164
|
+
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
|
161
165
|
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;UAoBiB,kBAAA;;AAAjB;;EAIE,cAAA;EAJiC;;;;;EAWjC,UAAA;EAsBA;;;;;EAfA,GAAA;EAiDA;;;EA5CA,uBAAA;EAgEA;;;EA3DA,iBAAA;EA2FA;;;EAtFA,YAAA;EA0GA;;;EArGA,kBAAA;EA6HA;;;EAxHA,MAAA;EAuIS;;AAGX;;;EAnIE,MAAA;EAmI6C;;;;;EA5H7C,cAAA;EAmIyC;;;EA9HzC,eAAA;EAkIA;;;EA7HA,mBAAA;EAgIU;;;EA3HV,eAAA;EA4HoD;;;EAvHpD,sBAAA;EAwHe;;;EAnHf,4BAAA;EAmHE;;;EA9GF,QAAA;;;;;;EAeA,OAAA;;;;;;EAOA,eAAA;;;;EAKA,QAAA;;;;EAKA,MAAA;;;;EAKA,IAAA;;;;EAKA,IAAA;;;;EAKA,aAAA;;;;EAKA,UAAA;;;;;;EAOA,aAAA;;;;EAKA,gBAAA;;;;;;EAOA,gBAAA;;;;EAKA,MAAA;;;;EAKA,OAAA;;;;EAKA,MAAA;;;;EAKA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|
2
2
|
"name": "@powerlines/plugin-biome",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.408",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running Biome linting on the codebase.",
|
|
6
6
|
"repository": {
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
"@stryke/fs": "^0.33.66",
|
|
95
95
|
"@stryke/path": "^0.27.4",
|
|
96
96
|
"defu": "^6.1.7",
|
|
97
|
-
"powerlines": "^0.
|
|
97
|
+
"powerlines": "^0.43.1"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
100
|
+
"@powerlines/plugin-plugin": "^0.12.353",
|
|
101
101
|
"@types/node": "^25.6.0"
|
|
102
102
|
},
|
|
103
103
|
"publishConfig": { "access": "public" },
|
|
104
104
|
"main": "./dist/index.cjs",
|
|
105
105
|
"module": "./dist/index.mjs",
|
|
106
106
|
"types": "./dist/index.d.cts",
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "0b0428286336ad582b5c70e69dfd97ba6b586b59"
|
|
108
108
|
}
|