1.1.1 • Published 5 years ago
eslint-config-zhlyzv v1.1.1
My Eslint and Prettier Setup
What this does
- Lints JavaScript based on latest standards
- Lints and Fixes React
- Fixes code formatting issues with Prettier
Installation
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.
Local install
- Run
npx install-peerdeps --dev eslint-config-zhlyzvto install dependencies - Create an
.eslintrcfile in the root of the project directory - Add the following:
{ "extends": ["zhlyzv"] }
Global install
- Run
npx install-peerdeps -g eslint-config-zhlyzvto install dependencies Create a global
.eslintrcfileThis should be located in:
~/.eslintrcfor Linux/Mac%userprofile%\.eslintrcfor Windows
Add the following:
{ "extends": ["zhlyzv"] }
VS Code setup
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"],