OPT ESLint Configuration
This is the shared team ESLint configuration for OPT.
Usage
Install the package.
npm install -D eslint @equinor/eslint-config-opt
// or
yarn add --dev eslint @equinor/eslint-config-opt
Next, add the shared eslint config in the extends
section of your ESLint configuration.
{
"extends": "@equinor/eslint-config-opt"
}
Adding support for Jest + Testing Library
This packages also ships with optional configuration options for projects that use Jest with Testing Library. To enable these rules, add the following to your .eslintrc
:
{
"extends": ["@equinor/eslint-config-opt", "@equinor/eslint-config-opt/jest"]
}
Please note that because this ruleset is optional, we do not include the core libraries as peer dependencies for this package. If you use these rules, be sure that you have the following dependencies installed in your project:
{
"@testing-library/jest-dom": ">=5.16.0",
"@testing-library/react": ">=12.0.0",
"jest": ">=26.0.0"
}