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

Meta: Turn off format on save VS Code #130

Open
justingolden21 opened this issue Apr 3, 2024 · 3 comments
Open

Meta: Turn off format on save VS Code #130

justingolden21 opened this issue Apr 3, 2024 · 3 comments

Comments

@justingolden21
Copy link

Hi, I'm trying to contribute and learn my way around the project a little, but when I use VS code and save, it auto formats the entire file, causing hundreds of lines of diff, which of course I don't want to add to a messy PR for you.

I have "format on save" off in my settings, and in your .vscode folder I don't see anything that would cause this, you don't seem to have any prettier config and your eslint config doesn't have anything for it either. Even temporarily deleting your eslint config doesn't prevent it from formatting on save, and restarting VS code didn't work either.

The weird thing is, disabling eslint extension, disabling prettier extension, deleting eslint config and restarting VS Code STILL didn't prevent it from formatting hundreds of lines when I save the file...

image

image

I even tried adding:

"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.fixAll.eslint": false
}

to my settings.json and following other steps on this stack overflow post with no luck...

I just tested and I don't have it formatting on save in any other project, which is why I figured it's specific to this one.

For now I'm using ktrl+k ctrl+shift+s, but I was wondering if you have some config somewhere deep I can't find that causes this project to format on save, as I don't encounter this problem in any other repo.

Thanks in advance.

@justingolden21
Copy link
Author

Specifically, the file app.component.html gets a big diff.

@Yqnn
Copy link
Owner

Yqnn commented Apr 14, 2024

Weird.
On my side I have both ESLint and Prettier installed and enabled, and my files are not auto-formatted on save.
Did you also check the global settings.json file ?

@justingolden21
Copy link
Author

Weird. On my side I have both ESLint and Prettier installed and enabled, and my files are not auto-formatted on save. Did you also check the global settings.json file ?

You mean my personal global settings json in vs code right? Yeah I did. Super bizarre and I tried restarting and everything. Using ctrl+k ctrl+shift+s isn't the end of the world, and maybe it'll work next time I try lol, since I was only trying on that one day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants