stylelint-webpack-plugin 2.2.1 → 2.3.2

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 CHANGED
@@ -1,20 +1,20 @@
1
- Copyright JS Foundation and other contributors
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- 'Software'), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright JS Foundation and other contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,197 +1,199 @@
1
- <div align="center">
2
- <a href="https://github.com/stylelint/stylelint"><img width="200" height="200" src="https://cdn.worldvectorlogo.com/logos/stylelint.svg"></a>
3
- <a href="https://github.com/webpack/webpack"><img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg"></a>
4
- </div>
5
-
6
- [![npm][npm]][npm-url]
7
- [![node][node]][node-url]
8
- [![deps][deps]][deps-url]
9
- [![tests][tests]][tests-url]
10
- [![coverage][cover]][cover-url]
11
- [![chat][chat]][chat-url]
12
- [![size][size]][size-url]
13
-
14
- # stylelint-webpack-plugin
15
-
16
- > A Stylelint plugin for webpack
17
-
18
- ## Install
19
-
20
- ```bash
21
- npm install stylelint-webpack-plugin --save-dev
22
- ```
23
-
24
- **Note**: You also need to install `stylelint` from npm, if you haven't already:
25
-
26
- ```bash
27
- npm install stylelint --save-dev
28
- ```
29
-
30
- ## Usage
31
-
32
- In your webpack configuration:
33
-
34
- ```js
35
- const StylelintPlugin = require('stylelint-webpack-plugin');
36
-
37
- module.exports = {
38
- // ...
39
- plugins: [new StylelintPlugin(options)],
40
- // ...
41
- };
42
- ```
43
-
44
- ## Options
45
-
46
- See [stylelint's options](http://stylelint.io/user-guide/node-api/#options) for the complete list of options available. These options are passed through to the `stylelint` directly.
47
-
48
- ### `configFile`
49
-
50
- - Type: `String`
51
- - Default: `undefined`
52
-
53
- Specify the config file location to be used by `stylelint`.
54
-
55
- **Note:** By default this is [handled by `stylelint`](http://stylelint.io/user-guide/configuration/).
56
-
57
- ### `context`
58
-
59
- - Type: `String`
60
- - Default: `compiler.context`
61
-
62
- A string indicating the root of your files.
63
-
64
- ### `exclude`
65
-
66
- - Type: `String|Array[String]`
67
- - Default: `['node_modules', compiler.options.output.path]`
68
-
69
- Specify the files and/or directories to exclude. Must be relative to `options.context`.
70
-
71
- ### `extensions`
72
-
73
- - Type: `String|Array[String]`
74
- - Default: `['css', 'scss', 'sass']`
75
-
76
- Specify extensions that should be checked.
77
-
78
- ### `files`
79
-
80
- - Type: `String|Array[String]`
81
- - Default: `null`
82
-
83
- Specify directories, files, or globs. Must be relative to `options.context`. Directories are traveresed recursively looking for files matching `options.extensions`. File and glob patterns ignore `options.extensions`.
84
-
85
- ### `fix`
86
-
87
- - Type: `Boolean`
88
- - Default: `false`
89
-
90
- If `true`, `stylelint` will fix as many errors as possible. The fixes are made to the actual source files. All unfixed errors will be reported. See [Autofixing errors](https://stylelint.io/user-guide/cli#autofixing-errors) docs.
91
-
92
- ### `formatter`
93
-
94
- - Type: `String|Function`
95
- - Default: `'string'`
96
-
97
- Specify the formatter that you would like to use to format your results. See [formatter option](https://stylelint.io/user-guide/node-api#formatter).
98
-
99
- ### `lintDirtyModulesOnly`
100
-
101
- - Type: `Boolean`
102
- - Default: `false`
103
-
104
- Lint only changed files, skip lint on start.
105
-
106
- ### `stylelintPath`
107
-
108
- - Type: `String`
109
- - Default: `stylelint`
110
-
111
- Path to `stylelint` instance that will be used for linting.
112
-
113
- ### `threads`
114
-
115
- - Type: `Boolean | Number`
116
- - Default: `false`
117
-
118
- Set to true for an auto-selected pool size based on number of cpus. Set to a number greater than 1 to set an explicit pool size. Set to false, 1, or less to disable and only run in main process.
119
-
120
- ### Errors and Warning
121
-
122
- **By default the plugin will auto adjust error reporting depending on stylelint errors/warnings counts.**
123
- You can still force this behavior by using `emitError` **or** `emitWarning` options:
124
-
125
- #### `emitError`
126
-
127
- - Type: `Boolean`
128
- - Default: `false`
129
-
130
- The errors found will always be emitted, to disable set to `false`.
131
-
132
- #### `emitWarning`
133
-
134
- - Type: `Boolean`
135
- - Default: `false`
136
-
137
- The warnings found will always be emitted, to disable set to `false`.
138
-
139
- #### `failOnError`
140
-
141
- - Type: `Boolean`
142
- - Default: `false`
143
-
144
- Will cause the module build to fail if there are any errors, to disable set to `false`.
145
-
146
- #### `failOnWarning`
147
-
148
- - Type: `Boolean`
149
- - Default: `false`
150
-
151
- Will cause the module build to fail if there are any warnings, if set to `true`.
152
-
153
- #### `quiet`
154
-
155
- - Type: `Boolean`
156
- - Default: `false`
157
-
158
- Will process and report errors only and ignore warnings, if set to `true`.
159
-
160
- #### `outputReport`
161
-
162
- - Type: `Boolean|Object`
163
- - Default: `false`
164
-
165
- Write the output of the errors to a file, for example a `json` file for use for reporting.
166
- The `filePath` is relative to the webpack config: `output.path`.
167
- You can pass in a different formatter for the output file, if none is passed in the default/configured formatter will be used.
168
-
169
- ```js
170
- {
171
- filePath: 'path/to/file';
172
- formatter: 'json';
173
- }
174
- ```
175
-
176
- ## Changelog
177
-
178
- [Changelog](CHANGELOG.md)
179
-
180
- ## License
181
-
182
- [MIT](./LICENSE)
183
-
184
- [npm]: https://img.shields.io/npm/v/stylelint-webpack-plugin.svg
185
- [npm-url]: https://npmjs.com/package/stylelint-webpack-plugin
186
- [node]: https://img.shields.io/node/v/stylelint-webpack-plugin.svg
187
- [node-url]: https://nodejs.org
188
- [deps]: https://david-dm.org/webpack-contrib/stylelint-webpack-plugin.svg
189
- [deps-url]: https://david-dm.org/webpack-contrib/stylelint-webpack-plugin
190
- [tests]: https://github.com/webpack-contrib/stylelint-webpack-plugin/workflows/stylelint-webpack-plugin/badge.svg
191
- [tests-url]: https://github.com/webpack-contrib/stylelint-webpack-plugin/actions
192
- [cover]: https://codecov.io/gh/webpack-contrib/stylelint-webpack-plugin/branch/master/graph/badge.svg
193
- [cover-url]: https://codecov.io/gh/webpack-contrib/stylelint-webpack-plugin
194
- [chat]: https://badges.gitter.im/webpack/webpack.svg
195
- [chat-url]: https://gitter.im/webpack/webpack
196
- [size]: https://packagephobia.now.sh/badge?p=stylelint-webpack-plugin
197
- [size-url]: https://packagephobia.now.sh/result?p=stylelint-webpack-plugin
1
+ <div align="center">
2
+ <a href="https://github.com/stylelint/stylelint"><img width="200" height="200" src="https://cdn.worldvectorlogo.com/logos/stylelint.svg"></a>
3
+ <a href="https://github.com/webpack/webpack"><img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg"></a>
4
+ </div>
5
+
6
+ [![npm][npm]][npm-url]
7
+ [![node][node]][node-url]
8
+ [![deps][deps]][deps-url]
9
+ [![tests][tests]][tests-url]
10
+ [![coverage][cover]][cover-url]
11
+ [![chat][chat]][chat-url]
12
+ [![size][size]][size-url]
13
+
14
+ # stylelint-webpack-plugin
15
+
16
+ > A Stylelint plugin for webpack
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ npm install stylelint-webpack-plugin@2 --save-dev
22
+ ```
23
+
24
+ **Note**: You also need to install `stylelint` from npm, if you haven't already:
25
+
26
+ ```bash
27
+ npm install stylelint --save-dev
28
+ ```
29
+
30
+ **Note**: If you are using Stylelint 13 rather than 14+, you might also need to install `@types/stylelint` as a dev dependency if getting stylelint related type errors.
31
+
32
+ ## Usage
33
+
34
+ In your webpack configuration:
35
+
36
+ ```js
37
+ const StylelintPlugin = require('stylelint-webpack-plugin');
38
+
39
+ module.exports = {
40
+ // ...
41
+ plugins: [new StylelintPlugin(options)],
42
+ // ...
43
+ };
44
+ ```
45
+
46
+ ## Options
47
+
48
+ See [stylelint's options](http://stylelint.io/user-guide/node-api/#options) for the complete list of options available. These options are passed through to the `stylelint` directly.
49
+
50
+ ### `configFile`
51
+
52
+ - Type: `String`
53
+ - Default: `undefined`
54
+
55
+ Specify the config file location to be used by `stylelint`.
56
+
57
+ **Note:** By default this is [handled by `stylelint`](http://stylelint.io/user-guide/configuration/).
58
+
59
+ ### `context`
60
+
61
+ - Type: `String`
62
+ - Default: `compiler.context`
63
+
64
+ A string indicating the root of your files.
65
+
66
+ ### `exclude`
67
+
68
+ - Type: `String|Array[String]`
69
+ - Default: `['node_modules', compiler.options.output.path]`
70
+
71
+ Specify the files and/or directories to exclude. Must be relative to `options.context`.
72
+
73
+ ### `extensions`
74
+
75
+ - Type: `String|Array[String]`
76
+ - Default: `['css', 'scss', 'sass']`
77
+
78
+ Specify extensions that should be checked.
79
+
80
+ ### `files`
81
+
82
+ - Type: `String|Array[String]`
83
+ - Default: `null`
84
+
85
+ Specify directories, files, or globs. Must be relative to `options.context`. Directories are traveresed recursively looking for files matching `options.extensions`. File and glob patterns ignore `options.extensions`.
86
+
87
+ ### `fix`
88
+
89
+ - Type: `Boolean`
90
+ - Default: `false`
91
+
92
+ If `true`, `stylelint` will fix as many errors as possible. The fixes are made to the actual source files. All unfixed errors will be reported. See [Autofixing errors](https://stylelint.io/user-guide/cli#autofixing-errors) docs.
93
+
94
+ ### `formatter`
95
+
96
+ - Type: `String|Function`
97
+ - Default: `'string'`
98
+
99
+ Specify the formatter that you would like to use to format your results. See [formatter option](https://stylelint.io/user-guide/node-api#formatter).
100
+
101
+ ### `lintDirtyModulesOnly`
102
+
103
+ - Type: `Boolean`
104
+ - Default: `false`
105
+
106
+ Lint only changed files, skip lint on start.
107
+
108
+ ### `stylelintPath`
109
+
110
+ - Type: `String`
111
+ - Default: `stylelint`
112
+
113
+ Path to `stylelint` instance that will be used for linting.
114
+
115
+ ### `threads`
116
+
117
+ - Type: `Boolean | Number`
118
+ - Default: `false`
119
+
120
+ Set to true for an auto-selected pool size based on number of cpus. Set to a number greater than 1 to set an explicit pool size. Set to false, 1, or less to disable and only run in main process.
121
+
122
+ ### Errors and Warning
123
+
124
+ **By default the plugin will auto adjust error reporting depending on stylelint errors/warnings counts.**
125
+ You can still force this behavior by using `emitError` **or** `emitWarning` options:
126
+
127
+ #### `emitError`
128
+
129
+ - Type: `Boolean`
130
+ - Default: `false`
131
+
132
+ The errors found will always be emitted, to disable set to `false`.
133
+
134
+ #### `emitWarning`
135
+
136
+ - Type: `Boolean`
137
+ - Default: `false`
138
+
139
+ The warnings found will always be emitted, to disable set to `false`.
140
+
141
+ #### `failOnError`
142
+
143
+ - Type: `Boolean`
144
+ - Default: `false`
145
+
146
+ Will cause the module build to fail if there are any errors, to disable set to `false`.
147
+
148
+ #### `failOnWarning`
149
+
150
+ - Type: `Boolean`
151
+ - Default: `false`
152
+
153
+ Will cause the module build to fail if there are any warnings, if set to `true`.
154
+
155
+ #### `quiet`
156
+
157
+ - Type: `Boolean`
158
+ - Default: `false`
159
+
160
+ Will process and report errors only and ignore warnings, if set to `true`.
161
+
162
+ #### `outputReport`
163
+
164
+ - Type: `Boolean|Object`
165
+ - Default: `false`
166
+
167
+ Write the output of the errors to a file, for example a `json` file for use for reporting.
168
+ The `filePath` is relative to the webpack config: `output.path`.
169
+ You can pass in a different formatter for the output file, if none is passed in the default/configured formatter will be used.
170
+
171
+ ```js
172
+ {
173
+ filePath: 'path/to/file';
174
+ formatter: 'json';
175
+ }
176
+ ```
177
+
178
+ ## Changelog
179
+
180
+ [Changelog](CHANGELOG.md)
181
+
182
+ ## License
183
+
184
+ [MIT](./LICENSE)
185
+
186
+ [npm]: https://img.shields.io/npm/v/stylelint-webpack-plugin/2x.svg
187
+ [npm-url]: https://npmjs.com/package/stylelint-webpack-plugin/v/2x
188
+ [node]: https://img.shields.io/node/v/stylelint-webpack-plugin/2x.svg
189
+ [node-url]: https://nodejs.org
190
+ [deps]: https://david-dm.org/webpack-contrib/stylelint-webpack-plugin.svg
191
+ [deps-url]: https://david-dm.org/webpack-contrib/stylelint-webpack-plugin
192
+ [tests]: https://github.com/webpack-contrib/stylelint-webpack-plugin/workflows/stylelint-webpack-plugin/badge.svg?branch=2.x
193
+ [tests-url]: https://github.com/webpack-contrib/stylelint-webpack-plugin/actions
194
+ [cover]: https://codecov.io/gh/webpack-contrib/stylelint-webpack-plugin/branch/2.x/graph/badge.svg
195
+ [cover-url]: https://codecov.io/gh/webpack-contrib/stylelint-webpack-plugin/branch/2.x
196
+ [chat]: https://badges.gitter.im/webpack/webpack.svg
197
+ [chat-url]: https://gitter.im/webpack/webpack
198
+ [size]: https://packagephobia.now.sh/badge?p=stylelint-webpack-plugin
199
+ [size-url]: https://packagephobia.now.sh/result?p=stylelint-webpack-plugin
@@ -1,3 +1,4 @@
1
+ /// <reference types="stylelint" />
1
2
  /**
2
3
  * @param {string|undefined} key
3
4
  * @param {Options} options
@@ -7,7 +8,52 @@ export default function getStylelint(
7
8
  key: string | undefined,
8
9
  { threads, ...options }: Options
9
10
  ): Linter;
10
- export type Stylelint = typeof import('stylelint');
11
+ export type Stylelint = import('postcss').PluginCreator<
12
+ import('stylelint').PostcssPluginOptions
13
+ > & {
14
+ lint: (
15
+ options: import('stylelint').LinterOptions
16
+ ) => Promise<import('stylelint').LinterResult>;
17
+ rules: {
18
+ [k: string]: import('stylelint').Rule<any, any>;
19
+ };
20
+ formatters: {
21
+ [k: string]: import('stylelint').Formatter;
22
+ };
23
+ createPlugin: (
24
+ ruleName: string,
25
+ plugin: import('stylelint').Plugin<any, any>
26
+ ) => {
27
+ ruleName: string;
28
+ rule: import('stylelint').Rule<any, any>;
29
+ };
30
+ createLinter: (
31
+ options: import('stylelint').LinterOptions
32
+ ) => import('stylelint').InternalApi;
33
+ utils: {
34
+ report: (problem: import('stylelint').Problem) => void;
35
+ ruleMessages: <
36
+ T extends import('stylelint').RuleMessages,
37
+ R extends { [K in keyof T]: T[K] }
38
+ >(
39
+ ruleName: string,
40
+ messages: T
41
+ ) => R;
42
+ validateOptions: (
43
+ result: import('stylelint').PostcssResult,
44
+ ruleName: string,
45
+ ...optionDescriptions: import('stylelint').RuleOptions[]
46
+ ) => boolean;
47
+ checkAgainstRule: <T_1, O extends Object>(
48
+ options: {
49
+ ruleName: string;
50
+ ruleSettings: import('stylelint').ConfigRuleSettings<T_1, O>;
51
+ root: import('postcss').Root;
52
+ },
53
+ callback: (warning: import('postcss').Warning) => void
54
+ ) => void;
55
+ };
56
+ };
11
57
  export type LintResult = import('stylelint').LintResult;
12
58
  export type Options = import('./options').Options;
13
59
  export type AsyncTask = () => Promise<void>;
@@ -20,7 +20,11 @@ declare class StylelintWebpackPlugin {
20
20
  */
21
21
  run(compiler: Compiler): Promise<void>;
22
22
  startTime: number;
23
- prevTimestamps: Map<any, any>;
23
+ /** @type {ReadonlyMap<string, null | FileSystemInfoEntry | "ignore" | undefined>} */
24
+ prevTimestamps: ReadonlyMap<
25
+ string,
26
+ 'ignore' | FileSystemInfoEntry | null | undefined
27
+ >;
24
28
  /**
25
29
  * @param {Compiler} compiler
26
30
  * @returns {void}
@@ -40,10 +44,13 @@ declare class StylelintWebpackPlugin {
40
44
  */
41
45
  getFiles(compiler: Compiler, wanted: string[], exclude: string[]): string[];
42
46
  /**
43
- * @param {Map<string, null | FileSystemInfoEntry | "ignore">} fileTimestamps
47
+ * @param {ReadonlyMap<string, null | FileSystemInfoEntry | "ignore" | undefined>} fileTimestamps
44
48
  * @returns {string[]}
45
49
  */
46
50
  getChangedFiles(
47
- fileTimestamps: Map<string, 'ignore' | FileSystemInfoEntry | null>
51
+ fileTimestamps: ReadonlyMap<
52
+ string,
53
+ 'ignore' | FileSystemInfoEntry | null | undefined
54
+ >
48
55
  ): string[];
49
56
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="stylelint" />
1
2
  /**
2
3
  * @param {string|undefined} key
3
4
  * @param {Options} options
@@ -13,7 +14,52 @@ export default function linter(
13
14
  report: Reporter;
14
15
  threads: number;
15
16
  };
16
- export type Stylelint = typeof import('stylelint');
17
+ export type Stylelint = import('postcss').PluginCreator<
18
+ import('stylelint').PostcssPluginOptions
19
+ > & {
20
+ lint: (
21
+ options: import('stylelint').LinterOptions
22
+ ) => Promise<import('stylelint').LinterResult>;
23
+ rules: {
24
+ [k: string]: import('stylelint').Rule<any, any>;
25
+ };
26
+ formatters: {
27
+ [k: string]: import('stylelint').Formatter;
28
+ };
29
+ createPlugin: (
30
+ ruleName: string,
31
+ plugin: import('stylelint').Plugin<any, any>
32
+ ) => {
33
+ ruleName: string;
34
+ rule: import('stylelint').Rule<any, any>;
35
+ };
36
+ createLinter: (
37
+ options: import('stylelint').LinterOptions
38
+ ) => import('stylelint').InternalApi;
39
+ utils: {
40
+ report: (problem: import('stylelint').Problem) => void;
41
+ ruleMessages: <
42
+ T extends import('stylelint').RuleMessages,
43
+ R extends { [K in keyof T]: T[K] }
44
+ >(
45
+ ruleName: string,
46
+ messages: T
47
+ ) => R;
48
+ validateOptions: (
49
+ result: import('stylelint').PostcssResult,
50
+ ruleName: string,
51
+ ...optionDescriptions: import('stylelint').RuleOptions[]
52
+ ) => boolean;
53
+ checkAgainstRule: <T_1, O extends Object>(
54
+ options: {
55
+ ruleName: string;
56
+ ruleSettings: import('stylelint').ConfigRuleSettings<T_1, O>;
57
+ root: import('postcss').Root;
58
+ },
59
+ callback: (warning: import('postcss').Warning) => void
60
+ ) => void;
61
+ };
62
+ };
17
63
  export type LintResult = import('stylelint').LintResult;
18
64
  export type Compiler = import('webpack').Compiler;
19
65
  export type Compilation = import('webpack').Compilation;
@@ -1,3 +1,4 @@
1
+ /// <reference types="stylelint" />
1
2
  /** @typedef {import("stylelint")} stylelint */
2
3
  /** @typedef {import("stylelint").LinterOptions} StylelintOptions */
3
4
  /** @typedef {import("stylelint").FormatterType} FormatterType */
@@ -36,7 +37,52 @@ export function getOptions(pluginOptions: Options): Partial<PluginOptions>;
36
37
  export function getStylelintOptions(
37
38
  pluginOptions: Options
38
39
  ): Partial<StylelintOptions>;
39
- export type stylelint = typeof import('stylelint');
40
+ export type stylelint = import('postcss').PluginCreator<
41
+ import('stylelint').PostcssPluginOptions
42
+ > & {
43
+ lint: (
44
+ options: import('stylelint').LinterOptions
45
+ ) => Promise<import('stylelint').LinterResult>;
46
+ rules: {
47
+ [k: string]: import('stylelint').Rule<any, any>;
48
+ };
49
+ formatters: {
50
+ [k: string]: import('stylelint').Formatter;
51
+ };
52
+ createPlugin: (
53
+ ruleName: string,
54
+ plugin: import('stylelint').Plugin<any, any>
55
+ ) => {
56
+ ruleName: string;
57
+ rule: import('stylelint').Rule<any, any>;
58
+ };
59
+ createLinter: (
60
+ options: import('stylelint').LinterOptions
61
+ ) => import('stylelint').InternalApi;
62
+ utils: {
63
+ report: (problem: import('stylelint').Problem) => void;
64
+ ruleMessages: <
65
+ T extends import('stylelint').RuleMessages,
66
+ R extends { [K in keyof T]: T[K] }
67
+ >(
68
+ ruleName: string,
69
+ messages: T
70
+ ) => R;
71
+ validateOptions: (
72
+ result: import('stylelint').PostcssResult,
73
+ ruleName: string,
74
+ ...optionDescriptions: import('stylelint').RuleOptions[]
75
+ ) => boolean;
76
+ checkAgainstRule: <T_1, O extends Object>(
77
+ options: {
78
+ ruleName: string;
79
+ ruleSettings: import('stylelint').ConfigRuleSettings<T_1, O>;
80
+ root: import('postcss').Root;
81
+ },
82
+ callback: (warning: import('postcss').Warning) => void
83
+ ) => void;
84
+ };
85
+ };
40
86
  export type StylelintOptions = import('stylelint').LinterOptions;
41
87
  export type FormatterType = import('stylelint').FormatterType;
42
88
  export type OutputReport = {