Equisoft's ESLint configuration
This project hosts Equisoft's ESLint configuration for React projects.
The rules of this ESLint configuration uses AirBnB's packages, with some small overrides to make up Equisoft's flavor.
For Node projects, you should instead look at @equisoft/eslint-config which does not include React rules.
Versioning
The versioning of this project respects semver. That means your project's package.json can caret (^
) import it.
Installation
Install the prerequisites.
Install the libraries in your project:
yarn add --dev @equisoft/eslint-config-react eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks
Then create a .eslintrc.json file that uses Equisoft's configuration:
{
"extends": ["@equisoft/eslint-config-react"]
}
Finally create a script in your package.json to easily run ESLint:
{
"scripts": {
"eslint": "eslint src",
"eslint:ci": "yarn eslint"
}
}
Now you can use yarn eslint
to validate the code style of your Javascript files!
Continuous Integration
See here.
Migrating an existing codebase
See here.