@eslint/v9-to-v10-ruletester
Fix RuleTester test case structure for ESLint v10.
Overview
ESLint v10 throws an error when RuleTester test case objects contain properties that were silently ignored in v9. This codemod removes those properties automatically.
What This Codemod Does
- ✅
errorsin valid cases — removeserrorsproperty from objects insidevalidarrays (v10 throws if present) - ✅
outputin valid cases — removesoutputproperty from objects insidevalidarrays (v10 throws if present) - ✅
typein invalid cases — removestypeproperty from objects insideinvalidarrays (v10 throws if present)
Transformations
Valid cases — remove errors and output:
js
Invalid cases — remove type:
js
Usage
bash
Or run locally from source:
bash