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]: Format Document not working ((still ask about "postcss-scss", and use the "customSyntax" option)) #328
Comments
I have the same problem |
Able to replicate this. To format documents, we take the formatting options (e.g. indent size, tabs or spaces) from VS Code, convert them into their respective Stylelint rules (e.g. the I think that the best way to handle this is to have a way to tell Stylelint, "hey, these options are actually meant to override options you find, so keep looking for a config file." Otherwise, we'd have to effectively duplicate the logic Stylelint already has for searching for, reading, and making sense of config files, which I don't think would be the best way forward. I'll raise an issue upstream to try and figure out what's the best way to handle this issue and I'll link it here. |
Now I can format the less file correctly, but I still can't format the styles in the Vue file. |
Blocked by stylelint/stylelint#5723 Once implemented, we'll make changes here to resolve the Stylelint config for a given file and then use it as a base for the formatting options provided by the client. |
If I'm following this conversation it might be the reason why my .stylelintrc file is being completely ignored. Right-clicking in a stylesheet and choosing to format the document ignores the stylelint config whereas saving the file will trigger the format in a different way and the config will be found. |
@adalinesimonian Do you have a sense for when this issue might be resolved? It appears that stylelint/stylelint#5723 is fixed now. Thanks for maintaining this extension! |
I've labeled as help wanted now that the upstream issues is resolved. Please consider contributing if you have time. |
I'm assuming since this issue hasn't been closed that no fix has been released yet? I'm also experiencing the same exact problem. My stylelint config is in "stylelint": {
"extends": [
"stylelint-config-standard-scss"
]
}
{
"stylelint.validate": ["css", "scss"],
"[css]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"[scss]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"css.validate": false,
"less.validate": false,
"scss.validate": false
} Package versions:
Symptoms: The only thing that doesn't work is vscode's
Installing |
Any update? I have the same problem... |
Thank you @EvanShaw for your perfect description of the bug. 👍🏼 |
I have the same problem! |
Can you just delete default rules then? |
Same problem |
@adalinesimonian I understand this was blocked by Blocked by stylelint/stylelint#5723. Great you managed to fix it in stylelint/stylelint#5734, did you have any plans for updating this plugin to use the new change ? :D Thanks for your time. |
Hi ! Thanks for the great job on this extension ! I'm having the same problem on my side and i'm wondering if an update will be released soon ? :) |
Same problem still. VSCode |
fix by this. |
same issue +1 |
I'm having this problem as well. Is there any update on this? |
I've been facing the same issue but finally found a workaround. I stopped using this plugin as a formatter and instead run command line on save with Run on Save plugin. This is my settings.json (you need to change extensions and package managers according to your environment) {
"stylelint.validate": ["css", "scss"],
"css.validate": false,
"scss.validate": false,
"stylelint.config": null,
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.*scss$",
"isAsync": true,
"cmd": "yarn stylelint ${file} --fix"
}
]
}
} This workaround solved my problem but I hope this issue is solved in the future. |
How did you encounter this bug?
I tried to use
Format Document
but it doesn't work.Note:
Fix all stylelint autofixable
works all the timeMy
package.json
:My
.stylelintrc
:Code Snippet
Extension Configuration
Actual Behaviour
Format Document
not workingExpected Behaviour
Format Document
should workingLogs
I am not sure when/where to use the
NODE_ENV
since I am using WLS2 on Windows?Anyway, the current Stylelint OUTPUT is as follows:
Stylelint Version
14.1.0
vscode-stylelint Version
1.2.0
Node.js Version
v16.13.0
Operating System
Ubuntu 20.04 focal on WSL2
Windows Subsystem for Linux
WSL2 on Win 10 , x64 10.0.19043
Code of Conduct
The text was updated successfully, but these errors were encountered: