Skip to content
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 can't trigger auto fix #485

Open
1 task done
Yueyanc opened this issue Dec 7, 2023 · 13 comments
Open
1 task done

[Bug]: format can't trigger auto fix #485

Yueyanc opened this issue Dec 7, 2023 · 13 comments
Labels
type: bug a problem with a feature or rule

Comments

@Yueyanc
Copy link

Yueyanc commented Dec 7, 2023

How did you encounter this bug?

if vscode setting has

{ "files.insertFinalNewline": true }

auto fix can't be trigger.

analyzed the source code find this

Snipaste_2023-12-07_23-20-13

and

Snipaste_2023-12-07_23-21-19

if has config , will get the cache.

can't to find cofig file for gernerate configoptions

Link to Minimal Reproducible Example

without

Code Snippet

No response

Stylelint Configuration

No response

Extension Configuration

No response

Actual Behaviour

auto fix

Expected Behaviour

can't auto fix

Logs

No response

Stylelint Version

v15.11.0

vscode-stylelint Version

v1.3.0

Node.js Version

v16.14.2

Operating System

windows

Windows Subsystem for Linux

No response

Code of Conduct

  • I agree to follow vscode-stylelint's Code of Conduct
@Yueyanc Yueyanc added the type: bug a problem with a feature or rule label Dec 7, 2023
@Yueyanc
Copy link
Author

Yueyanc commented Dec 7, 2023

insertSpaces,tabSize,insertFinalNewline,trimTrailingWhitespace,These configurations cause the auto fix to fail

@Yueyanc
Copy link
Author

Yueyanc commented Dec 7, 2023

Snipaste_2023-12-07_23-26-40

@Yueyanc
Copy link
Author

Yueyanc commented Dec 7, 2023

image

this config will resolve the problem

@Yueyanc
Copy link
Author

Yueyanc commented Dec 7, 2023

#431

@StfBauer
Copy link

I think I have the same issue - I try to use the following configurations https://gist.github.com/StfBauer/e33f5dda5545b9adafb030992df42a9e

While this perfectly works from the command line, VS Code does nothing. The question is, do I do something wrong, or is it a general issue?

Meanwhile, the only option I have is to execute stylelint from the terminal window, which is also fine for me for now.

@Yueyanc
Copy link
Author

Yueyanc commented Jan 15, 2024

I think I have the same issue - I try to use the following configurations https://gist.github.com/StfBauer/e33f5dda5545b9adafb030992df42a9e

While this perfectly works from the command line, VS Code does nothing. The question is, do I do something wrong, or is it a general issue?

Meanwhile, the only option I have is to execute stylelint from the terminal window, which is also fine for me for now.

You should check here for any errors
@StfBauer
image

@StfBauer
Copy link

@chenzhuo198 same as you.

image

@Yueyanc
Copy link
Author

Yueyanc commented Jan 15, 2024

@chenzhuo198 same as you.

image

@StfBauer
then check if your vscode setting.json has insertSpaces,tabSize,insertFinalNewline,trimTrailingWhitespace,Comment it out

image

@StfBauer
Copy link

@chenzhuo198 None of such things - just checked the user settings not the default vscode settings.

btw. first image not loading for me.

@Yueyanc
Copy link
Author

Yueyanc commented Jan 16, 2024

@chenzhuo198 None of such things - just checked the user settings not the default vscode settings.

btw. first image not loading for me.

the first image is your reply image ,dont master;

image

try add editor.codeActionsOnSave:{ source.fixAll:ture} in vscode setting file

@StfBauer
Copy link

StfBauer commented Jan 16, 2024

Both haven't worked:
Screenshot 2024-01-16 at 14 50 47

or
Screenshot 2024-01-16 at 14 50 35

@Yueyanc
Copy link
Author

Yueyanc commented Jan 16, 2024

Both haven't worked: Screenshot 2024-01-16 at 14 50 47

or Screenshot 2024-01-16 at 14 50 35

And then try to source. FixAll. Styleint: true and source fixAll. Eslint: true and, if not work, I didn't also the way

@StfBauer
Copy link

Nope, haven't worked either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a problem with a feature or rule
Projects
None yet
Development

No branches or pull requests

2 participants