@powerlines/plugin-oxlint 0.7.294 → 0.7.295
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 +22 -23
- package/dist/index.d.cts +7 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +22 -23
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +3 -9
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +3 -9
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -5,18 +5,17 @@ let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
|
5
5
|
let __stryke_fs_get_parent_path = require("@stryke/fs/get-parent-path");
|
|
6
6
|
let __stryke_fs_package_fns = require("@stryke/fs/package-fns");
|
|
7
7
|
let __stryke_path_join = require("@stryke/path/join");
|
|
8
|
-
let __stryke_path_replace = require("@stryke/path/replace");
|
|
9
8
|
|
|
10
9
|
//#region src/index.ts
|
|
11
10
|
/**
|
|
12
|
-
* A Powerlines plugin to assist in linting a project with
|
|
11
|
+
* A Powerlines plugin to assist in linting a project with Oxlint.
|
|
13
12
|
*/
|
|
14
13
|
function plugin(options = {}) {
|
|
15
14
|
return {
|
|
16
15
|
name: "oxlint",
|
|
17
16
|
async config() {
|
|
18
17
|
this.debug("Providing default configuration for the Powerlines `oxlint` linting plugin.");
|
|
19
|
-
return {
|
|
18
|
+
return { oxlint: {
|
|
20
19
|
configFile: ".oxlintrc.json",
|
|
21
20
|
deny: [],
|
|
22
21
|
allow: [],
|
|
@@ -25,48 +24,48 @@ function plugin(options = {}) {
|
|
|
25
24
|
fix: true,
|
|
26
25
|
format: "stylish",
|
|
27
26
|
...options
|
|
28
|
-
} }
|
|
27
|
+
} };
|
|
29
28
|
},
|
|
30
29
|
configResolved() {
|
|
31
30
|
this.devDependencies.oxlint = "^1.24.0";
|
|
32
|
-
if (this.config.
|
|
31
|
+
if (this.config.oxlint.typeAware) this.devDependencies["oxlint-tsgolint"] = "^0.2.1";
|
|
33
32
|
},
|
|
34
33
|
async lint() {
|
|
35
34
|
this.debug("Linting project files with Oxlint.");
|
|
36
35
|
const args = [];
|
|
37
|
-
if (this.config.
|
|
38
|
-
if (!args.includes("--ignore-pattern") && this.config.
|
|
39
|
-
this.config.
|
|
40
|
-
this.config.
|
|
41
|
-
this.config.
|
|
36
|
+
if (this.config.oxlint.params) args.push(...this.config.oxlint.params.split(" ").filter(Boolean));
|
|
37
|
+
if (!args.includes("--ignore-pattern") && this.config.oxlint.ignorePatterns) args.push(`--ignore-pattern=${(0, __stryke_convert_to_array.toArray)(this.config.oxlint.ignorePatterns).join(",")}`);
|
|
38
|
+
this.config.oxlint.deny.forEach((d) => args.push("-D", d));
|
|
39
|
+
this.config.oxlint.allow.forEach((a) => args.push("-A", a));
|
|
40
|
+
this.config.oxlint.warn.forEach((w) => args.push("-W", w));
|
|
42
41
|
if (!args.includes("-c") && !args.includes("--config")) {
|
|
43
|
-
let configFile = (0, __stryke_fs_get_parent_path.getParentPath)(this.config.
|
|
42
|
+
let configFile = (0, __stryke_fs_get_parent_path.getParentPath)(this.config.oxlint.configFile, this.config.root, {
|
|
44
43
|
ignoreCase: true,
|
|
45
44
|
skipCwd: false,
|
|
46
45
|
includeNameInResults: true
|
|
47
46
|
});
|
|
48
|
-
if (configFile && !(0, __stryke_fs_exists.existsSync)(configFile) && this.config.
|
|
47
|
+
if (configFile && !(0, __stryke_fs_exists.existsSync)(configFile) && this.config.oxlint.configFile !== ".oxlintrc.json") configFile = (0, __stryke_fs_get_parent_path.getParentPath)(".oxlintrc.json", this.config.root, {
|
|
49
48
|
ignoreCase: true,
|
|
50
49
|
skipCwd: false,
|
|
51
50
|
includeNameInResults: true
|
|
52
51
|
});
|
|
53
52
|
if (configFile && (0, __stryke_fs_exists.existsSync)(configFile)) args.push("-c", configFile);
|
|
54
53
|
}
|
|
55
|
-
if (!args.includes("--type-aware") && this.config.
|
|
54
|
+
if (!args.includes("--type-aware") && this.config.oxlint.typeAware) args.push("--type-aware");
|
|
56
55
|
if (!args.includes("--tsconfig")) args.push("--tsconfig", this.tsconfig.tsconfigFilePath);
|
|
57
|
-
if (!args.includes("-f") && !args.includes("--format")) args.push("-f", this.config.
|
|
58
|
-
if (this.config.
|
|
59
|
-
if (this.config.
|
|
60
|
-
else if (this.config.
|
|
61
|
-
else if (this.config.
|
|
56
|
+
if (!args.includes("-f") && !args.includes("--format")) args.push("-f", this.config.oxlint.format || "stylish");
|
|
57
|
+
if (this.config.oxlint.fix !== false && !args.includes("--fix") && !args.includes("--fix-suggestions") && !args.includes("--fix-dangerously")) {
|
|
58
|
+
if (this.config.oxlint.fix === true) args.push("--fix");
|
|
59
|
+
else if (this.config.oxlint.fix === "suggestions") args.push("--fix-suggestions");
|
|
60
|
+
else if (this.config.oxlint.fix === "dangerously") args.push("--fix-dangerously");
|
|
62
61
|
}
|
|
63
|
-
if (!this.config.
|
|
64
|
-
const isOxlintListed = await (0, __stryke_fs_package_fns.isPackageListed)("oxlint", this.config.
|
|
65
|
-
args.unshift(isOxlintListed ?
|
|
66
|
-
const result = await (0, __stryke_cli_execute.executePackage)("oxlint", args, isOxlintListed ? (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.
|
|
62
|
+
if (!this.config.oxlint.oxlintPath) {
|
|
63
|
+
const isOxlintListed = await (0, __stryke_fs_package_fns.isPackageListed)("oxlint", this.config.root);
|
|
64
|
+
args.unshift(isOxlintListed ? "./" : this.config.root);
|
|
65
|
+
const result = await (0, __stryke_cli_execute.executePackage)("oxlint", args, isOxlintListed ? (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root) : this.workspaceConfig.workspaceRoot);
|
|
67
66
|
if (result.failed) throw new Error(`Oxlint process exited with code ${result.exitCode}.`);
|
|
68
67
|
} else {
|
|
69
|
-
args.unshift(this.config.
|
|
68
|
+
args.unshift(this.config.oxlint.oxlintPath, this.config.root);
|
|
70
69
|
const result = await (0, __stryke_cli_execute.execute)(args.join(" "), this.workspaceConfig.workspaceRoot);
|
|
71
70
|
if (result.failed) throw new Error(`Oxlint process exited with code ${result.exitCode}.`);
|
|
72
71
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./types/plugin.cjs";
|
|
2
2
|
import "./types/index.cjs";
|
|
3
|
-
import { Plugin } from "powerlines
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
|
|
6
|
+
declare module "powerlines" {
|
|
7
|
+
interface UserConfig {
|
|
8
|
+
oxlint?: OxlintPluginOptions;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
7
11
|
/**
|
|
8
|
-
* A Powerlines plugin to assist in linting a project with
|
|
12
|
+
* A Powerlines plugin to assist in linting a project with Oxlint.
|
|
9
13
|
*/
|
|
10
14
|
declare function plugin(options?: OxlintPluginOptions): Plugin<OxlintPluginContext>;
|
|
11
15
|
//#endregion
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA+BwB,MAAA,CAAA,EAIX,mBAJW;EAAA;;;;AAWxB;AACW,iBADK,MAAA,CACL,OAAA,CAAA,EAAA,mBAAA,CAAA,EACR,MADQ,CACD,mBADC,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./types/plugin.mjs";
|
|
2
2
|
import "./types/index.mjs";
|
|
3
|
-
import { Plugin } from "powerlines
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
|
|
6
|
+
declare module "powerlines" {
|
|
7
|
+
interface UserConfig {
|
|
8
|
+
oxlint?: OxlintPluginOptions;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
7
11
|
/**
|
|
8
|
-
* A Powerlines plugin to assist in linting a project with
|
|
12
|
+
* A Powerlines plugin to assist in linting a project with Oxlint.
|
|
9
13
|
*/
|
|
10
14
|
declare function plugin(options?: OxlintPluginOptions): Plugin<OxlintPluginContext>;
|
|
11
15
|
//#endregion
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA+BwB,MAAA,CAAA,EAIX,mBAJW;EAAA;;;;AAWxB;AACW,iBADK,MAAA,CACL,OAAA,CAAA,EAAA,mBAAA,CAAA,EACR,MADQ,CACD,mBADC,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -4,18 +4,17 @@ import { existsSync } from "@stryke/fs/exists";
|
|
|
4
4
|
import { getParentPath } from "@stryke/fs/get-parent-path";
|
|
5
5
|
import { isPackageListed } from "@stryke/fs/package-fns";
|
|
6
6
|
import { joinPaths } from "@stryke/path/join";
|
|
7
|
-
import { replacePath } from "@stryke/path/replace";
|
|
8
7
|
|
|
9
8
|
//#region src/index.ts
|
|
10
9
|
/**
|
|
11
|
-
* A Powerlines plugin to assist in linting a project with
|
|
10
|
+
* A Powerlines plugin to assist in linting a project with Oxlint.
|
|
12
11
|
*/
|
|
13
12
|
function plugin(options = {}) {
|
|
14
13
|
return {
|
|
15
14
|
name: "oxlint",
|
|
16
15
|
async config() {
|
|
17
16
|
this.debug("Providing default configuration for the Powerlines `oxlint` linting plugin.");
|
|
18
|
-
return {
|
|
17
|
+
return { oxlint: {
|
|
19
18
|
configFile: ".oxlintrc.json",
|
|
20
19
|
deny: [],
|
|
21
20
|
allow: [],
|
|
@@ -24,48 +23,48 @@ function plugin(options = {}) {
|
|
|
24
23
|
fix: true,
|
|
25
24
|
format: "stylish",
|
|
26
25
|
...options
|
|
27
|
-
} }
|
|
26
|
+
} };
|
|
28
27
|
},
|
|
29
28
|
configResolved() {
|
|
30
29
|
this.devDependencies.oxlint = "^1.24.0";
|
|
31
|
-
if (this.config.
|
|
30
|
+
if (this.config.oxlint.typeAware) this.devDependencies["oxlint-tsgolint"] = "^0.2.1";
|
|
32
31
|
},
|
|
33
32
|
async lint() {
|
|
34
33
|
this.debug("Linting project files with Oxlint.");
|
|
35
34
|
const args = [];
|
|
36
|
-
if (this.config.
|
|
37
|
-
if (!args.includes("--ignore-pattern") && this.config.
|
|
38
|
-
this.config.
|
|
39
|
-
this.config.
|
|
40
|
-
this.config.
|
|
35
|
+
if (this.config.oxlint.params) args.push(...this.config.oxlint.params.split(" ").filter(Boolean));
|
|
36
|
+
if (!args.includes("--ignore-pattern") && this.config.oxlint.ignorePatterns) args.push(`--ignore-pattern=${toArray(this.config.oxlint.ignorePatterns).join(",")}`);
|
|
37
|
+
this.config.oxlint.deny.forEach((d) => args.push("-D", d));
|
|
38
|
+
this.config.oxlint.allow.forEach((a) => args.push("-A", a));
|
|
39
|
+
this.config.oxlint.warn.forEach((w) => args.push("-W", w));
|
|
41
40
|
if (!args.includes("-c") && !args.includes("--config")) {
|
|
42
|
-
let configFile = getParentPath(this.config.
|
|
41
|
+
let configFile = getParentPath(this.config.oxlint.configFile, this.config.root, {
|
|
43
42
|
ignoreCase: true,
|
|
44
43
|
skipCwd: false,
|
|
45
44
|
includeNameInResults: true
|
|
46
45
|
});
|
|
47
|
-
if (configFile && !existsSync(configFile) && this.config.
|
|
46
|
+
if (configFile && !existsSync(configFile) && this.config.oxlint.configFile !== ".oxlintrc.json") configFile = getParentPath(".oxlintrc.json", this.config.root, {
|
|
48
47
|
ignoreCase: true,
|
|
49
48
|
skipCwd: false,
|
|
50
49
|
includeNameInResults: true
|
|
51
50
|
});
|
|
52
51
|
if (configFile && existsSync(configFile)) args.push("-c", configFile);
|
|
53
52
|
}
|
|
54
|
-
if (!args.includes("--type-aware") && this.config.
|
|
53
|
+
if (!args.includes("--type-aware") && this.config.oxlint.typeAware) args.push("--type-aware");
|
|
55
54
|
if (!args.includes("--tsconfig")) args.push("--tsconfig", this.tsconfig.tsconfigFilePath);
|
|
56
|
-
if (!args.includes("-f") && !args.includes("--format")) args.push("-f", this.config.
|
|
57
|
-
if (this.config.
|
|
58
|
-
if (this.config.
|
|
59
|
-
else if (this.config.
|
|
60
|
-
else if (this.config.
|
|
55
|
+
if (!args.includes("-f") && !args.includes("--format")) args.push("-f", this.config.oxlint.format || "stylish");
|
|
56
|
+
if (this.config.oxlint.fix !== false && !args.includes("--fix") && !args.includes("--fix-suggestions") && !args.includes("--fix-dangerously")) {
|
|
57
|
+
if (this.config.oxlint.fix === true) args.push("--fix");
|
|
58
|
+
else if (this.config.oxlint.fix === "suggestions") args.push("--fix-suggestions");
|
|
59
|
+
else if (this.config.oxlint.fix === "dangerously") args.push("--fix-dangerously");
|
|
61
60
|
}
|
|
62
|
-
if (!this.config.
|
|
63
|
-
const isOxlintListed = await isPackageListed("oxlint", this.config.
|
|
64
|
-
args.unshift(isOxlintListed ?
|
|
65
|
-
const result = await executePackage("oxlint", args, isOxlintListed ? joinPaths(this.workspaceConfig.workspaceRoot, this.config.
|
|
61
|
+
if (!this.config.oxlint.oxlintPath) {
|
|
62
|
+
const isOxlintListed = await isPackageListed("oxlint", this.config.root);
|
|
63
|
+
args.unshift(isOxlintListed ? "./" : this.config.root);
|
|
64
|
+
const result = await executePackage("oxlint", args, isOxlintListed ? joinPaths(this.workspaceConfig.workspaceRoot, this.config.root) : this.workspaceConfig.workspaceRoot);
|
|
66
65
|
if (result.failed) throw new Error(`Oxlint process exited with code ${result.exitCode}.`);
|
|
67
66
|
} else {
|
|
68
|
-
args.unshift(this.config.
|
|
67
|
+
args.unshift(this.config.oxlint.oxlintPath, this.config.root);
|
|
69
68
|
const result = await execute(args.join(" "), this.workspaceConfig.workspaceRoot);
|
|
70
69
|
if (result.failed) throw new Error(`Oxlint process exited with code ${result.exitCode}.`);
|
|
71
70
|
}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["args: string[]"],"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 { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { getParentPath } from \"@stryke/fs/get-parent-path\";\nimport { isPackageListed } from \"@stryke/fs/package-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["args: string[]"],"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 { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { getParentPath } from \"@stryke/fs/get-parent-path\";\nimport { isPackageListed } from \"@stryke/fs/package-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { Plugin } from \"powerlines\";\nimport {\n OxlintPluginContext,\n OxlintPluginOptions,\n OxlintPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n export interface UserConfig {\n oxlint?: OxlintPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in linting a project with Oxlint.\n */\nexport function plugin(\n options: OxlintPluginOptions = {}\n): Plugin<OxlintPluginContext> {\n return {\n name: \"oxlint\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `oxlint` linting plugin.\"\n );\n\n return {\n oxlint: {\n configFile: \".oxlintrc.json\",\n deny: [],\n allow: [],\n warn: [],\n typeAware: true,\n fix: true,\n format: \"stylish\",\n ...options\n }\n } as Partial<OxlintPluginResolvedConfig>;\n },\n configResolved() {\n this.devDependencies.oxlint = \"^1.24.0\";\n if (this.config.oxlint.typeAware) {\n this.devDependencies[\"oxlint-tsgolint\"] = \"^0.2.1\";\n }\n },\n async lint() {\n this.debug(\"Linting project files with Oxlint.\");\n\n const args: string[] = [];\n\n if (this.config.oxlint.params) {\n args.push(...this.config.oxlint.params.split(\" \").filter(Boolean));\n }\n\n if (\n !args.includes(\"--ignore-pattern\") &&\n this.config.oxlint.ignorePatterns\n ) {\n args.push(\n `--ignore-pattern=${toArray(this.config.oxlint.ignorePatterns).join(\",\")}`\n );\n }\n\n this.config.oxlint.deny.forEach(d => args.push(\"-D\", d));\n this.config.oxlint.allow.forEach(a => args.push(\"-A\", a));\n this.config.oxlint.warn.forEach(w => args.push(\"-W\", w));\n\n if (!args.includes(\"-c\") && !args.includes(\"--config\")) {\n let configFile = getParentPath(\n this.config.oxlint.configFile,\n this.config.root,\n {\n ignoreCase: true,\n skipCwd: false,\n includeNameInResults: true\n }\n );\n if (\n configFile &&\n !existsSync(configFile) &&\n this.config.oxlint.configFile !== \".oxlintrc.json\"\n ) {\n configFile = getParentPath(\".oxlintrc.json\", this.config.root, {\n ignoreCase: true,\n skipCwd: false,\n includeNameInResults: true\n });\n }\n\n if (configFile && existsSync(configFile)) {\n args.push(\"-c\", configFile);\n }\n }\n\n if (!args.includes(\"--type-aware\") && this.config.oxlint.typeAware) {\n args.push(\"--type-aware\");\n }\n\n if (!args.includes(\"--tsconfig\")) {\n args.push(\"--tsconfig\", this.tsconfig.tsconfigFilePath);\n }\n\n if (!args.includes(\"-f\") && !args.includes(\"--format\")) {\n args.push(\"-f\", this.config.oxlint.format || \"stylish\");\n }\n\n if (\n this.config.oxlint.fix !== false &&\n !args.includes(\"--fix\") &&\n !args.includes(\"--fix-suggestions\") &&\n !args.includes(\"--fix-dangerously\")\n ) {\n if (this.config.oxlint.fix === true) {\n args.push(\"--fix\");\n } else if (this.config.oxlint.fix === \"suggestions\") {\n args.push(\"--fix-suggestions\");\n } else if (this.config.oxlint.fix === \"dangerously\") {\n args.push(\"--fix-dangerously\");\n }\n }\n\n if (!this.config.oxlint.oxlintPath) {\n const isOxlintListed = await isPackageListed(\n \"oxlint\",\n this.config.root\n );\n\n args.unshift(isOxlintListed ? \"./\" : this.config.root);\n\n const result = await executePackage(\n \"oxlint\",\n args,\n isOxlintListed\n ? joinPaths(this.workspaceConfig.workspaceRoot, this.config.root)\n : this.workspaceConfig.workspaceRoot\n );\n if (result.failed) {\n throw new Error(\n `Oxlint process exited with code ${result.exitCode}.`\n );\n }\n } else {\n args.unshift(this.config.oxlint.oxlintPath, this.config.root);\n\n const result = await execute(\n args.join(\" \"),\n this.workspaceConfig.workspaceRoot\n );\n if (result.failed) {\n throw new Error(\n `Oxlint process exited with code ${result.exitCode}.`\n );\n }\n }\n }\n };\n}\n\nexport default plugin;\n"],"mappings":"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"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { UserConfig } from "powerlines
|
|
2
|
-
import { PluginContext } from "powerlines/types/context";
|
|
3
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
1
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
4
2
|
|
|
5
3
|
//#region src/types/plugin.d.ts
|
|
6
4
|
interface OxlintPluginOptions {
|
|
@@ -62,17 +60,13 @@ interface OxlintPluginUserConfig extends UserConfig {
|
|
|
62
60
|
/**
|
|
63
61
|
* Options for the Oxlint plugin.
|
|
64
62
|
*/
|
|
65
|
-
|
|
66
|
-
oxlint?: OxlintPluginOptions;
|
|
67
|
-
};
|
|
63
|
+
oxlint?: OxlintPluginOptions;
|
|
68
64
|
}
|
|
69
65
|
interface OxlintPluginResolvedConfig extends ResolvedConfig {
|
|
70
66
|
/**
|
|
71
67
|
* Options for the Oxlint plugin.
|
|
72
68
|
*/
|
|
73
|
-
|
|
74
|
-
oxlint: Omit<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format"> & Required<Pick<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format">>;
|
|
75
|
-
};
|
|
69
|
+
oxlint: Omit<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format"> & Required<Pick<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format">>;
|
|
76
70
|
}
|
|
77
71
|
type OxlintPluginContext<TResolvedConfig extends OxlintPluginResolvedConfig = OxlintPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
78
72
|
declare type __ΩOxlintPluginOptions = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;UAoBiB,mBAAA;;AAAjB;AAwEA;EAOiB,cAAA,CAAA,EAAA,MAAA,GAAA,MAA2B,EAAA;EAKxC;;;;;EALgD,UAAA,CAAA,EAAA,MAAA;EAAc;AAsBlE;;EAEI,IAAA,CAAA,EAAA,MAAA,EAAA;EACc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAhCD,sBAAA,SAA+B;;;;WAIrC;;UAGM,0BAAA,SAAmC;;;;UAI1C,KACN,kGAGA,SACE,KACE;;KAYI,4CACc,6BACtB,8BACA,cAAc"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { UserConfig } from "powerlines
|
|
2
|
-
import { PluginContext } from "powerlines/types/context";
|
|
3
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
1
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
4
2
|
|
|
5
3
|
//#region src/types/plugin.d.ts
|
|
6
4
|
interface OxlintPluginOptions {
|
|
@@ -62,17 +60,13 @@ interface OxlintPluginUserConfig extends UserConfig {
|
|
|
62
60
|
/**
|
|
63
61
|
* Options for the Oxlint plugin.
|
|
64
62
|
*/
|
|
65
|
-
|
|
66
|
-
oxlint?: OxlintPluginOptions;
|
|
67
|
-
};
|
|
63
|
+
oxlint?: OxlintPluginOptions;
|
|
68
64
|
}
|
|
69
65
|
interface OxlintPluginResolvedConfig extends ResolvedConfig {
|
|
70
66
|
/**
|
|
71
67
|
* Options for the Oxlint plugin.
|
|
72
68
|
*/
|
|
73
|
-
|
|
74
|
-
oxlint: Omit<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format"> & Required<Pick<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format">>;
|
|
75
|
-
};
|
|
69
|
+
oxlint: Omit<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format"> & Required<Pick<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format">>;
|
|
76
70
|
}
|
|
77
71
|
type OxlintPluginContext<TResolvedConfig extends OxlintPluginResolvedConfig = OxlintPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
78
72
|
declare type __ΩOxlintPluginOptions = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;UAoBiB,mBAAA;;AAAjB;AAwEA;EAOiB,cAAA,CAAA,EAAA,MAAA,GAAA,MAA2B,EAAA;EAKxC;;;;;EALgD,UAAA,CAAA,EAAA,MAAA;EAAc;AAsBlE;;EAEI,IAAA,CAAA,EAAA,MAAA,EAAA;EACc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAhCD,sBAAA,SAA+B;;;;WAIrC;;UAGM,0BAAA,SAAmC;;;;UAI1C,KACN,kGAGA,SACE,KACE;;KAYI,4CACc,6BACtB,8BACA,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-oxlint",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.295",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running Oxlint on the codebase.",
|
|
6
6
|
"repository": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"default": "./dist/index.mjs"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
+
"./*": "./*",
|
|
56
57
|
"./helpers": {
|
|
57
58
|
"require": {
|
|
58
59
|
"types": "./dist/helpers/index.d.cts",
|
|
@@ -81,7 +82,6 @@
|
|
|
81
82
|
"default": "./dist/helpers/generate-config.mjs"
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
|
-
"./package.json": "./package.json",
|
|
85
85
|
"./types": {
|
|
86
86
|
"require": {
|
|
87
87
|
"types": "./dist/types/index.d.cts",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"files": ["dist/**/*"],
|
|
115
115
|
"keywords": ["oxlint", "powerlines", "storm-software", "powerlines-plugin"],
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@storm-software/config-tools": "^1.189.
|
|
117
|
+
"@storm-software/config-tools": "^1.189.10",
|
|
118
118
|
"@stryke/cli": "^0.13.15",
|
|
119
119
|
"@stryke/convert": "^0.6.40",
|
|
120
120
|
"@stryke/fs": "^0.33.43",
|
|
@@ -122,15 +122,15 @@
|
|
|
122
122
|
"defu": "^6.1.4",
|
|
123
123
|
"oxlint": "^1.50.0",
|
|
124
124
|
"oxlint-tsgolint": "^0.2.1",
|
|
125
|
-
"powerlines": "^0.
|
|
125
|
+
"powerlines": "^0.39.0"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
129
|
-
"@types/node": "^25.3.
|
|
128
|
+
"@powerlines/plugin-plugin": "^0.12.242",
|
|
129
|
+
"@types/node": "^25.3.2"
|
|
130
130
|
},
|
|
131
131
|
"publishConfig": { "access": "public" },
|
|
132
132
|
"main": "./dist/index.cjs",
|
|
133
133
|
"module": "./dist/index.mjs",
|
|
134
134
|
"types": "./dist/index.d.cts",
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "0dcb16f054b8a69915b074578e6d4dfa3ecc1529"
|
|
136
136
|
}
|