Shareable ESLint configuration to be used in CivicSource client applications
Read more in general about how eslint shareable configurations work.
yarn add eslint-config-civicsource --dev
npm install eslint-config-civicsource --save-dev
Add to your
extends: - civicsource
This includes all civicsource rules (except the testing rules). You could also choose to include them individually:
extends: - civicsource/style - civicsource/react - civicsource/imports
The testing rules are not included by default and can be included via:
extends: - civicsource/mocha
extends: - civicsource/jest
When adding rules or plugins, put them into the correct js file based on category (e.g. add react rules to
react.js). Make sure to add a small comment explaining what the rule does (feel free to be as snarky as possible) along with a link to the rule documentation.
When making changes, be sure to follow semantic versioning.