@vevo/eslint-config-vevo
v1.0.3
Published
Default eslint config for web projects
Downloads
279
Readme
eslint-config-vevo
Project eslint-config-vevo managed by the web team
Installation/Updating
ESLint still requires plugins to be installed in each project's directory, so you'll have to run a little script to install all of the packages required when building a new package. If you are updating eslint versions, then you will want to rerun this to install the correct peer dependencies.
(
export PKG=@vevo/eslint-config-vevo;
yarn add --dev $PKG
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add --dev "$PKG@latest"
)
make a config file: .eslintrc.js
:
module.exports = {
extends: ["@vevo/eslint-config-vevo"]
};
Fix issues in npm:
scripts: {
"lint": "eslint src/**/*.{js,jsx}",
"lint:fix": "prettier-eslint src/**/*.{js,jsx} --write",
}
Autofixing with VS Code
Install both prettier and eslint plugins, then add these lines to your user preferemnces file (CMD+SHIFT+P+user).
// Set the default
"editor.formatOnSave": true,
"prettier.eslintIntegration": true,
// Enable per-language
"javascript.format.enable": false,