In order to lint and format you code automatically, you'll need to complete the following steps:
Open terminal to project workspace
# Init this project as a node project
# `-y` skips prompts and accepts all defaults
npm init -y
# Install eslint and prettier as dev dependencies
npm install --save-dev eslint prettier
Install and Enable ESLint and Prettier Plugins in vscode.
CTRL + SHIFT + P > "Reload Window" to restart VSCode
Lastly, add the three files to your project:
This file tells vscode how to manage specific file types. It goes in the .vscode folder in a file named settings.json.
This file tells eslint how to behave. It goes in the root of your project.
This file tells prettier how to behave. It goes in the root of your project.