@martylouis/eslint-config
v2.0.2
Published
ESLint and Prettier config
Downloads
8
Maintainers
Readme
@martylouis/eslint-config
Installation
To use this config, install this package and it’s peer dependencies to your project.
Install with npx
:
npx install-peerdeps --dev @martylouis/eslint-config
Install with yarn
yarn add -D @martylouis/eslint-config \
babel-eslint \
eslint \
eslint-config-prettier \
eslint-config-standard \
eslint-plugin-html \
eslint-plugin-import \
eslint-plugin-node \
eslint-plugin-prettier \
eslint-plugin-promise \
eslint-plugin-standard \
prettier
Install with install-peerdeps
:
install-peerdeps @martylouis/estling-config -d
Add the -Y
flag to automatically install with Yarn.
Extend this config
Add to your package.json
:
{
"eslintConfig": {
"extends": "@martylouis/eslint-config"
},
}
OR add to your add .eslintrc
{
"extends": "@martylouis/eslint-config"
}
ESLint With VS Code
We want eslint to format our JS on save, edit your VS Code settings.json
{
"editor.formatOnSave": true,
"[javascript]": {
"editorformatOnSave": false
},
"eslint.autoFixOnSave": true,
}
With the Prettier extension
If you have the prettier extension enabled for other languages like CSS and HTML, turn it off for JS since we are doing it through Eslint already
{
"prettier.disableLanguages": ["javascript"]
}