jest-runner-eslint
jest-runner-eslint copied to clipboard
Allow different cliOptions per project
Would it be possible to set cliOptions
for specific Jest projects? I'm happy to take a swing at a PR with some direction if this is something the community would like.
The reasoning behind this is to allow us to run fix: true
for one project and fix:false
for another project. We'd like the latter project project to run during CI and fail the build.
+1 - would love this!
EDIT: I think I got it to work -- configuration done in package.json
helped and also installing fresh node_modules
hello @gblock0 :wave:
it looks like u gave a good handle on how to use this package
specifically, cliOptions
is it possible for you to break down your project directory to call this runner with cliOptions
being picked up?
I can make a jest.config.js
like they mention
module.exports = {
runner: 'jest-runner-eslint',
displayName: 'lint',
testMatch: ['<rootDir>/src/**/*.js'],
};
one of the cliOptions
is ext
: https://github.com/jest-community/jest-runner-eslint#clioptions
so I would assume something like testMatch
in jest.config.js
isnt needed - but in practice, I might be doing something wrong