fix: switch away from Node.js node:assert and AssertionError#19082
fix: switch away from Node.js node:assert and AssertionError#19082mdjermanovic merged 6 commits intoeslint:mainfrom
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
9ad7eb5 to
0481a19
Compare
nzakas
left a comment
There was a problem hiding this comment.
I don't see any references to strictEqual or notStrictEqual. Did you forget to include some files with changes?
|
We're using Other than RuleTester, I think we need just a simple |
Co-authored-by: Amaresh S M <amareshsm13@gmail.com>
|
Ah, yes, I'd reverted |
|
Browser tests pass locally for me with |
|
@JoshuaKGoldberg I think #19082 (comment) hasn't been addressed yet. |
|
Ah, sorry missed that - updated now. |
mdjermanovic
left a comment
There was a problem hiding this comment.
LGTM, thanks! I've verified that errors thrown for overlapping fixes now show the filename as requested in the original issue.
Oops! Something went wrong! :(
ESLint: 9.14.0
Error: Fix objects must not be overlapped in a report.
Occurred while linting C:\projects\eslint\Makefile.js:7
Rule: "no-multi-spaces"
at ok (C:\projects\eslint\lib\shared\assert.js:17:15)
at mergeFixes (C:\projects\eslint\lib\linter\report-translator.js:165:9)
at normalizeFixes (C:\projects\eslint\lib\linter\report-translator.js:197:16)
at C:\projects\eslint\lib\linter\report-translator.js:371:49
at FileContext.report (C:\projects\eslint\lib\linter\linter.js:1048:41)
at C:\projects\eslint\lib\rules\no-multi-spaces.js:129:29
at Array.forEach (<anonymous>)
at Program (C:\projects\eslint\lib\rules\no-multi-spaces.js:84:46)
at ruleErrorHandler (C:\projects\eslint\lib\linter\linter.js:1084:48)
at C:\projects\eslint\lib\linter\safe-emitter.js:45:58

Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Fixes #19040.
What changes did you make? (Give an overview)
Switches from
node:assertto equivalent hand-written functionok.strictEqualandnotStrictEqualare also used in the project, but only by the development-timeRuleTester. We'd like to keep that as-is.Is there anything you'd like reviewers to focus on?