1.0.7 • Published 6 years ago
@metrewards/eslint-config v1.0.7
@metrewards/eslint-config
This package provides ESLint and Prettier settings as an extensible shared config.
Install
npx install-peerdeps @metrewards/eslint-config
Usage
You should see a list of devDependencies in your package.json.
Create a eslintrc.json file in your project root (same directory as your `package.json)
{
"extends": "@metrewards"
}Setup VSCode
To setup VSCode to lint and format your code, do the following:
Setup VSCode settings to make ESLint format our files on save via
Code/File→Preferences→Settings, click the{}icon to editsettings.jsonand enter the following:
// eslint-prettier settings BEGIN
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"editor.action.formatDocument": true
},
"[javascriptreact]": {
"editor.formatOnSave": false,
},
"[javascript]": {
"editor.formatOnSave": false,
},
"files.autoSave": "afterDelay"
// eslint-prettier settings ENDYour files should now format when you save.