-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
Relevant Package
rule-tester
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
From #8211: there are quite a few enhancements to the ESLint RuleTester that we'll need to reflect in our own rule-tester
class.
- Rule Tester checks for missing placeholder data in the message
- Stricter rule test validations
- detect duplicate test cases
- check for parsing errors in suggestion fixes
- assert suggestion messages are unique in rule testers
Per the discussion in that thread, we'd like to not treat this as a breaking change:
TBH I'm actually okay with us updating @typescript-eslint/rule-tester with these changes. Yes it will cause errors in tests for people - but they're all correct errors that should have been caught previously. I think it's okay treating it the same as a lint rule i.e. "A change to the plugins shall not be considered breaking if it: ... Adds additional checks to an existing rule that causes new reports in a small-to-medium set of cases in an average codebase".
...so unless someone protests, we'll merge this into the main
branch rather than v8
.
Additional Info
Adding to the v8
milestone as it's required for ESLint 9 support, even though we'd like to land this sooner.
💖