-
Notifications
You must be signed in to change notification settings - Fork 24
fix: Flag assert.equal in module hooks in no-assert-equal
rule
#570
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
Conversation
Just to confirm, it looks like this will be a breaking change, right? I see |
Yes, that's correct. It fits the category "Minor release > A bug fix in a rule that results in ESLint reporting more errors." I've added tests for the other four rules. The tests in |
@arensman just want to double-check that you are recommending this to be considered a bug fix for a minor release? Note that I'm also open to releasing a major release soon as part of #381. Can you rebase? |
Moved isInModule into utils (was duplicated around a few places) Added before and after to recognized module hook properties Added test case
@bmish Thanks, I have rebased the changes. Yes, I recommend a minor release. Though I'm also fine with moving this into the major release, if there is one scheduled soon anyway. I am getting linter errors now, but I see the same linter errors in main without modifications on my machine. I guess it's unrelated. |
Pull Request Test Coverage Report for Build 16289312641Details
💛 - Coveralls |
I see the lint issues in your PR but I don't see any issues on main. |
Thanks for the pointer. I was confused by an error from I have fixed the type check errors. Can you please try again? |
lib/utils.js
Outdated
const NEW_MODULE_HOOK_IDENTIFIERS = [ | ||
"before", | ||
"beforeEach", | ||
"afterEach", | ||
"after", | ||
]; |
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.
Would it make sense to split this change into a separate PR? It seems there's a bug fix to no-assert-equal
as mentioned in the PR title, but then there's a separate change to the hooks used by separate rules.
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.
It is somewhat related. Without that change, the fix in no-assert-equal
would not apply to the before
and after
hooks.
However, I can split it up. I’ve created a separate PR (#610) specifically for the changes to the before
and after
hooks.
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.
Thanks!
no-assert-equal
rule
assert.equal
in module hooksisInModule
intoutils
(was duplicated around a few places)before
andafter
to recognized module hook propertiesFixes #531