@powerlines/plugin-stylelint 0.1.334 → 0.1.336
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.mjs +1 -2
- package/package.json +7 -7
- package/dist/index.d.cts +0 -17
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -17
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types/index.d.cts +0 -2
- package/dist/types/index.d.mts +0 -2
- package/dist/types/plugin.d.cts +0 -46
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -46
- package/dist/types/plugin.d.mts.map +0 -1
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-stylelint",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.336",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running Stylelint on the codebase.",
|
|
6
6
|
"repository": {
|
|
@@ -91,20 +91,20 @@
|
|
|
91
91
|
"powerlines-plugin"
|
|
92
92
|
],
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"@storm-software/config-tools": "^1.189.
|
|
95
|
-
"@stryke/fs": "^0.33.
|
|
96
|
-
"@stryke/path": "^0.26.
|
|
94
|
+
"@storm-software/config-tools": "^1.189.26",
|
|
95
|
+
"@stryke/fs": "^0.33.56",
|
|
96
|
+
"@stryke/path": "^0.26.18",
|
|
97
97
|
"defu": "^6.1.4",
|
|
98
|
-
"powerlines": "^0.40.
|
|
98
|
+
"powerlines": "^0.40.19",
|
|
99
99
|
"stylelint": "^16.26.1"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
102
|
+
"@powerlines/plugin-plugin": "^0.12.283",
|
|
103
103
|
"@types/node": "^25.4.0"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": { "access": "public" },
|
|
106
106
|
"main": "./dist/index.cjs",
|
|
107
107
|
"module": "./dist/index.mjs",
|
|
108
108
|
"types": "./dist/index.d.cts",
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "7496a546473274494be487ebc33cf267ed5cd1f0"
|
|
110
110
|
}
|
package/dist/index.d.cts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig } 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
|
-
stylelint?: StylelintPluginOptions;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A Powerlines plugin to assist in linting stylesheets with Stylelint.
|
|
13
|
-
*/
|
|
14
|
-
declare function plugin(options?: StylelintPluginOptions): Plugin<StylelintPluginContext>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig, plugin as default, plugin };
|
|
17
|
-
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA8BwB,SAAA,CAAA,EAIR,sBAJQ;EAAA;;;;AAWxB;AACW,iBADK,MAAA,CACL,OAAA,CAAA,EAAA,sBAAA,CAAA,EACR,MADQ,CACD,sBADC,CAAA"}
|
package/dist/index.d.mts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig } 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
|
-
stylelint?: StylelintPluginOptions;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A Powerlines plugin to assist in linting stylesheets with Stylelint.
|
|
13
|
-
*/
|
|
14
|
-
declare function plugin(options?: StylelintPluginOptions): Plugin<StylelintPluginContext>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig, plugin as default, plugin };
|
|
17
|
-
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA8BwB,SAAA,CAAA,EAIR,sBAJQ;EAAA;;;;AAWxB;AACW,iBADK,MAAA,CACL,OAAA,CAAA,EAAA,sBAAA,CAAA,EACR,MADQ,CACD,sBADC,CAAA"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 { getParentPath } from \"@stryke/fs/get-parent-path\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { defu } from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport stylelint from \"stylelint\";\nimport {\n StylelintPluginContext,\n StylelintPluginOptions,\n StylelintPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n stylelint?: StylelintPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in linting stylesheets with Stylelint.\n */\nexport function plugin(\n options: StylelintPluginOptions = {}\n): Plugin<StylelintPluginContext> {\n return {\n name: \"stylelint\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `stylelint` build plugin.\"\n );\n\n const configFile = getParentPath(\n [\n \"stylelint.config.js\",\n \"stylelint.config.mjs\",\n \"stylelint.config.cjs\",\n \"stylelint.config.ts\",\n \"stylelint.config.mts\",\n \"stylelint.config.cts\",\n \".stylelintrc.js\",\n \".stylelintrc.cjs\",\n \".stylelintrc.yaml\",\n \".stylelintrc.yml\",\n \".stylelintrc.json\",\n \".stylelintrc\"\n ],\n this.config.root,\n {\n ignoreCase: true,\n skipCwd: false,\n includeNameInResults: true\n }\n );\n\n return {\n stylelint: defu(options, {\n configFile,\n cwd: joinPaths(this.workspaceConfig.workspaceRoot, this.config.root),\n silent: this.config.logLevel !== null,\n fix: true\n })\n } as Partial<StylelintPluginResolvedConfig>;\n },\n async lint() {\n this.debug(`Linting project files with Stylelint.`);\n\n const result = await stylelint.lint(options);\n\n if (this.config.stylelint.outputFile) {\n await this.fs.write(\n appendPath(this.config.stylelint.outputFile, this.config.root),\n result.report\n );\n }\n\n if (!this.config.stylelint.silent) {\n this.info(result.report);\n\n const totalWarnings = result.results\n .map(res => res.warnings.filter(warn => warn.severity === \"warning\"))\n .reduce((prev, res) => prev + res.length, 0);\n if (totalWarnings > 0) {\n this.warn(\n `${totalWarnings} Stylelint linting warnings found in the listed files.`\n );\n } else if (result.errored) {\n this.error(\"Stylelint linting errors found in the listed files.\");\n } else {\n this.info(\"All files pass Stylelint linting.\");\n }\n }\n }\n };\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AAyCA,SAAgB,OACd,UAAkC,EAAE,EACJ;AAChC,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,QAAK,MACH,+EACD;AAyBD,UAAO,EACL,WAAW,KAAK,SAAS;IACvB,YAzBe,cACjB;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACD,EACD,KAAK,OAAO,MACZ;KACE,YAAY;KACZ,SAAS;KACT,sBAAsB;KACvB,CACF;IAKG,KAAK,UAAU,KAAK,gBAAgB,eAAe,KAAK,OAAO,KAAK;IACpE,QAAQ,KAAK,OAAO,aAAa;IACjC,KAAK;IACN,CAAC,EACH;;EAEH,MAAM,OAAO;AACX,QAAK,MAAM,wCAAwC;GAEnD,MAAM,SAAS,MAAM,UAAU,KAAK,QAAQ;AAE5C,OAAI,KAAK,OAAO,UAAU,WACxB,OAAM,KAAK,GAAG,MACZ,WAAW,KAAK,OAAO,UAAU,YAAY,KAAK,OAAO,KAAK,EAC9D,OAAO,OACR;AAGH,OAAI,CAAC,KAAK,OAAO,UAAU,QAAQ;AACjC,SAAK,KAAK,OAAO,OAAO;IAExB,MAAM,gBAAgB,OAAO,QAC1B,KAAI,QAAO,IAAI,SAAS,QAAO,SAAQ,KAAK,aAAa,UAAU,CAAC,CACpE,QAAQ,MAAM,QAAQ,OAAO,IAAI,QAAQ,EAAE;AAC9C,QAAI,gBAAgB,EAClB,MAAK,KACH,GAAG,cAAc,wDAClB;aACQ,OAAO,QAChB,MAAK,MAAM,sDAAsD;QAEjE,MAAK,KAAK,oCAAoC;;;EAIrD;;AAGH,kBAAe"}
|
package/dist/types/index.d.cts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig } from "./plugin.cjs";
|
|
2
|
-
export { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig };
|
package/dist/types/index.d.mts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig } from "./plugin.mjs";
|
|
2
|
-
export { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig };
|
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
2
|
-
import { FixMode, LinterOptions } from "stylelint";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
interface StylelintPluginOptions extends Partial<LinterOptions> {
|
|
6
|
-
/**
|
|
7
|
-
* The path to the Stylelint configuration file.
|
|
8
|
-
*/
|
|
9
|
-
configFile?: string;
|
|
10
|
-
/**
|
|
11
|
-
* An optional path to output the linting results to.
|
|
12
|
-
*/
|
|
13
|
-
outputFile?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Whether to suppress output to the console.
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue false
|
|
18
|
-
*/
|
|
19
|
-
silent?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Whether to automatically fix problems
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue true
|
|
24
|
-
*/
|
|
25
|
-
fix?: boolean | FixMode;
|
|
26
|
-
}
|
|
27
|
-
interface StylelintPluginUserConfig extends UserConfig {
|
|
28
|
-
/**
|
|
29
|
-
* Options for the Stylelint plugin.
|
|
30
|
-
*/
|
|
31
|
-
stylelint?: StylelintPluginOptions;
|
|
32
|
-
}
|
|
33
|
-
interface StylelintPluginResolvedConfig extends ResolvedConfig {
|
|
34
|
-
/**
|
|
35
|
-
* Options for the Stylelint plugin.
|
|
36
|
-
*/
|
|
37
|
-
stylelint: StylelintPluginOptions;
|
|
38
|
-
}
|
|
39
|
-
type StylelintPluginContext<TResolvedConfig extends StylelintPluginResolvedConfig = StylelintPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
40
|
-
declare type __ΩStylelintPluginOptions = any[];
|
|
41
|
-
declare type __ΩStylelintPluginUserConfig = any[];
|
|
42
|
-
declare type __ΩStylelintPluginResolvedConfig = any[];
|
|
43
|
-
declare type __ΩStylelintPluginContext = any[];
|
|
44
|
-
//#endregion
|
|
45
|
-
export { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig };
|
|
46
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,sBAAA,SAA+B,QAAQ;;AAAxD;;EAuBkB,UAAA,CAAA,EAAA,MAAA;EAvB8B;;AA0BhD;EAOiB,UAAA,CAAA,EAAA,MAAA;EAOL;;;;;EAGK,MAAA,CAAA,EAAA,OAAA;;;;;;kBApBC;;UAGD,yBAAA,SAAkC;;;;cAIrC;;UAGG,6BAAA,SAAsC;;;;aAI1C;;KAGD,+CACc,gCACtB,iCACA,cAAc"}
|
package/dist/types/plugin.d.mts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { FixMode, LinterOptions } from "stylelint";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
interface StylelintPluginOptions extends Partial<LinterOptions> {
|
|
6
|
-
/**
|
|
7
|
-
* The path to the Stylelint configuration file.
|
|
8
|
-
*/
|
|
9
|
-
configFile?: string;
|
|
10
|
-
/**
|
|
11
|
-
* An optional path to output the linting results to.
|
|
12
|
-
*/
|
|
13
|
-
outputFile?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Whether to suppress output to the console.
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue false
|
|
18
|
-
*/
|
|
19
|
-
silent?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Whether to automatically fix problems
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue true
|
|
24
|
-
*/
|
|
25
|
-
fix?: boolean | FixMode;
|
|
26
|
-
}
|
|
27
|
-
interface StylelintPluginUserConfig extends UserConfig {
|
|
28
|
-
/**
|
|
29
|
-
* Options for the Stylelint plugin.
|
|
30
|
-
*/
|
|
31
|
-
stylelint?: StylelintPluginOptions;
|
|
32
|
-
}
|
|
33
|
-
interface StylelintPluginResolvedConfig extends ResolvedConfig {
|
|
34
|
-
/**
|
|
35
|
-
* Options for the Stylelint plugin.
|
|
36
|
-
*/
|
|
37
|
-
stylelint: StylelintPluginOptions;
|
|
38
|
-
}
|
|
39
|
-
type StylelintPluginContext<TResolvedConfig extends StylelintPluginResolvedConfig = StylelintPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
40
|
-
declare type __ΩStylelintPluginOptions = any[];
|
|
41
|
-
declare type __ΩStylelintPluginUserConfig = any[];
|
|
42
|
-
declare type __ΩStylelintPluginResolvedConfig = any[];
|
|
43
|
-
declare type __ΩStylelintPluginContext = any[];
|
|
44
|
-
//#endregion
|
|
45
|
-
export { StylelintPluginContext, StylelintPluginOptions, StylelintPluginResolvedConfig, StylelintPluginUserConfig, __ΩStylelintPluginContext, __ΩStylelintPluginOptions, __ΩStylelintPluginResolvedConfig, __ΩStylelintPluginUserConfig };
|
|
46
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,sBAAA,SAA+B,QAAQ;;AAAxD;;EAuBkB,UAAA,CAAA,EAAA,MAAA;EAvB8B;;AA0BhD;EAOiB,UAAA,CAAA,EAAA,MAAA;EAOL;;;;;EAGK,MAAA,CAAA,EAAA,OAAA;;;;;;kBApBC;;UAGD,yBAAA,SAAkC;;;;cAIrC;;UAGG,6BAAA,SAAsC;;;;aAI1C;;KAGD,+CACc,gCACtB,iCACA,cAAc"}
|