Answer the question
In order to leave comments, you need to log in
How to write a rule for TSLint with an error correction function?
Good day.
You need to write a rule in your Angular8+ project to lint .ts files.
Those guides that I found on the first two pages of Yandex and Google search results only show how to write a rule that shows an error.
I want to write a rule that can fix this error.
Well, so that you can hover over the error, click Quick Fix and one of the options will be a fix that I implement in my tslint rule or just run the linter with --fix-all and all errors will be fixed.
Actually, tell me, where are the guides / manuals on how, in addition to finding an error, write a function for fixing it in a custom rule for tslint?
Or just look at the source code of the standard rules and do it in the image and likeness?
PS
Yes, I know that tslint is "outdated" and you need to move to eslint, but the project currently has tslint and there are things tailored for it.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question