@powerlines/plugin-oxlint 0.7.345 → 0.7.346

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/README.md CHANGED
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
27
27
 
28
28
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
29
 
30
- [![Version](https://img.shields.io/badge/version-0.7.338-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.7.345-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
@@ -58,21 +58,19 @@ A package containing a Powerlines plugin that integrates Oxlint into the Powerli
58
58
 
59
59
  ## Table of Contents
60
60
 
61
- - [Powerlines - Oxlint Plugin](#powerlines---oxlint-plugin)
62
- - [Table of Contents](#table-of-contents)
63
- - [Installing](#installing)
64
- - [Reduced Package Size](#reduced-package-size)
65
- - [Development](#development)
66
- - [Building](#building)
67
- - [Running unit tests](#running-unit-tests)
68
- - [Linting](#linting)
69
- - [Storm Workspaces](#storm-workspaces)
70
- - [Roadmap](#roadmap)
71
- - [Support](#support)
72
- - [License](#license)
73
- - [Changelog](#changelog)
74
- - [Contributing](#contributing)
75
- - [Contributors](#contributors)
61
+ - [Installing](#installing)
62
+ - [Reduced Package Size](#reduced-package-size)
63
+ - [Development](#development)
64
+ - [Building](#building)
65
+ - [Running unit tests](#running-unit-tests)
66
+ - [Linting](#linting)
67
+ - [Storm Workspaces](#storm-workspaces)
68
+ - [Roadmap](#roadmap)
69
+ - [Support](#support)
70
+ - [License](#license)
71
+ - [Changelog](#changelog)
72
+ - [Contributing](#contributing)
73
+ - [Contributors](#contributors)
76
74
 
77
75
  <!-- END doctoc -->
78
76
 
@@ -0,0 +1,3 @@
1
+ import "node:module";
2
+
3
+ export { };
@@ -1,4 +1,5 @@
1
- let __stryke_convert_neutral = require("@stryke/convert/neutral");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let _stryke_convert_neutral = require("@stryke/convert/neutral");
2
3
 
3
4
  //#region src/helpers/generate-config.ts
4
5
  /**
@@ -25,7 +26,7 @@ function generateConfig(options = {}) {
25
26
  "node_modules/**",
26
27
  "temp/**",
27
28
  "tests/fixtures/**"${options.ignorePatterns ? `,
28
- ${(0, __stryke_convert_neutral.toArray)(options.ignorePatterns).map((pattern) => `"${pattern}"`).join(",\n ")}` : ""}
29
+ ${(0, _stryke_convert_neutral.toArray)(options.ignorePatterns).map((pattern) => `"${pattern}"`).join(",\n ")}` : ""}
29
30
  ],
30
31
  "rules": {
31
32
  "import/named": "error",
@@ -1,7 +1,6 @@
1
1
  import { OxlintPluginOptions } from "../types/plugin.cjs";
2
2
 
3
3
  //#region src/helpers/generate-config.d.ts
4
-
5
4
  /**
6
5
  * Generates an Oxlint configuration file content based on the provided options.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"generate-config.d.cts","names":[],"sources":["../../src/helpers/generate-config.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,cAAA,WAAwB"}
1
+ {"version":3,"file":"generate-config.d.cts","names":[],"sources":["../../src/helpers/generate-config.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,cAAA,CAAe,OAAA,GAAS,mBAAA"}
@@ -1,7 +1,6 @@
1
1
  import { OxlintPluginOptions } from "../types/plugin.mjs";
2
2
 
3
3
  //#region src/helpers/generate-config.d.ts
4
-
5
4
  /**
6
5
  * Generates an Oxlint configuration file content based on the provided options.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"generate-config.d.mts","names":[],"sources":["../../src/helpers/generate-config.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,cAAA,WAAwB"}
1
+ {"version":3,"file":"generate-config.d.mts","names":[],"sources":["../../src/helpers/generate-config.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,cAAA,CAAe,OAAA,GAAS,mBAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_helpers_generate_config = require('./generate-config.cjs');
2
3
 
3
4
  exports.generateConfig = require_helpers_generate_config.generateConfig;
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- let __stryke_cli_execute = require("@stryke/cli/execute");
3
- let __stryke_convert_to_array = require("@stryke/convert/to-array");
4
- let __stryke_fs_exists = require("@stryke/fs/exists");
5
- let __stryke_fs_get_parent_path = require("@stryke/fs/get-parent-path");
6
- let __stryke_fs_package_fns = require("@stryke/fs/package-fns");
7
- let __stryke_path_join = require("@stryke/path/join");
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ let _stryke_cli_execute = require("@stryke/cli/execute");
3
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
4
+ let _stryke_fs_exists = require("@stryke/fs/exists");
5
+ let _stryke_fs_get_parent_path = require("@stryke/fs/get-parent-path");
6
+ let _stryke_fs_package_fns = require("@stryke/fs/package-fns");
7
+ let _stryke_path_join = require("@stryke/path/join");
8
8
 
9
9
  //#region src/index.ts
10
10
  /**
@@ -34,22 +34,22 @@ function plugin(options = {}) {
34
34
  this.debug("Linting project files with Oxlint.");
35
35
  const args = [];
36
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(",")}`);
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
38
  this.config.oxlint.deny.forEach((d) => args.push("-D", d));
39
39
  this.config.oxlint.allow.forEach((a) => args.push("-A", a));
40
40
  this.config.oxlint.warn.forEach((w) => args.push("-W", w));
41
41
  if (!args.includes("-c") && !args.includes("--config")) {
42
- let configFile = (0, __stryke_fs_get_parent_path.getParentPath)(this.config.oxlint.configFile, this.config.root, {
42
+ let configFile = (0, _stryke_fs_get_parent_path.getParentPath)(this.config.oxlint.configFile, this.config.root, {
43
43
  ignoreCase: true,
44
44
  skipCwd: false,
45
45
  includeNameInResults: true
46
46
  });
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, {
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, {
48
48
  ignoreCase: true,
49
49
  skipCwd: false,
50
50
  includeNameInResults: true
51
51
  });
52
- if (configFile && (0, __stryke_fs_exists.existsSync)(configFile)) args.push("-c", configFile);
52
+ if (configFile && (0, _stryke_fs_exists.existsSync)(configFile)) args.push("-c", configFile);
53
53
  }
54
54
  if (!args.includes("--type-aware") && this.config.oxlint.typeAware) args.push("--type-aware");
55
55
  if (!args.includes("--tsconfig")) args.push("--tsconfig", this.tsconfig.tsconfigFilePath);
@@ -60,20 +60,19 @@ function plugin(options = {}) {
60
60
  else if (this.config.oxlint.fix === "dangerously") args.push("--fix-dangerously");
61
61
  }
62
62
  if (!this.config.oxlint.oxlintPath) {
63
- const isOxlintListed = await (0, __stryke_fs_package_fns.isPackageListed)("oxlint", this.config.root);
63
+ const isOxlintListed = await (0, _stryke_fs_package_fns.isPackageListed)("oxlint", this.config.root);
64
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);
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);
66
66
  if (result.failed) throw new Error(`Oxlint process exited with code ${result.exitCode}.`);
67
67
  } else {
68
68
  args.unshift(this.config.oxlint.oxlintPath, this.config.root);
69
- const result = await (0, __stryke_cli_execute.execute)(args.join(" "), this.workspaceConfig.workspaceRoot);
69
+ const result = await (0, _stryke_cli_execute.execute)(args.join(" "), this.workspaceConfig.workspaceRoot);
70
70
  if (result.failed) throw new Error(`Oxlint process exited with code ${result.exitCode}.`);
71
71
  }
72
72
  }
73
73
  };
74
74
  }
75
- var src_default = plugin;
76
75
 
77
76
  //#endregion
78
- exports.default = src_default;
77
+ exports.default = plugin;
79
78
  exports.plugin = plugin;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./types/plugin.cjs";
2
- import "./types/index.cjs";
3
2
  import { Plugin } from "powerlines";
4
3
 
5
4
  //#region src/index.d.ts
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAkCY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;iBAOG,MAAA,CACd,OAAA,GAAS,mBAAA,GACR,MAAA,CAAO,mBAAA"}
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./types/plugin.mjs";
2
- import "./types/index.mjs";
3
2
  import { Plugin } from "powerlines";
4
3
 
5
4
  //#region src/index.d.ts
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAkCY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;iBAOG,MAAA,CACd,OAAA,GAAS,mBAAA,GACR,MAAA,CAAO,mBAAA"}
package/dist/index.mjs CHANGED
@@ -71,8 +71,7 @@ function plugin(options = {}) {
71
71
  }
72
72
  };
73
73
  }
74
- var src_default = plugin;
75
74
 
76
75
  //#endregion
77
- export { src_default as default, plugin };
76
+ export { plugin as default, plugin };
78
77
  //# sourceMappingURL=index.mjs.map
@@ -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 { Plugin } from \"powerlines\";\nimport {\n OxlintPluginContext,\n OxlintPluginOptions,\n OxlintPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\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":";;;;;;;;;;;AA0CA,SAAgB,OACd,UAA+B,EAAE,EACJ;AAC7B,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,QAAK,MACH,8EACD;AAED,UAAO,EACL,QAAQ;IACN,YAAY;IACZ,MAAM,EAAE;IACR,OAAO,EAAE;IACT,MAAM,EAAE;IACR,WAAW;IACX,KAAK;IACL,QAAQ;IACR,GAAG;IACJ,EACF;;EAEH,iBAAiB;AACf,QAAK,gBAAgB,SAAS;AAC9B,OAAI,KAAK,OAAO,OAAO,UACrB,MAAK,gBAAgB,qBAAqB;;EAG9C,MAAM,OAAO;AACX,QAAK,MAAM,qCAAqC;GAEhD,MAAMA,OAAiB,EAAE;AAEzB,OAAI,KAAK,OAAO,OAAO,OACrB,MAAK,KAAK,GAAG,KAAK,OAAO,OAAO,OAAO,MAAM,IAAI,CAAC,OAAO,QAAQ,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QAAQ,KAC7B,MAAK,KAAK,QAAQ;aACT,KAAK,OAAO,OAAO,QAAQ,cACpC,MAAK,KAAK,oBAAoB;aACrB,KAAK,OAAO,OAAO,QAAQ,cACpC,MAAK,KAAK,oBAAoB;;AAIlC,OAAI,CAAC,KAAK,OAAO,OAAO,YAAY;IAClC,MAAM,iBAAiB,MAAM,gBAC3B,UACA,KAAK,OAAO,KACb;AAED,SAAK,QAAQ,iBAAiB,OAAO,KAAK,OAAO,KAAK;IAEtD,MAAM,SAAS,MAAM,eACnB,UACA,MACA,iBACI,UAAU,KAAK,gBAAgB,eAAe,KAAK,OAAO,KAAK,GAC/D,KAAK,gBAAgB,cAC1B;AACD,QAAI,OAAO,OACT,OAAM,IAAI,MACR,mCAAmC,OAAO,SAAS,GACpD;UAEE;AACL,SAAK,QAAQ,KAAK,OAAO,OAAO,YAAY,KAAK,OAAO,KAAK;IAE7D,MAAM,SAAS,MAAM,QACnB,KAAK,KAAK,IAAI,EACd,KAAK,gBAAgB,cACtB;AACD,QAAI,OAAO,OACT,OAAM,IAAI,MACR,mCAAmC,OAAO,SAAS,GACpD;;;EAIR;;AAGH,kBAAe"}
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 { 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 interface Config {\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":";;;;;;;;;;;AA0CA,SAAgB,OACd,UAA+B,EAAE,EACJ;AAC7B,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,QAAK,MACH,8EACD;AAED,UAAO,EACL,QAAQ;IACN,YAAY;IACZ,MAAM,EAAE;IAC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AA2B,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"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;UAoBiB,mBAAA;;AAAjB;;EAIE,cAAA;EAJkC;;;;;EAWlC,UAAA;EAoBA;;;EAfA,IAAA;EA8CA;;;EAzCA,KAAA;EAmDsC;;;EA9CtC,IAAA;EAkDA;;;EA7CA,MAAA;EAgDe;;;EA3Cf,UAAA;EA+CQ;;;;;EAxCR,SAAA;EAoCgE;;;;;;;;;;EAxBhE,GAAA;EA8C6B;;;;;EAvC7B,MAAA;AAAA;AAAA,UAUe,sBAAA,SAA+B,UAAA;EA8B9C;;;EA1BA,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAA;EAyBnB;;;EArB/B,MAAA,EAAQ,IAAA,CACN,mBAAA,+EAGA,QAAA,CACE,IAAA,CACE,mBAAA;AAAA;AAAA,KAYI,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;UAoBiB,mBAAA;;AAAjB;;EAIE,cAAA;EAJkC;;;;;EAWlC,UAAA;EAoBA;;;EAfA,IAAA;EA8CA;;;EAzCA,KAAA;EAmDsC;;;EA9CtC,IAAA;EAkDA;;;EA7CA,MAAA;EAgDe;;;EA3Cf,UAAA;EA+CQ;;;;;EAxCR,SAAA;EAoCgE;;;;;;;;;;EAxBhE,GAAA;EA8C6B;;;;;EAvC7B,MAAA;AAAA;AAAA,UAUe,sBAAA,SAA+B,UAAA;EA8B9C;;;EA1BA,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAA;EAyBnB;;;EArB/B,MAAA,EAAQ,IAAA,CACN,mBAAA,+EAGA,QAAA,CACE,IAAA,CACE,mBAAA;AAAA;AAAA,KAYI,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-oxlint",
3
- "version": "0.7.345",
3
+ "version": "0.7.346",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for running Oxlint on the codebase.",
6
6
  "repository": {
@@ -53,7 +53,6 @@
53
53
  "default": "./dist/index.mjs"
54
54
  }
55
55
  },
56
- "./*": "./*",
57
56
  "./helpers": {
58
57
  "require": {
59
58
  "types": "./dist/helpers/index.d.cts",
@@ -82,6 +81,7 @@
82
81
  "default": "./dist/helpers/generate-config.mjs"
83
82
  }
84
83
  },
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.28",
117
+ "@storm-software/config-tools": "1.189.28",
118
118
  "@stryke/cli": "^0.13.29",
119
119
  "@stryke/convert": "^0.6.53",
120
120
  "@stryke/fs": "^0.33.57",
@@ -122,15 +122,15 @@
122
122
  "defu": "^6.1.4",
123
123
  "oxlint": "^1.53.0",
124
124
  "oxlint-tsgolint": "^0.14.2",
125
- "powerlines": "^0.41.6"
125
+ "powerlines": "^0.41.7"
126
126
  },
127
127
  "devDependencies": {
128
- "@powerlines/plugin-plugin": "^0.12.292",
128
+ "@powerlines/plugin-plugin": "^0.12.293",
129
129
  "@types/node": "^25.4.0"
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": "86bbe64da57a38d472b37261ca9d113171841a6c"
135
+ "gitHead": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
136
136
  }