eslint-plugin-unicorn
eslint-plugin-unicorn copied to clipboard
Add `prefer-error-cause` rule
Added prefer-error-cause
rule, Fixes #1342.
I'm trying to create many tests as possible I can.
https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1342#issuecomment-1085527190 this rule is not implemented yet in this PR, but I made this PR because I thought it'd be good to get some feedback before going further.
And this PR includes some uncertain assumptions such that the object argument including the cause
property should exist at the last argument of the expression.
Any kind of reviews would be highly appreciated.
Reviewing a lint rule in detail is a lot of work. Please look over your own diff and try to improve and simplify the code: https://github.com/sindresorhus/eslint-plugin-unicorn/pull/1793/files
I'm really sorry. Super busy recently, I'll review ASAP.
Can you fix the failing tests?
@jopemachine Bump :)
I'm sorry for the late response. I checked the integration test passed on my local mac.
Can you fix the merge conflict?
Failing: https://github.com/sindresorhus/eslint-plugin-unicorn/runs/7158388862?check_suite_focus=true
Failing: sindresorhus/eslint-plugin-unicorn/runs/7158388862?check_suite_focus=true
I'm trying to resolve this issue, but I'm not sure how to handle this.
CI failed because run-rules-on-codebase
test includes the prefer-error-cause
rule when checking intergration/test.mjs
file.
But when I added eslint-disable
comment on the intergration/test.mjs
's failed lines, it cause lint error due to eslint can not find prefer-error-cause
rule.
Bump
Closing for lack of activity.