How to lint on save in a NextJS project using VSCode

Oscar de la Hera Gomez
A flower that represents NextJS with the text "Lint on Save in VSCode."

Install Prettier and set the VSCode settings.

The solution outlined below is found on the main branch of our open source NextJS starter project.

Step One: Install Prettier

A screenshot of VSCode showing you how you can install the Prettier extension through the extensions tab on the left hand side.

In VSCode, make sure that you have the Prettier extension installed.

Step Two: Set VSCode Settings

A screenshot of VSCode showing the settings.json file. The code is found below.

In the settings.json file within the .vscode folder, set the settings found below.

Looking to learn more about NextJS, ReactJS or web development?

Search our blog to find educational content on NextJS, ReactJS and web development.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details