I'm using prettier & eslint on vs code and i would like to stop it from formatting my .env file on save.
It adds semi-colons to the end of every variable, which is obviously not good.
I'm using prettier & eslint on vs code and i would like to stop it from formatting my .env file on save.
It adds semi-colons to the end of every variable, which is obviously not good.
Under the project folder, create a subfolder .vscode
, then touch a settings.json
file under the subfolder, paste the following config into the setting.json
. It would stop auto-formatting on env file.
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"[dotenv]": {
"editor.formatOnSave": false
}
}
You'll have to configure ESlint and Prettier separately.
Check this answers for instructions on how to configure ESLint, and this one for instructions on how to force Prettier to ignore files.