-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BREAKING: Bump eslint-plugin-jest to ^26.x #228
Conversation
@@ -40,18 +40,16 @@ | |||
"jest/no-standalone-expect": "error", | |||
"jest/no-test-prefixes": "error", | |||
"jest/no-test-return-statement": "error", | |||
"jest/no-try-expect": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a deprecated / removed precursor of no-conditional-expect
.
"jest/prefer-hooks-on-top": "error", | ||
"jest/prefer-spy-on": "error", | ||
"jest/prefer-strict-equal": "error", | ||
"jest/prefer-to-be-null": "error", | ||
"jest/prefer-to-be-undefined": "error", | ||
"jest/prefer-to-be": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supersedes to-be-x
: https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-be.md
This may actually be breaking, because it looks like it will make us use toBe
for all primitives that don't have specific toBeX
matchers.
"jest/prefer-to-contain": "error", | ||
"jest/prefer-to-have-length": "error", | ||
"jest/prefer-todo": "error", | ||
"jest/require-to-throw-message": "error", | ||
"jest/require-top-level-describe": "error", | ||
"jest/valid-describe": "error", | ||
"jest/valid-describe-callback": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a non-functional rename: jest-community/eslint-plugin-jest@f3e9e9a
4bff296
to
d8ab3e9
Compare
'jest/no-duplicate-hooks': 'error', | ||
'jest/no-if': 'error', | ||
'jest/no-test-return-statement': 'error', | ||
'jest/prefer-hooks-on-top': 'error', | ||
'jest/prefer-lowercase-title': ['error', { ignore: ['describe'] }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was renamed (see jest-community/eslint-plugin-jest#950), but I only caught it when running eslint
with the latest release of this config and the latest Jest plugin. We should add a test of some kind to CI that catches rules that no longer exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version of eslint-plugin-jest
depends upon v5 of @typescript-eslint/eslint-plugin
, but we're still on v4. See https://github.com/jest-community/eslint-plugin-jest/blob/v26.8.2/package.json#L143
Edit: update done here: #230
PR #230 has been merged, so the requested change has been made
d2f9e4a
to
31f3023
Compare
I have just rebased this PR to resolve the conflicts. The only conflicts were in the lockfile, which Yarn resolved automatically upon install. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Per @Gudahtt's recommendation in #225, bumps
eslint-plugin-jest
from major version 24 to major version 26. The rule snapshot diff looks like it will work for us, although the new recommended ruleprefer-to-be
will require manual fixes.