-
Notifications
You must be signed in to change notification settings - Fork 92
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
stylelint fix findings #122
Comments
I haven't had a lot of time for this project lately, so I'm not sure how stylelint's autofixing is implemented. Would be interesting to know if it is easy to implement fixing for plugins. Any ideas @jeddy3 @davidtheclark @evilebottnawi ? |
Enabling plugins to autofix their violations is one of the driving forces behind adding the feature to stylelint. |
@kristerkari I'm integrating Is there any chance we can promote this? |
@OriR That sure is quite frustrating. I might have some time in the near future to look at implementing Any help to add fixing to rules and any ideas how to get people to help is appreciated. :) |
I'm a big believer in just asking nicely ;) So I'm here to help! let me know how you want to divide the work, and if you could point me at the right direction so I'll start poking around the code I'll get right on it 😃 |
I'm very happy that you want to help with this @OriR 🙏So thanks in advance! First of all, there are some rules that can be too complicated to implement If it helps, we can start gathering a list of rules that can support fixing. It's very easy to add unit tests for the fix flag, you just need to enable it in tests ( The code to do the fixing can be very simple or somewhat complicated depending on the rule. You can use |
There's also documentation for autofixing: |
I took a quick look at the readme and I think the
Rules that I'm not sure about are:
The rest are "pattern" or "missing" rules that I don't think are even possible to automatically fix. I think this is a good place to start from, WDYT @kristerkari ? |
@OriR That list looks really good! Thanks! The ones you are not sure about are rules that most likely can not have autofixing and the same goes for "pattern" and "missing" rules. I created a new milestone called "--fix", so we can start implementing autofix to rules one-by-one. It's probably a good idea to update your list when working on a rule by marking |
@kristerkari Wow! |
Haha, don't worry, there are still plenty of rules that need autofix. You can have a look at my pull requests for example of how I have implemented autofixing :) |
Yeah sure! |
btw. |
Yeah, saw that 😞 |
We can maybe skip the rules that use |
This has been released in 3.0.0. Thanks for helping! |
Hello! |
Not fixed yet |
Not fixed @kristerkari , the problem @PurpleTape says is still happening
|
Hi,
is there a possibility to have findings like whitespaces in comments as specified in rule
scss/double-slash-comment-whitespace-inside
fixed automatically?The text was updated successfully, but these errors were encountered: