Closed
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
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