-
Notifications
You must be signed in to change notification settings - Fork 472
Add ESLint, Prettier run-on-save VSCode settings #302
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
Comments
willing to pull for this |
The writing style conforms to the vscode specifications.{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[sass]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
} |
@aentwist I like this suggestion as well. |
Don't care anymore but maybe I'll get around to these two. Between specifying file types for Prettier and simply not, what do you think? After this time has passed I might now prefer to see {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
} I can't really remember why I used to like scoping them at this point. |
If you don't care anymore, you can simply close this issue, no worries. If you want to implement this, I think that, ideally, if the user picked prettier, then we should suggest the prettier vscode extension, and add the settings. But I don't know what happens if the settings is added and vscode can't find the extension (I suppose it is fine? But that should be checked) |
@aentwist This suggestion is implemented and is part of the latest release. You can close this issue. :) |
How about adding ESLint settings as well?
|
I'm not sure exactly what @yoshi-pi that is no longer supported. The current version would be either |
@aentwist Thank you for letting me know. I think it's best to use "explicit" as described in the ESLint extension:
|
Description
When using ESLint, add a lint-on-save VSCode setting.
When using Prettier, add format-on-save and default formatter settings.
Proposed Solution
.vscode/settings.json
Notes
Cross reference the Prettier language support with VSCode language identifiers and add everything applicable.
See https://prettier.io/docs/en/index.html
and https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers
The text was updated successfully, but these errors were encountered: