Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedenhancementNew feature or requestlocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: rule-testerIssues related to the @typescript-eslint/rule-tester package
Milestone
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread the FAQ and my problem is not listed.
Relevant Package
utils
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
eslint/eslint#18007 was rejected as a breaking change enhancement.
Given this impacts us directly (eg#8251) we should build this into our fork.
I propose the following changes:
- if the test case has
output
and theoutput
value is a string and the test case requires more than 1 pass to fix then the test case fails with a message like "test requires multiple fixes to resolve due to overlapping fix ranges - please use the array form ofoutput
to declare all of the expected fix passes". - accept an array for
output
which declares the expected fix passes for a test case.- An array of size 0 is disallowed.
- An array of size 1 is equivalent to the string form.
- An array of size
n
asserts that there are exactlyn
fix passes - The rule tester asserts that after each fix pass the output matches the
n
th element of the array.
Additional Info
No response
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedenhancementNew feature or requestlocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: rule-testerIssues related to the @typescript-eslint/rule-tester package