stylelint-webpack-plugin 2.3.2 → 2.4.0
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/LICENSE +20 -20
- package/README.md +199 -199
- package/dist/StylelintError.js +4 -10
- package/dist/getStylelint.js +47 -40
- package/dist/index.js +90 -71
- package/dist/linter.js +67 -61
- package/dist/options.js +40 -41
- package/dist/options.json +80 -80
- package/dist/utils.js +33 -40
- package/dist/worker.js +5 -5
- package/package.json +23 -23
- package/types/StylelintError.d.ts +8 -0
- package/{declarations → types}/getStylelint.d.ts +35 -13
- package/{declarations → types}/index.d.ts +22 -11
- package/{declarations → types}/linter.d.ts +44 -15
- package/{declarations → types}/options.d.ts +47 -38
- package/{declarations → types}/utils.d.ts +5 -0
- package/{declarations → types}/worker.d.ts +9 -0
- package/declarations/StylelintError.d.ts +0 -2
- package/declarations/cjs.d.ts +0 -3
- package/dist/cjs.js +0 -5
|
@@ -1,42 +1,4 @@
|
|
|
1
1
|
/// <reference types="stylelint" />
|
|
2
|
-
/** @typedef {import("stylelint")} stylelint */
|
|
3
|
-
/** @typedef {import("stylelint").LinterOptions} StylelintOptions */
|
|
4
|
-
/** @typedef {import("stylelint").FormatterType} FormatterType */
|
|
5
|
-
/**
|
|
6
|
-
* @typedef {Object} OutputReport
|
|
7
|
-
* @property {string=} filePath
|
|
8
|
-
* @property {FormatterType=} formatter
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* @typedef {Object} PluginOptions
|
|
12
|
-
* @property {string} context
|
|
13
|
-
* @property {boolean} emitError
|
|
14
|
-
* @property {boolean} emitWarning
|
|
15
|
-
* @property {string|string[]=} exclude
|
|
16
|
-
* @property {string|string[]} extensions
|
|
17
|
-
* @property {boolean} failOnError
|
|
18
|
-
* @property {boolean} failOnWarning
|
|
19
|
-
* @property {string|string[]} files
|
|
20
|
-
* @property {FormatterType} formatter
|
|
21
|
-
* @property {boolean} lintDirtyModulesOnly
|
|
22
|
-
* @property {boolean} quiet
|
|
23
|
-
* @property {string} stylelintPath
|
|
24
|
-
* @property {OutputReport} outputReport
|
|
25
|
-
* @property {number|boolean=} threads
|
|
26
|
-
*/
|
|
27
|
-
/** @typedef {Partial<PluginOptions & StylelintOptions>} Options */
|
|
28
|
-
/**
|
|
29
|
-
* @param {Options} pluginOptions
|
|
30
|
-
* @returns {Partial<PluginOptions>}
|
|
31
|
-
*/
|
|
32
|
-
export function getOptions(pluginOptions: Options): Partial<PluginOptions>;
|
|
33
|
-
/**
|
|
34
|
-
* @param {Options} pluginOptions
|
|
35
|
-
* @returns {Partial<StylelintOptions>}
|
|
36
|
-
*/
|
|
37
|
-
export function getStylelintOptions(
|
|
38
|
-
pluginOptions: Options
|
|
39
|
-
): Partial<StylelintOptions>;
|
|
40
2
|
export type stylelint = import('postcss').PluginCreator<
|
|
41
3
|
import('stylelint').PostcssPluginOptions
|
|
42
4
|
> & {
|
|
@@ -59,6 +21,15 @@ export type stylelint = import('postcss').PluginCreator<
|
|
|
59
21
|
createLinter: (
|
|
60
22
|
options: import('stylelint').LinterOptions
|
|
61
23
|
) => import('stylelint').InternalApi;
|
|
24
|
+
resolveConfig: (
|
|
25
|
+
filePath: string,
|
|
26
|
+
options?:
|
|
27
|
+
| Pick<
|
|
28
|
+
import('stylelint').LinterOptions,
|
|
29
|
+
'cwd' | 'config' | 'configFile' | 'configBasedir'
|
|
30
|
+
>
|
|
31
|
+
| undefined
|
|
32
|
+
) => Promise<import('stylelint').Config | undefined>;
|
|
62
33
|
utils: {
|
|
63
34
|
report: (problem: import('stylelint').Problem) => void;
|
|
64
35
|
ruleMessages: <
|
|
@@ -106,3 +77,41 @@ export type PluginOptions = {
|
|
|
106
77
|
threads?: (number | boolean) | undefined;
|
|
107
78
|
};
|
|
108
79
|
export type Options = Partial<PluginOptions & StylelintOptions>;
|
|
80
|
+
/** @typedef {import("stylelint")} stylelint */
|
|
81
|
+
/** @typedef {import("stylelint").LinterOptions} StylelintOptions */
|
|
82
|
+
/** @typedef {import("stylelint").FormatterType} FormatterType */
|
|
83
|
+
/**
|
|
84
|
+
* @typedef {Object} OutputReport
|
|
85
|
+
* @property {string=} filePath
|
|
86
|
+
* @property {FormatterType=} formatter
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* @typedef {Object} PluginOptions
|
|
90
|
+
* @property {string} context
|
|
91
|
+
* @property {boolean} emitError
|
|
92
|
+
* @property {boolean} emitWarning
|
|
93
|
+
* @property {string|string[]=} exclude
|
|
94
|
+
* @property {string|string[]} extensions
|
|
95
|
+
* @property {boolean} failOnError
|
|
96
|
+
* @property {boolean} failOnWarning
|
|
97
|
+
* @property {string|string[]} files
|
|
98
|
+
* @property {FormatterType} formatter
|
|
99
|
+
* @property {boolean} lintDirtyModulesOnly
|
|
100
|
+
* @property {boolean} quiet
|
|
101
|
+
* @property {string} stylelintPath
|
|
102
|
+
* @property {OutputReport} outputReport
|
|
103
|
+
* @property {number|boolean=} threads
|
|
104
|
+
*/
|
|
105
|
+
/** @typedef {Partial<PluginOptions & StylelintOptions>} Options */
|
|
106
|
+
/**
|
|
107
|
+
* @param {Options} pluginOptions
|
|
108
|
+
* @returns {Partial<PluginOptions>}
|
|
109
|
+
*/
|
|
110
|
+
export function getOptions(pluginOptions: Options): Partial<PluginOptions>;
|
|
111
|
+
/**
|
|
112
|
+
* @param {Options} pluginOptions
|
|
113
|
+
* @returns {Partial<StylelintOptions>}
|
|
114
|
+
*/
|
|
115
|
+
export function getStylelintOptions(
|
|
116
|
+
pluginOptions: Options
|
|
117
|
+
): Partial<StylelintOptions>;
|
|
@@ -16,4 +16,9 @@ export function parseFoldersToGlobs(
|
|
|
16
16
|
patterns: string | string[],
|
|
17
17
|
extensions?: string | string[]
|
|
18
18
|
): string[];
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param {string} _ key, but unused
|
|
22
|
+
* @param {any} value
|
|
23
|
+
*/
|
|
19
24
|
export function jsonStringifyReplacerSortKeys(_: string, value: any): any;
|
|
@@ -21,6 +21,15 @@ export type Stylelint = import('postcss').PluginCreator<
|
|
|
21
21
|
createLinter: (
|
|
22
22
|
options: import('stylelint').LinterOptions
|
|
23
23
|
) => import('stylelint').InternalApi;
|
|
24
|
+
resolveConfig: (
|
|
25
|
+
filePath: string,
|
|
26
|
+
options?:
|
|
27
|
+
| Pick<
|
|
28
|
+
import('stylelint').LinterOptions,
|
|
29
|
+
'cwd' | 'config' | 'configFile' | 'configBasedir'
|
|
30
|
+
>
|
|
31
|
+
| undefined
|
|
32
|
+
) => Promise<import('stylelint').Config | undefined>;
|
|
24
33
|
utils: {
|
|
25
34
|
report: (problem: import('stylelint').Problem) => void;
|
|
26
35
|
ruleMessages: <
|
package/declarations/cjs.d.ts
DELETED