eslint-config-justgiving
v1.1.1
Published
A prettier module to be used across JG repos
Downloads
1
Readme
JustGiving Prettier/Eslint Plugin
This Prettier plugin extends the Airbnb JavaScript Style Guide and configures Prettier with recommended settings.
Features and Plugins
Usage
Setup
Install this plugin as a development dependency in your project:
npm install eslint-config-justgiving
yarn add eslint-config-justgiving
In package.json
, add to the eslintConfig
field:
"eslintConfig": {
"extends": [
"eslint-config-justgiving"
]
}
OR
Add to an existing .eslint
file:
{
"extends": ["eslint-config-justgiving"]
}
Commands
npx eslint .
to identify errors.
npx eslint . --fix
to identify and fix errors.
Integration with VS Code
To set up your local linting to line up with these settings:
- Install ESLint extension in VS code (if not previously installed)
- Edit VS code settings by pressing cmd + shift + p (ctrl + shift + p on windows)
- Search 'Preferences: Open Settings (JSON)'
- Edit or add the following:
// Format a file on save "editor.formatOnSave": true, // show eslint icon at bottom toolbar "eslint.alwaysShowStatus": true, // turns on Auto Fix for all providers including ESLint "editor.codeActionsOnSave": { "source.fixAll": true }