Replies: 2 comments
-
These are related.
The follow can be separated proposal.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Create an issue #835 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is collection of proposals about new message format.
Main purpose aim to extend existing message format for new client app like editor.
Probably, we split these proposal into issues.
Feel free to comment it about these proposals.
Purpose
We want to extends message format for some reasons.
This proposal describe the reason.
Suggestions
textlint first target is CI and Command line Tools.
We want to support editor like VSCode.
--fix
is useful but it provide only a single suggestion.Some rules want to provide multiple suggestions.
This proposal will near to current
fix
property.Proposal:
suggest
property to RuleErrorsuggest
should have an array of object that hasid
andfix
andmessage
propertysuggest
property will be intoTextlintMessage
textlint
cli may does not provide fixing function the suggest at firstid
of suggestion.(ESLint does not have theid
)Similar Works:
Improve error location
Currently, error message has only start position.
It prevents that underline actual error text.
Some editor plugin requires the full locations includes start and end.
Proposal
locator
function andlocation
propertylocator
has.range([number, number)
and.location({ start, end })
MessageId and Localization
messages
createTranslator
can use themessages
id
can be omitted if the translator function is used.id
same withmssages
key name.Localize message:
Related Issues:
Improves Error documentation
We heard that "how to fix the error?" from textlint users.
Almost error messages does not provide the way.
Of course, some error message show it clearly.
The necessary conditions:
Proposals:
docs.url
andmessageId
to each error message{docs.url}#{MessageId}
Similar works
meta.docs.url
fileddocs
andmessages
Related Changes
Compatibility
Full backward compatible, maybe.
location
is new propertysuggest
is new propertylocator
is new functioncreateTranslator
is new functionmeta
property newlytextlint-tester
may have breaking changes, but it will cover almost compatibleBeta Was this translation helpful? Give feedback.
All reactions