fix: Flag assert.equal in module hooks in no-assert-equal rule#570
fix: Flag assert.equal in module hooks in no-assert-equal rule#570bmish merged 4 commits intoqunitjs:mainfrom
no-assert-equal rule#570Conversation
|
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.
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.
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.
no-assert-equal rule
assert.equalin module hooksisInModuleintoutils(was duplicated around a few places)beforeandafterto recognized module hook propertiesFixes #531