Skip to content

Add .vscode/settings.json & extensions.json files to project #41496

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

Closed
coliff opened this issue May 26, 2025 · 1 comment · Fixed by #41498
Closed

Add .vscode/settings.json & extensions.json files to project #41496

coliff opened this issue May 26, 2025 · 1 comment · Fixed by #41498

Comments

@coliff
Copy link
Contributor

coliff commented May 26, 2025

On all projects I work on with others I always commit a .vscode folder with extensions.json and settings.json files so that when a colleague or outside contributor clones the repo they will be recommended to install helpful extensions and have their code automatically fixed/linted thanks to the settings.json config.

As VS Code has such a huge marketshare (and it's close competitors are forks of VS Code and support the same files) it could make sense to add it to the project and may mean that the code quality of contributed PRs may improve as bugs, spelling mistakes and linting issues are fixed earlier.

A couple of suggested configs below, I'm sure they could be improved upon though such as adding default formatters for more file-types.

{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "EditorConfig.EditorConfig",
    "streetsidesoftware.code-spell-checker",
    "stylelint.vscode-stylelint"
  ]
}
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.fixAll.stylelint": "always"
  },
  "editor.renderWhitespace": "all",
  "scss.validate": false,
  "stylelint.enable": true,
  "stylelint.validate": ["scss"]
}

If you don't want to do this, it's fine, just a suggestion :-)

@julien-deramond
Copy link
Member

I'm personally not opposed to the idea. Like you said, it's quite common when contributing to other Open Source projects. We could even include a launch.json launching the docs server. I'm definitely interested in trying out the configuration you suggested, using either VS Code or Cursor, to see how it works in practice.

If you don’t mind, would you be able to open a PR so we can experiment with it?

@mdo Would you also be open to adding this to the repo?

coliff added a commit to coliff/bootstrap that referenced this issue May 27, 2025
mdo pushed a commit that referenced this issue May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants