1.0.1 • Published 4 years ago
@sonder/eslint-config v1.0.1
Eslint Config Sonder
Provide Sonder's .eslintrc
as an extensible shared config
Installation
Install package and it's peer dependencies
yarn add @sonder/eslint-config babel-eslint eslint eslint-plugin-babel eslint-plugin-import eslint-plugin-react --dev
Usage
Inside a .eslintrc file in your repository's root folder, add this config:
{
"extends": "@sonder",
"rules": {
// Repo-specific rules to override this config
}
}
Testing
To prove/validate that a rule is validating what it is supposed to, add a test each time a rule is added or modified in this repo, not the extended rule sets.
- Files under
test/error/
do not follow eslint rules and should throw eslint errors. - Files under
test/pass/
follow eslint rules and should throw no error.
Add all validFiles
and errorFiles
to test/test.js
and run:
yarn test
All checks passed!
Contributing
- Clone this repo -
git clone git@github.com:Flatbook/eslint-config-sonder.git
- Update the rules in
index.js
- Commit & Push changes to git -
git commit -m "Add rule XYZ"
- Publish to npm -
yarn publish --new-version minor