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.
@@ -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: <
@@ -1,2 +0,0 @@
1
- export default StylelintError;
2
- declare class StylelintError extends Error {}
@@ -1,3 +0,0 @@
1
- declare const _exports: typeof plugin.default;
2
- export = _exports;
3
- import plugin = require('./index');
package/dist/cjs.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- const plugin = require('./index');
4
-
5
- module.exports = plugin.default;