-
Notifications
You must be signed in to change notification settings - Fork 20
Setting up an IDE for on the fly code review
Aiyan edited this page May 22, 2020
·
1 revision
- Prettier for normalizing code styles
- ESLint for identifying problematic code patterns and catching errors
Lint code: npm run lint
or yarn lint
.
Format code: npm run format
or yarn format
.
⚠️ To ensure there are no merge conflicts due to code styling, run both of the above functions before you stage your files or commit.
Install the Prettier extension.
Then, apply the below modifications to your VSCode settings.json
:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Install the ESLint extension.
Now, your editor should be integrated with the code review tools.
The two plugins should be bundled with the vanilla Webstorm installation.
Webstorm should automatically detect and process .eslintrc
and .prettierrc
automatically.