-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Bug]: extension doesn't work since 1.0.0 #284
Comments
Thanks for the bug report. To help figure out what's happening here, can you paste in the extension logs when VS Code is run with |
Seeing the same issue. Auto fix no longer functions. Here's my output after attempting to fire fix on save and through using the command palette:
Node 12.22.3 |
Strangely, I cannot reproduce the bug anymore. I upgraded the extension to 1.0.3 and it works. In version 1.0.3 I have a warning message :
Locally in my project, I use stylelint v13. |
Glad to hear it! 1.0.3 has a bug fix for resolving Stylelint — perhaps that was the issue that you were running into.
v1 of the extension was released together with Stylelint 14. While 13 may continue to work, it is no longer supported, so we highly recommend upgrading to Stylelint 14 — the extension migration guide and the Stylelint 14 migration guide explain what steps to take. I'm closing this issue as the problem you originally ran into seems to be fixed. @rpivet If you continue to experience bugged behaviour, please open a new issue, thanks! |
I'm still having issues with this, i installed stylelint 14.0.1, vscode-styleling 1.0.3, and i'm using emotionJS for styling, so my css properties are in *.styles.js files, but Vscode is not highlighting the wrong order of css properties. I tried to add to my .stylelintrc file, but without results(of course i also installed the postcss-styled package). |
Does this work for you when using Stylelint from the command line? If not, go ahead and file a bug report. |
Maybe I'm hijacking here but I'm having trouble seeing the reasoning behind introducing multiple breaking changes in v1. VSCode is auto-updating extensions for most people and it took us a while to even discover that this extension was broken with our current configuration. And it seems that there are no errors, warnings or notifications. It's just silently failing. We have a rather large project with fixed dependencies and upgrading Stylelint to v14 isn't as simple as it sounds. I feel like supporting only the latest release is a little too close to cutting edge. I also don't know the reasoning behind changes to default validators. Was the complexity caused by supporting them out of the box really worth the trade-off for requiring extra configuration to use widely used pre-processors? I appreciate this extension getting updates as it seemed abandoned before but I hope some of these concerns can be understood too. |
@mbacalan The difficulty for us is the old behaviour of the extension, where it would try linting any file type under the sun. We had a lot of issues with users where the extension was running Stylelint on file types it shouldn't have because of all the languages that were validated by default. Additionally, there was also the biggest breaking change in Stylelint 14, where auto-inferral of syntaxes was removed. So, we made the decision to rip the bandaid off and only validate CSS by default, remove the That said, I think that there is room for improvement. A few days ago, I was mulling over the idea of perhaps having some way to auto-detect if Stylelint was configured for a specific file — some way of knowing whether or not Stylelint had
The extension should be displaying errors in any workspace where it resolves a version of Stylelint less than 14: However, because the extension only lints CSS by default, and the error is only displayed when a file that can be linted is opened, it wouldn't show in precisely the case you describe. Perhaps a better trigger for the warning would be when a workspace is opened; I think that'd be a good change we could make. If you have any additional concerns, please open a new issue; that way the people subscribed to this issue, which was for a resolution bug, won't get email notifications for unrelated discussion. Thanks! |
How did you encounter this bug?
Stylelint works as expected with my module bundler (Webpack) but the autofix on save and the
Cmd Shift P > Stylelint: Fix all auto-fixable Problems
command doesn't work anymore on VSCode.Code Snippet
Log in Webpack :
My stylelintrc config file is not located on the root workspace.
wp-content/themes/<THEME>/.stylelintrc
Extension Configuration
Actual Behaviour
I cannot autofix with VSCode the stylelint issues.
Rollback to v0.87.6 fix the problem.
Expected Behaviour
I should be able to autofix stylelint issues with the latest version of the extension.
Stylelint Version
v14.0.1
vscode-stylelint Version
v1.0.2
Node.js Version
v14.16.1
Code of Conduct
The text was updated successfully, but these errors were encountered: