How to remove semicolons in prettier?

In your .prettierrc.json config file. Add the following

semi: false
  • If you want to format your file using CLI, then
prettier --write --no-semi your_file 

From the readme:

prettier.semi (default: true)

Whether to add a semicolon at the end of every line (semi: true), or only at the beginning of lines that may introduce ASI failures (semi: false)

You have to set prettier.semi to false.

To change prettier settings see,

Like all other vscode settings enter image description here

note: These settings are prefixed with prettier.


Open settings.json file*.

Add this lines to format your code on save and to remove semicolons on save:

    "editor.formatOnSave": true,

    "prettier.semi": false,




Use Ctrl+P to search for file in Vs Code.*