-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Bug
packageversion: 1.1.3nodeversion: 16.15.1npm(oryarn) version: 8.11.0eslintversion: 8.33.0typescriptversion: 4.9.5
What you did:
Followed the instructions per the repo readme, installed jest-expect-message and added the 'jest-expect-message' package to my jest config:
setupFilesAfterEnv: ['./src/jestSetup.ts', 'jest-expect-message'],
At this time the behaviour, as expected, is that intellisense/lint both do NOT like expect(x, "hello world") as it does not know there is a second arg now allowed. If I don't do that, everything still transpiles and lints fine, but I want that second param to be honored...
So, as suggested by the readme I added the following to my eslintrc.json:
"jest/valid-expect": [
"error",
{
"maxArgs": 2
}
]
The expected outcome is that lint, at least, will respect that override, but instead all of my files now fail lint with the following error:
1: 1 error Definition for rule 'jest/valid-expect' was not found
The definition is definitely there in the eslintrc, so I'm not sure what is going wrong but it's a shame because I've used this library in the past and it is excellent but something has gone awry in some recent version of something.
What happened (please provide anything you think will help):
Described above. Cannot get eslint to respect the setting listed in your readme.
Reproduction repository (if possible):
also listed above, all versioning may be pertinent