@powerlines/plugin-stylelint 0.1.202 → 0.1.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 +6 -7
- package/dist/index.mjs +6 -7
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/commands.d.mts +0 -1
- package/dist/powerlines/src/types/config.d.cts +3 -2
- package/dist/powerlines/src/types/config.d.mts +5 -4
- package/dist/powerlines/src/types/resolved.d.cts +2 -2
- package/dist/powerlines/src/types/resolved.d.mts +2 -2
- package/dist/powerlines/src/types/unplugin.d.mts +0 -1
- package/package.json +4 -4
- package/dist/powerlines/src/types/babel.d.mts +0 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
4
3
|
let __stryke_fs_get_parent_path = require("@stryke/fs/get-parent-path");
|
|
5
4
|
let __stryke_path_append = require("@stryke/path/append");
|
|
6
5
|
let __stryke_path_join = require("@stryke/path/join");
|
|
@@ -16,7 +15,7 @@ function plugin(options = {}) {
|
|
|
16
15
|
return {
|
|
17
16
|
name: "stylelint",
|
|
18
17
|
async config() {
|
|
19
|
-
this.
|
|
18
|
+
this.debug("Providing default configuration for the Powerlines `stylelint` build plugin.");
|
|
20
19
|
return { lint: { stylelint: (0, defu.defu)(options, {
|
|
21
20
|
configFile: (0, __stryke_fs_get_parent_path.getParentPath)([
|
|
22
21
|
"stylelint.config.js",
|
|
@@ -42,15 +41,15 @@ function plugin(options = {}) {
|
|
|
42
41
|
}) } };
|
|
43
42
|
},
|
|
44
43
|
async lint() {
|
|
45
|
-
this.
|
|
44
|
+
this.debug(`Linting project files with Stylelint.`);
|
|
46
45
|
const result = await stylelint.default.lint(options);
|
|
47
46
|
if (this.config.lint.stylelint.outputFile) await this.fs.write((0, __stryke_path_append.appendPath)(this.config.lint.stylelint.outputFile, this.config.projectRoot), result.report);
|
|
48
47
|
if (!this.config.lint.stylelint.silent) {
|
|
49
|
-
this.
|
|
48
|
+
this.info(result.report);
|
|
50
49
|
const totalWarnings = result.results.map((res) => res.warnings.filter((warn) => warn.severity === "warning")).reduce((prev, res) => prev + res.length, 0);
|
|
51
|
-
if (totalWarnings > 0) this.
|
|
52
|
-
else if (result.errored) this.
|
|
53
|
-
else this.
|
|
50
|
+
if (totalWarnings > 0) this.warn(`${totalWarnings} Stylelint linting warnings found in the listed files.`);
|
|
51
|
+
else if (result.errored) this.error("Stylelint linting errors found in the listed files.");
|
|
52
|
+
else this.info("All files pass Stylelint linting.");
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
55
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
2
1
|
import { getParentPath } from "@stryke/fs/get-parent-path";
|
|
3
2
|
import { appendPath } from "@stryke/path/append";
|
|
4
3
|
import { joinPaths } from "@stryke/path/join";
|
|
@@ -13,7 +12,7 @@ function plugin(options = {}) {
|
|
|
13
12
|
return {
|
|
14
13
|
name: "stylelint",
|
|
15
14
|
async config() {
|
|
16
|
-
this.
|
|
15
|
+
this.debug("Providing default configuration for the Powerlines `stylelint` build plugin.");
|
|
17
16
|
return { lint: { stylelint: defu(options, {
|
|
18
17
|
configFile: getParentPath([
|
|
19
18
|
"stylelint.config.js",
|
|
@@ -39,15 +38,15 @@ function plugin(options = {}) {
|
|
|
39
38
|
}) } };
|
|
40
39
|
},
|
|
41
40
|
async lint() {
|
|
42
|
-
this.
|
|
41
|
+
this.debug(`Linting project files with Stylelint.`);
|
|
43
42
|
const result = await stylelint.lint(options);
|
|
44
43
|
if (this.config.lint.stylelint.outputFile) await this.fs.write(appendPath(this.config.lint.stylelint.outputFile, this.config.projectRoot), result.report);
|
|
45
44
|
if (!this.config.lint.stylelint.silent) {
|
|
46
|
-
this.
|
|
45
|
+
this.info(result.report);
|
|
47
46
|
const totalWarnings = result.results.map((res) => res.warnings.filter((warn) => warn.severity === "warning")).reduce((prev, res) => prev + res.length, 0);
|
|
48
|
-
if (totalWarnings > 0) this.
|
|
49
|
-
else if (result.errored) this.
|
|
50
|
-
else this.
|
|
47
|
+
if (totalWarnings > 0) this.warn(`${totalWarnings} Stylelint linting warnings found in the listed files.`);
|
|
48
|
+
else if (result.errored) this.error("Stylelint linting errors found in the listed files.");
|
|
49
|
+
else this.info("All files pass Stylelint linting.");
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
};
|
|
@@ -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?:
|
|
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,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?:
|
|
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:
|
|
79
|
+
logLevel: LogLevel | null;
|
|
80
80
|
};
|
|
81
81
|
type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
|
|
82
82
|
type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
|
|
@@ -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:
|
|
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-stylelint",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.203",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running Stylelint on the codebase.",
|
|
6
6
|
"repository": {
|
|
@@ -109,13 +109,13 @@
|
|
|
109
109
|
"@stryke/fs": "^0.33.36",
|
|
110
110
|
"@stryke/path": "^0.26.0",
|
|
111
111
|
"defu": "^6.1.4",
|
|
112
|
-
"powerlines": "^0.37.
|
|
112
|
+
"powerlines": "^0.37.73",
|
|
113
113
|
"stylelint": "^16.26.1"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
116
|
+
"@powerlines/plugin-plugin": "^0.12.151",
|
|
117
117
|
"@types/node": "^24.10.9"
|
|
118
118
|
},
|
|
119
119
|
"publishConfig": { "access": "public" },
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "df743ef7ebac849eb4ce90899884df4758b61172"
|
|
121
121
|
}
|