|
| 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,54 @@ 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('stylelint/node_modules/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('stylelint/node_modules/postcss').Root; |
| 81 | + }, |
| 82 | + callback: ( |
| 83 | + warning: import('stylelint/node_modules/postcss').Warning |
| 84 | + ) => void |
| 85 | + ) => void; |
| 86 | + }; |
| 87 | +}; |
40 | 88 | export type StylelintOptions = import('stylelint').LinterOptions; |
41 | 89 | export type FormatterType = import('stylelint').FormatterType; |
42 | 90 | export type OutputReport = { |
|
0 commit comments