There are several developers working in my current project with different coding styles. Therefore, I need to configure my vscode with settings:
eslint to tslintMy current config:
{
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.insertSpaces": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"[javascript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"[json]": {
"editor.formatOnSave": true
},
}
Well, I would also hope to hear how developers solve a similar problem when working in Vim (because sometimes I use it). Thank you!
The August 2020 update came with an option to "Only format modified" https://code.visualstudio.com/updates/v1_49#_only-format-modified-text That should cover 1. and 2. i belive.
If you want to format via eslint --fix, thats something that I'm looking for the answer to as well.
only "eslint --fix" modified lines
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With