New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for enabling a rule with stylelint-command comments #5554
Comments
For reference, ESLint has this feature. Is this something that's already possible to do in Stylelint? I tried the one I mentioned in the comment above and a couple of variations, but couldn't figure out a working one. |
@AndreasNasman Thanks for the suggestion. As I know, stylelint doesn't have such a feature. For example, see the demo. |
Currently, stylelint has two kinds of comments: |
This feature SGTM. It's likely related to #2643 as files are linted first and then errors within disable ranges are removed. Feel free to investigate how the stylelint-commands code can be rearchitected to facilitate a new Now is a good time to look into this as the internals have been improved as we move towards releasing 14.0.0 (see #5542 & #5521, in particular). These command comments should take the highest precedence, over I've labelled the issue as ready to implement. Please consider contributing if you have time. |
|
Not sure what you mean @stof. You can enable/disable/customize ESLint rules through comments anywhere in a file. The rules also don't have to be configured in |
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant. |
Enabling a rule (with options) using stylelint-commands.
Being possible to write e.g.
to enable
declaration-no-important
with warning severity for a single file.The text was updated successfully, but these errors were encountered: