Add an option to ignore all issues which are not auto-fixeable with `stylelint-disable-next-line [list of rules]` comment
What is the problem you're trying to solve?
Migrating old codebase to stylelint without turning off stylelint rules.
Of course, there are some other solutions for this problem like disabling stylelint for all old files and gradually migrating them. But I think that such disable comments together with some /TODO: get rid of this disable comment/ comment is more useful, because every developer that will work on some piece of the functionality will explicitly see that he needs to reformat this piece of the code. It is especially useful for hude codebases with a lot of devs.
What solution would you like to see?
New option, that can be applied when fixing stylelint issues, that will add disable comment for all lines with problems.
Example of using:
stylelint 'src/**/*.scss' --syntax scss --fix --disable-unresolved
Original code:
...
.my-class {}
...
Code after modification:
...
// TODO: get rid of disable comment next time when editing
/* stylelint-disable-next-line rule1, rule2 */
.my-class {}
...
@bondom Thanks for using the template. The suggestion looks good to me. 👍🏼
I remember there was a 3rd-party ESLint plugin that did something similar, but I've forgotten the name. 😅
@ybiquitous maybe https://github.com/dyoshikawa/eslint-disable-commenter/ or https://github.com/CorentinDoue/eslint-disable-inserter?
Um, I don't remember, sorry. 😓
But, if someone published a plugin for this feature, we could evaluate whether we should bring it to the Stylelint core.