@@ -13,6 +13,10 @@ declare namespace getStylelint {
1313 export {
1414 Stylelint ,
1515 LintResult ,
16+ LinterOptions ,
17+ LinterResult ,
18+ Formatter ,
19+ FormatterType ,
1620 Options ,
1721 isPathIgnored ,
1822 AsyncTask ,
@@ -29,67 +33,17 @@ type Linter = {
2933 cleanup : AsyncTask ;
3034 threads : number ;
3135} ;
32- type Stylelint = import ( 'postcss' ) . PluginCreator <
33- import ( 'stylelint' ) . PostcssPluginOptions
34- > & {
35- lint : (
36- options : import ( 'stylelint' ) . LinterOptions
37- ) => Promise < import ( 'stylelint' ) . LinterResult > ;
38- rules : {
39- [ k : string ] : import ( 'stylelint' ) . Rule < any , any > ;
40- } ;
36+ type Stylelint = {
37+ lint : ( options : LinterOptions ) => Promise < LinterResult > ;
4138 formatters : {
4239 [ k : string ] : import ( 'stylelint' ) . Formatter ;
4340 } ;
44- createPlugin: (
45- ruleName : string ,
46- rule : import ( 'stylelint' ) . Rule < any , any >
47- ) => {
48- ruleName : string ;
49- rule : import ( 'stylelint' ) . Rule < any , any > ;
50- } ;
51- createLinter : (
52- options : import ( 'stylelint' ) . LinterOptions
53- ) => import ( 'stylelint' ) . InternalApi ;
54- resolveConfig : (
55- filePath : string ,
56- options ?:
57- | Pick <
58- import ( 'stylelint' ) . LinterOptions ,
59- 'cwd' | 'config' | 'configFile' | 'configBasedir'
60- >
61- | undefined
62- ) => Promise < import ( 'stylelint' ) . Config | undefined > ;
63- utils : {
64- report : ( problem : import ( 'stylelint' ) . Problem ) => void ;
65- ruleMessages : <
66- T extends import ( 'stylelint' ) . RuleMessages ,
67- R extends { [ K in keyof T ] : T [ K ] }
68- > (
69- ruleName : string ,
70- messages : T
71- ) => R ;
72- validateOptions : (
73- result : import ( 'stylelint' ) . PostcssResult ,
74- ruleName : string ,
75- ...optionDescriptions : import ( 'stylelint' ) . RuleOptions [ ]
76- ) => boolean ;
77- checkAgainstRule : < T_1 , O extends Object > (
78- options : {
79- ruleName : string ;
80- ruleSettings : import ( 'stylelint' ) . ConfigRuleSettings < T_1 , O > ;
81- root : import ( 'postcss' ) . Root ;
82- result ?: import ( 'stylelint' ) . PostcssResult | undefined ;
83- context ?: import ( 'stylelint' ) . RuleContext | undefined ;
84- } ,
85- callback : ( warning : import ( 'postcss' ) . Warning ) => void
86- ) => void ;
87- } ;
88- reference : {
89- longhandSubPropertiesOfShorthandProperties : import ( 'stylelint' ) . LonghandSubPropertiesOfShorthandProperties ;
90- } ;
9141} ;
9242type LintResult = import ( 'stylelint' ) . LintResult ;
43+ type LinterOptions = import ( 'stylelint' ) . LinterOptions ;
44+ type LinterResult = import ( 'stylelint' ) . LinterResult ;
45+ type Formatter = import ( 'stylelint' ) . Formatter ;
46+ type FormatterType = import ( 'stylelint' ) . FormatterType ;
9347type isPathIgnored = (
9448 stylelint : Stylelint ,
9549 filePath : string
0 commit comments