@powerlines/plugin-eslint 0.8.202 → 0.8.203

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 CHANGED
@@ -2,7 +2,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_is_set_object = require('./node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.cjs');
3
3
  const require_helpers_format_message = require('./helpers/format-message.cjs');
4
4
  require('./helpers/index.cjs');
5
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
6
5
  let __stryke_fs_exists = require("@stryke/fs/exists");
7
6
  let __stryke_fs_get_parent_path = require("@stryke/fs/get-parent-path");
8
7
  let __stryke_fs_package_fns = require("@stryke/fs/package-fns");
@@ -19,7 +18,7 @@ function plugin(options = {}) {
19
18
  return {
20
19
  name: "eslint",
21
20
  async config() {
22
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `eslint` build plugin.");
21
+ this.debug("Providing default configuration for the Powerlines `eslint` build plugin.");
23
22
  return { lint: { eslint: (0, defu.defu)(options, {
24
23
  configFile: (0, __stryke_fs_get_parent_path.getParentPath)([
25
24
  "eslint.config.js",
@@ -86,7 +85,7 @@ function plugin(options = {}) {
86
85
  this.eslint = new ESLint(options$1);
87
86
  },
88
87
  async lint() {
89
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Linting project files with ESLint.`);
88
+ this.debug("Linting project files with ESLint.");
90
89
  let results = await this.eslint.lintFiles(this.tsconfig.fileNames.filter((fileName) => !fileName.includes(this.artifactsPath) && !fileName.includes("node_modules")));
91
90
  const module$1 = await this.resolver.import(this.resolver.esmResolve("eslint"));
92
91
  let ESLint;
@@ -95,7 +94,7 @@ function plugin(options = {}) {
95
94
  if (this.config.lint.eslint.reportErrorsOnly) results = ESLint.getErrorResults(results);
96
95
  const output = results.filter(({ messages }) => messages?.length).map(({ messages, filePath }) => require_helpers_format_message.formatMessage(this.config.projectRoot, messages, filePath)).join("\n");
97
96
  if (this.config.lint.eslint.outputFile) await this.fs.write(this.config.lint.eslint.outputFile, output);
98
- else this.log(__storm_software_config_tools_types.LogLevelLabel.INFO, output);
97
+ else this.info(output);
99
98
  }
100
99
  };
101
100
  }
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { LintMessage, MessageSeverity, __ΩLintMessage, __ΩMessageSeverity, formatMessage } from "./helpers/format-message.mjs";
2
2
  import { Plugin } from "./packages/powerlines/src/types/plugin.mjs";
3
3
  import { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig } from "./types/plugin.mjs";
4
- import "./types/index.mjs";
5
4
 
6
5
  //#region src/index.d.ts
7
6
 
package/dist/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import { isSetObject } from "./node_modules/.pnpm/@stryke_type-checks@0.5.20/node_modules/@stryke/type-checks/dist/is-set-object.mjs";
2
2
  import { MessageSeverity, formatMessage } from "./helpers/format-message.mjs";
3
3
  import "./helpers/index.mjs";
4
- import { LogLevelLabel } from "@storm-software/config-tools/types";
5
4
  import { existsSync } from "@stryke/fs/exists";
6
5
  import { getParentPath } from "@stryke/fs/get-parent-path";
7
6
  import { isPackageExists } from "@stryke/fs/package-fns";
@@ -18,7 +17,7 @@ function plugin(options = {}) {
18
17
  return {
19
18
  name: "eslint",
20
19
  async config() {
21
- this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `eslint` build plugin.");
20
+ this.debug("Providing default configuration for the Powerlines `eslint` build plugin.");
22
21
  return { lint: { eslint: defu(options, {
23
22
  configFile: getParentPath([
24
23
  "eslint.config.js",
@@ -85,7 +84,7 @@ function plugin(options = {}) {
85
84
  this.eslint = new ESLint(options$1);
86
85
  },
87
86
  async lint() {
88
- this.log(LogLevelLabel.TRACE, `Linting project files with ESLint.`);
87
+ this.debug("Linting project files with ESLint.");
89
88
  let results = await this.eslint.lintFiles(this.tsconfig.fileNames.filter((fileName) => !fileName.includes(this.artifactsPath) && !fileName.includes("node_modules")));
90
89
  const module = await this.resolver.import(this.resolver.esmResolve("eslint"));
91
90
  let ESLint;
@@ -94,7 +93,7 @@ function plugin(options = {}) {
94
93
  if (this.config.lint.eslint.reportErrorsOnly) results = ESLint.getErrorResults(results);
95
94
  const output = results.filter(({ messages }) => messages?.length).map(({ messages, filePath }) => formatMessage(this.config.projectRoot, messages, filePath)).join("\n");
96
95
  if (this.config.lint.eslint.outputFile) await this.fs.write(this.config.lint.eslint.outputFile, output);
97
- else this.log(LogLevelLabel.INFO, output);
96
+ else this.info(output);
98
97
  }
99
98
  };
100
99
  }
@@ -1,5 +1,3 @@
1
- import "../../types/hooks.mjs";
2
- import "../../types/resolved.mjs";
3
1
  import { SelectHooksOptions } from "../../types/context.mjs";
4
2
  import { MaybePromise } from "@stryke/types/base";
5
3
 
@@ -1,4 +1,3 @@
1
- import "./context.mjs";
2
1
  import { ArrayValues } from "@stryke/types/array";
3
2
  import { MaybePromise } from "@stryke/types/base";
4
3
 
@@ -1,19 +1,20 @@
1
1
  import { BuildConfig, BuildResolvedConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig } from "./build.mjs";
2
- import "./babel.mjs";
3
2
  import { StoragePort, StoragePreset } from "./fs.mjs";
4
3
  import { TSConfig } from "./tsconfig.mjs";
5
4
  import { PluginContext } from "./context.mjs";
6
5
  import { Plugin } from "./plugin.mjs";
7
- import { LogLevelLabel } from "@storm-software/config-tools/types";
8
6
  import { MaybePromise } from "@stryke/types/base";
9
7
  import { PreviewOptions } from "vite";
10
8
  import { Format } from "@storm-software/build-tools/types";
9
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
11
10
  import { StormWorkspaceConfig } from "@storm-software/config/types";
12
11
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
13
12
  import { AssetGlob } from "@stryke/types/file";
14
13
  import { DateString } from "compatx";
15
14
 
16
15
  //#region ../powerlines/src/types/config.d.ts
16
+
17
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
17
18
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
18
19
  /**
19
20
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -253,7 +254,7 @@ interface CommonUserConfig extends BaseConfig {
253
254
  *
254
255
  * @defaultValue "info"
255
256
  */
256
- logLevel?: LogLevelLabel | null;
257
+ logLevel?: LogLevel | null;
257
258
  /**
258
259
  * A custom logger function to use for logging messages
259
260
  */
@@ -420,4 +421,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
420
421
  command: "deploy";
421
422
  };
422
423
  //#endregion
423
- export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
424
+ export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.mjs";
2
- import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
2
+ import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
3
3
  import { NonUndefined } from "@stryke/types/base";
4
4
  import { ResolvedPreviewOptions } from "vite";
5
5
  import { TypeDefinition } from "@stryke/types/configuration";
@@ -76,7 +76,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
76
76
  *
77
77
  * @defaultValue "info"
78
78
  */
79
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
79
+ logLevel: LogLevel | null;
80
80
  };
81
81
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
82
82
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
@@ -1,5 +1,4 @@
1
1
  import { BuilderVariant, InferUnpluginVariant, UnpluginBuilderVariant } from "./build.mjs";
2
- import "./config.mjs";
3
2
  import { InferResolvedConfig } from "./resolved.mjs";
4
3
  import { Context } from "./context.mjs";
5
4
  import { API } from "./api.mjs";
@@ -14,6 +14,7 @@ import { DateString } from "compatx";
14
14
 
15
15
  //#region ../powerlines/src/types/config.d.ts
16
16
 
17
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
17
18
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
18
19
  /**
19
20
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -253,7 +254,7 @@ interface CommonUserConfig extends BaseConfig {
253
254
  *
254
255
  * @defaultValue "info"
255
256
  */
256
- logLevel?: LogLevelLabel | null;
257
+ logLevel?: LogLevel | null;
257
258
  /**
258
259
  * A custom logger function to use for logging messages
259
260
  */
@@ -420,4 +421,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
420
421
  command: "deploy";
421
422
  };
422
423
  //#endregion
423
- export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
424
+ export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.cjs";
2
- import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
2
+ import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
3
3
  import { NonUndefined } from "@stryke/types/base";
4
4
  import { ResolvedPreviewOptions } from "vite";
5
5
  import { TypeDefinition } from "@stryke/types/configuration";
@@ -76,7 +76,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
76
76
  *
77
77
  * @defaultValue "info"
78
78
  */
79
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
79
+ logLevel: LogLevel | null;
80
80
  };
81
81
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
82
82
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-eslint",
3
- "version": "0.8.202",
3
+ "version": "0.8.203",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for running ESLint on the codebase.",
6
6
  "repository": {
@@ -105,9 +105,9 @@
105
105
  "@stryke/path": "^0.26.0",
106
106
  "defu": "^6.1.4",
107
107
  "eslint": "^9.39.2",
108
- "powerlines": "^0.37.72"
108
+ "powerlines": "^0.37.73"
109
109
  },
110
110
  "devDependencies": { "@types/node": "^24.10.9" },
111
111
  "publishConfig": { "access": "public" },
112
- "gitHead": "458556ca7def9536d1c1fbd770e005a004d0a513"
112
+ "gitHead": "df743ef7ebac849eb4ce90899884df4758b61172"
113
113
  }
@@ -1,2 +0,0 @@
1
- import "./config.mjs";
2
- import "./context.mjs";