New: create a NPM package for Jest configuration and rules
What
Create a new NPM package @gitlab/jest-config
for sharing Jest configuration and rules.
So any project can consume it like this:
spec/frontend/.eslintrc.yml
:
---
env:
jest/globals: true
plugins:
- @gitlab/jest-config
settings:
import/resolver:
jest:
jestConfigFile: 'jest.config.js'
Why
We have several projects that should follow the same conventions and use the same configuration:
- Customers Portal
- Status Page
- Version App (probably in the future)
@gitlab/ui
- something else?
Pros
- Shared Jest configuration between projects.
- All our utility code for Jest will go to this library.
- We can write our own custom useful matchers.
Cons
- Additional dependency that we need to maintain.
Edited by Vitaly Slobodin