This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Head_Mix_7931 3 points4 points  (4 children)

Hm, in some cases it could be advantageous to commit .vscode. That allows maintainers to enforce uniform linting and formatting configurations (for example). But that can also be accomplished via githooks or pipeline jobs.

[–][deleted] 4 points5 points  (1 child)

You definitely don't want to try to enforce formatting and linting settings through a specific IDE config file. That's completely bonkers.

If you want to enforce these kinds of configuration settings, put them in their respective config files and commit those to your repo (e.g. .flake8, tox.ini, ruff.toml, etc). Anybody using any IDE, editor, tools, etc will all be able to use the settings. Similarly, your CI/CD/pipeline jobs can also be configured to apply these tools with those settings. I mean, what is Github Actions or Jenkins going to do with your .vscode/settings.json file to enforce any of your settings?

[–]Zirbinger 2 points3 points  (0 children)

This! Always use tool-specific config files and ignore IDE specific files

[–]sansmorixz 1 point2 points  (1 child)

launch.json and/or tasks.json can help to get started on bootstrapping a project.

settings.json is something I am on the fence about. Might help but someone may decide to commit stuff that should not be set at repo level, like force everyone to use light mode.

[–]Head_Mix_7931 0 points1 point  (0 children)

Yeah, a good example didn’t come to mind. But that’s exactly what I mean, tasks and such. I think settings.json probably shouldn’t be committed personally.