You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that the simplest way is to add a property for rule metadata to LinterResult (used as the second argument of Formatter). See the relevant type definitions:
What is the problem you're trying to solve?
I want to write a custom formatter with rule metadata (e.g. rule doc URL), but now there is no way to use easily rule metadata.
For example, the built-in
verbose
formatter uses an internal API (_postcssResult
):stylelint/lib/formatters/verboseFormatter.js
Lines 109 to 119 in ece68bc
I want to use a public API for this purpose.
What solution would you like to see?
I think that the simplest way is to add a property for rule metadata to
LinterResult
(used as the second argument ofFormatter
). See the relevant type definitions:Formatter
:stylelint/types/stylelint/index.d.ts
Line 129 in ece68bc
NOTE: It looks possible to change
returnValue?: LinterResult
(optional) toreturnValue: LinterResult
(required).LinterResult
:stylelint/types/stylelint/index.d.ts
Lines 311 to 328 in ece68bc
The use of
LinterResult
on the public API:stylelint/types/stylelint/index.d.ts
Lines 367 to 372 in ece68bc
If you know of a better way, please let me know.
The text was updated successfully, but these errors were encountered: