-
Notifications
You must be signed in to change notification settings - Fork 89
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
Option to follow only rules described in .stylelintrc #86
Comments
@cbrwizard nice idea, I'd be interested in this as well. |
This tool is a strong candidate at my organization, but the enforcement of default rules is a current point of contention. Stylelint does explicitly state that rules are off by default, where as stylefmt will have default values applied for rules even if they are omitted. This seems to be a design difference between stylefmt and the project it is based off of. Are there plans to realign this difference and allow rules to be off unless they are turned on, such as how stylelint works? And maybe a better question, would you even want PRs that try to add this behavior? 😄 |
Now, stylefmt can handle many stylelint rules, so I decided to implement |
Same issue here. It makes Stylefmt format all places, which are acceptable by Stylelint config file. It would be great to see |
I'd like to see |
Is this fixed ? I have the same issue. Thanks |
I'm also confused about the state of this issue, and I think it's a vital one to address. Stylefmt making opinionated changes to code that on occasion directly counter what is set in Take, for example, this Stylelint setting: I think it's essential that Stylefmt becomes a no-defaults tool so that it is in sync with the tool it uses for configuration. |
@morishitter can you confirm, is |
@benfrain; I'm afraid not... I can't seem to find it anywhere in the repository: https://github.com/morishitter/stylefmt/search?utf8=%E2%9C%93&q=onlyStylelint. @morishitter, an update on this would be greatly appreciated. |
Hey, it's great that you added support for
.stylelintrc
!I started using it in my project and I have noticed that, apparently,
stylefmt
uses a merging strategy when choosing rules: it follows.stylelintrc
rules and also appliesstylefmt
's standard ones for the rules it didn't find/recognize in.stylelintrc
.For instance, I follow stylelint-config-standard rules, where a block like
is allowed. Having a
.stylelintrc
with these simple contentsdoes not raise an error or a warning when running
stylelint
for a block like the one ^. However, it gets auto formatted intowhen I run
stylefmt
.I think it would be great if there was a CLI option
--only-stylelint
or something like that which when passed would forcestylefmt
to format only the rules found/recognized in.stylelintrc
file and do not do anything extra.The text was updated successfully, but these errors were encountered: