- Lints JavaScript based on latest standards
- Lints and Fixes React
- Fixes code formatting issues with Prettier
This config can be used both globally and locally per project.
Global installation is useful so linting can happen on smaller JS projects as well.
- Run
npx install-peerdeps --dev eslint-config-zhlyzv
to install dependencies - Create an
.eslintrc
file in the root of the project directory - Add the following:
{ "extends": ["zhlyzv"] }
-
Run
npx install-peerdeps -g eslint-config-zhlyzv
to install dependencies -
Create a global
.eslintrc
fileThis should be located in:
-
~/.eslintrc
for Linux/Mac -
%userprofile%\.eslintrc
for Windows
-
-
Add the following:
{ "extends": ["zhlyzv"] }
Do this after completing the above setup.
- Install the ESlint package for VS Code
- Set the following under
File
->Preferences
->Settings
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
},
"eslint.autoFixOnSave": true,
"prettier.disableLanguages": ["javascript", "javascriptreact"],