@wagtail/eslint-config-wagtail
v0.4.0
Published
Shareable ESLint config for Wagtail, based on airbnb/javascript
Downloads
1,562
Readme
@wagtail/eslint-config-wagtail
Shareable ESLint config for Wagtail, based on airbnb/javascript.
The package provides Wagtail's .eslintrc as an extensible shared config.
Usage
Our default export contains all of our ESLint rules, including Airbnb's config
(which has ECMAScript 6 and React). It requires eslint
, as well as the configuration’s peer dependencies.
# npm v7:
npm install --save-dev @wagtail/eslint-config-wagtail@latest
# npm v6 and below:
npx install-peerdeps --dev @wagtail/eslint-config-wagtail@latest
Links
Contribution Guidelines
Install
- Required Node
- We recommend using nvm
- Clone the project on to your computer
- Run
nvm install
to ensure you have the correct Node version - Run
npm install
to install project dependencies - Ensure your editor is set up to use editorconfig, Prettier and Eslint
Development
- Run
nvm use
to set Node to the correct version - Run tests via
npm run test
- Run linting via
npm run lint
- Run preflight checks before commiting final code via
npm run preflight
- Note: When working with the rule set, only modify the
index.js
file, not the.eslintrc
file as it is for local linting only