@powerlines/plugin-oxlint 0.7.342 → 0.7.343

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.
@@ -0,0 +1,14 @@
1
+ import { OxlintPluginOptions } from "../types/plugin.cjs";
2
+
3
+ //#region src/helpers/generate-config.d.ts
4
+
5
+ /**
6
+ * Generates an Oxlint configuration file content based on the provided options.
7
+ *
8
+ * @param options - The options for the Oxlint plugin.
9
+ * @returns The generated configuration as a string.
10
+ */
11
+ declare function generateConfig(options?: OxlintPluginOptions): string;
12
+ //#endregion
13
+ export { generateConfig };
14
+ //# sourceMappingURL=generate-config.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-config.d.cts","names":[],"sources":["../../src/helpers/generate-config.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,cAAA,WAAwB"}
@@ -0,0 +1,14 @@
1
+ import { OxlintPluginOptions } from "../types/plugin.mjs";
2
+
3
+ //#region src/helpers/generate-config.d.ts
4
+
5
+ /**
6
+ * Generates an Oxlint configuration file content based on the provided options.
7
+ *
8
+ * @param options - The options for the Oxlint plugin.
9
+ * @returns The generated configuration as a string.
10
+ */
11
+ declare function generateConfig(options?: OxlintPluginOptions): string;
12
+ //#endregion
13
+ export { generateConfig };
14
+ //# sourceMappingURL=generate-config.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-config.d.mts","names":[],"sources":["../../src/helpers/generate-config.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,cAAA,WAAwB"}
@@ -55,4 +55,5 @@ function generateConfig(options = {}) {
55
55
  }
56
56
 
57
57
  //#endregion
58
- export { generateConfig };
58
+ export { generateConfig };
59
+ //# sourceMappingURL=generate-config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-config.mjs","names":[],"sources":["../../src/helpers/generate-config.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 { toArray } from \"@stryke/convert/neutral\";\nimport { OxlintPluginOptions } from \"../types/plugin\";\n\n/**\n * Generates an Oxlint configuration file content based on the provided options.\n *\n * @param options - The options for the Oxlint plugin.\n * @returns The generated configuration as a string.\n */\nexport function generateConfig(options: OxlintPluginOptions = {}): string {\n return `{\n \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n \"plugins\": [\n \"import\",\n \"jsdoc\",\n \"unicorn\",\n \"typescript\",\n \"oxc\"\n ],\n \"ignorePatterns\": [\n \"crates/**\",\n \"dist/**\",\n \"build/**\",\n \"coverage/**\",\n \"node_modules/**\",\n \"temp/**\",\n \"tests/fixtures/**\"${\n options.ignorePatterns\n ? `,\n ${toArray(options.ignorePatterns)\n .map(pattern => `\"${pattern}\"`)\n .join(\",\\n \")}`\n : \"\"\n }\n ],\n \"rules\": {\n \"import/named\": \"error\",\n \"import/namespace\": [\n \"error\",\n {\n \"allowComputed\": true\n }\n ],\n \"no-unused-expressions\": [\n \"warn\",\n {\n \"allowShortCircuit\": true,\n \"allowTaggedTemplates\": true\n }\n ],\n \"no-unused-vars\": [\n \"warn\",\n {\n \"varsIgnorePattern\": \"^_\",\n \"argsIgnorePattern\": \"^_\"\n }\n ],\n \"unicorn/prefer-node-protocol\": \"error\"\n }\n}`;\n}\n"],"mappings":";;;;;;;;;AA2BA,SAAgB,eAAe,UAA+B,EAAE,EAAU;AACxE,QAAO;;;;;;;;;;;;;;;;yBAiBH,QAAQ,iBACJ;MACJ,QAAQ,QAAQ,eAAe,CAC9B,KAAI,YAAW,IAAI,QAAQ,GAAG,CAC9B,KAAK,UAAU,KACZ,GACL"}
@@ -0,0 +1,2 @@
1
+ import { generateConfig } from "./generate-config.cjs";
2
+ export { generateConfig };
@@ -0,0 +1,2 @@
1
+ import { generateConfig } from "./generate-config.mjs";
2
+ export { generateConfig };
@@ -0,0 +1,17 @@
1
+ import { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./types/plugin.cjs";
2
+ import "./types/index.cjs";
3
+ import { Plugin } from "powerlines";
4
+
5
+ //#region src/index.d.ts
6
+ declare module "powerlines" {
7
+ interface Config {
8
+ oxlint?: OxlintPluginOptions;
9
+ }
10
+ }
11
+ /**
12
+ * A Powerlines plugin to assist in linting a project with Oxlint.
13
+ */
14
+ declare function plugin(options?: OxlintPluginOptions): Plugin<OxlintPluginContext>;
15
+ //#endregion
16
+ export { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig, plugin as default, plugin };
17
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +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"}
@@ -0,0 +1,17 @@
1
+ import { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./types/plugin.mjs";
2
+ import "./types/index.mjs";
3
+ import { Plugin } from "powerlines";
4
+
5
+ //#region src/index.d.ts
6
+ declare module "powerlines" {
7
+ interface Config {
8
+ oxlint?: OxlintPluginOptions;
9
+ }
10
+ }
11
+ /**
12
+ * A Powerlines plugin to assist in linting a project with Oxlint.
13
+ */
14
+ declare function plugin(options?: OxlintPluginOptions): Plugin<OxlintPluginContext>;
15
+ //#endregion
16
+ export { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig, plugin as default, plugin };
17
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +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"}
package/dist/index.mjs CHANGED
@@ -74,4 +74,5 @@ function plugin(options = {}) {
74
74
  var src_default = plugin;
75
75
 
76
76
  //#endregion
77
- export { src_default as default, plugin };
77
+ export { src_default as default, plugin };
78
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +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,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Context, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./plugin.cjs";
2
+ export { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig };
@@ -0,0 +1,2 @@
1
+ import { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig } from "./plugin.mjs";
2
+ export { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig };
@@ -0,0 +1,78 @@
1
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
2
+
3
+ //#region src/types/plugin.d.ts
4
+ interface OxlintPluginOptions {
5
+ /**
6
+ * A glob pattern or path to ignore files and directories.
7
+ */
8
+ ignorePatterns?: string | string[];
9
+ /**
10
+ * The path to the Oxlint configuration file.
11
+ *
12
+ * @defaultValue ".oxlintrc.json"
13
+ */
14
+ configFile?: string;
15
+ /**
16
+ * An array of rules to deny
17
+ */
18
+ deny?: string[];
19
+ /**
20
+ * An array of rules to allow
21
+ */
22
+ allow?: string[];
23
+ /**
24
+ * An array of rules to warn about
25
+ */
26
+ warn?: string[];
27
+ /**
28
+ * Additional parameters to pass to the Oxlint CLI
29
+ */
30
+ params?: string;
31
+ /**
32
+ * The path to the Oxlint binary
33
+ */
34
+ oxlintPath?: string;
35
+ /**
36
+ * Whether to enable [type-aware linting](https://oxc.rs/docs/guide/usage/linter/type-aware.html)
37
+ *
38
+ * @defaultValue true
39
+ */
40
+ typeAware?: boolean;
41
+ /**
42
+ * Whether to automatically fix fixable issues.
43
+ *
44
+ * - `true` - Automatically fix fixable issues.
45
+ * - `false` - Do not fix any issues.
46
+ * - `"suggestions"` - Only apply fixes that are considered suggestions.
47
+ * - `"dangerously"` - Apply all fixes, including those that may change code behavior.
48
+ *
49
+ * @defaultValue true
50
+ */
51
+ fix?: boolean | "suggestions" | "dangerously";
52
+ /**
53
+ * The output format for linting results.
54
+ *
55
+ * @defaultValue "stylish"
56
+ */
57
+ format?: "stylish" | "checkstyle" | "github" | "gitlab" | "json" | "junit" | "unix";
58
+ }
59
+ interface OxlintPluginUserConfig extends UserConfig {
60
+ /**
61
+ * Options for the Oxlint plugin.
62
+ */
63
+ oxlint?: OxlintPluginOptions;
64
+ }
65
+ interface OxlintPluginResolvedConfig extends ResolvedConfig {
66
+ /**
67
+ * Options for the Oxlint plugin.
68
+ */
69
+ oxlint: Omit<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format"> & Required<Pick<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format">>;
70
+ }
71
+ type OxlintPluginContext<TResolvedConfig extends OxlintPluginResolvedConfig = OxlintPluginResolvedConfig> = PluginContext<TResolvedConfig>;
72
+ declare type __ΩOxlintPluginOptions = any[];
73
+ declare type __ΩOxlintPluginUserConfig = any[];
74
+ declare type __ΩOxlintPluginResolvedConfig = any[];
75
+ declare type __ΩOxlintPluginContext = any[];
76
+ //#endregion
77
+ export { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig };
78
+ //# sourceMappingURL=plugin.d.cts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,78 @@
1
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
2
+
3
+ //#region src/types/plugin.d.ts
4
+ interface OxlintPluginOptions {
5
+ /**
6
+ * A glob pattern or path to ignore files and directories.
7
+ */
8
+ ignorePatterns?: string | string[];
9
+ /**
10
+ * The path to the Oxlint configuration file.
11
+ *
12
+ * @defaultValue ".oxlintrc.json"
13
+ */
14
+ configFile?: string;
15
+ /**
16
+ * An array of rules to deny
17
+ */
18
+ deny?: string[];
19
+ /**
20
+ * An array of rules to allow
21
+ */
22
+ allow?: string[];
23
+ /**
24
+ * An array of rules to warn about
25
+ */
26
+ warn?: string[];
27
+ /**
28
+ * Additional parameters to pass to the Oxlint CLI
29
+ */
30
+ params?: string;
31
+ /**
32
+ * The path to the Oxlint binary
33
+ */
34
+ oxlintPath?: string;
35
+ /**
36
+ * Whether to enable [type-aware linting](https://oxc.rs/docs/guide/usage/linter/type-aware.html)
37
+ *
38
+ * @defaultValue true
39
+ */
40
+ typeAware?: boolean;
41
+ /**
42
+ * Whether to automatically fix fixable issues.
43
+ *
44
+ * - `true` - Automatically fix fixable issues.
45
+ * - `false` - Do not fix any issues.
46
+ * - `"suggestions"` - Only apply fixes that are considered suggestions.
47
+ * - `"dangerously"` - Apply all fixes, including those that may change code behavior.
48
+ *
49
+ * @defaultValue true
50
+ */
51
+ fix?: boolean | "suggestions" | "dangerously";
52
+ /**
53
+ * The output format for linting results.
54
+ *
55
+ * @defaultValue "stylish"
56
+ */
57
+ format?: "stylish" | "checkstyle" | "github" | "gitlab" | "json" | "junit" | "unix";
58
+ }
59
+ interface OxlintPluginUserConfig extends UserConfig {
60
+ /**
61
+ * Options for the Oxlint plugin.
62
+ */
63
+ oxlint?: OxlintPluginOptions;
64
+ }
65
+ interface OxlintPluginResolvedConfig extends ResolvedConfig {
66
+ /**
67
+ * Options for the Oxlint plugin.
68
+ */
69
+ oxlint: Omit<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format"> & Required<Pick<OxlintPluginOptions, "configFile" | "deny" | "allow" | "warn" | "typeAware" | "fix" | "format">>;
70
+ }
71
+ type OxlintPluginContext<TResolvedConfig extends OxlintPluginResolvedConfig = OxlintPluginResolvedConfig> = PluginContext<TResolvedConfig>;
72
+ declare type __ΩOxlintPluginOptions = any[];
73
+ declare type __ΩOxlintPluginUserConfig = any[];
74
+ declare type __ΩOxlintPluginResolvedConfig = any[];
75
+ declare type __ΩOxlintPluginContext = any[];
76
+ //#endregion
77
+ export { OxlintPluginContext, OxlintPluginOptions, OxlintPluginResolvedConfig, OxlintPluginUserConfig, __ΩOxlintPluginContext, __ΩOxlintPluginOptions, __ΩOxlintPluginResolvedConfig, __ΩOxlintPluginUserConfig };
78
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-oxlint",
3
- "version": "0.7.342",
3
+ "version": "0.7.343",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for running Oxlint on the codebase.",
6
6
  "repository": {
@@ -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.3"
125
+ "powerlines": "^0.41.4"
126
126
  },
127
127
  "devDependencies": {
128
- "@powerlines/plugin-plugin": "^0.12.289",
128
+ "@powerlines/plugin-plugin": "^0.12.290",
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": "df3c5d736cd0fce20967864a4920af034e9434e3"
135
+ "gitHead": "387dd4f3e14b4e5a2580ffcf2951d7727aae15a3"
136
136
  }