Eeslint

eslint/v9-to-v10-ruletester

Fix RuleTester test case structure for ESLint v10

transformationmigrationeslintv9v10
Public
0 executions

Run locally

npx codemod @eslint/v9-to-v10-ruletester

@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

  • errors in valid cases — removes errors property from objects inside valid arrays (v10 throws if present)
  • output in valid cases — removes output property from objects inside valid arrays (v10 throws if present)
  • type in invalid cases — removes type property from objects inside invalid arrays (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

Resources

Ready to contribute?

Build your own codemod and share it with the community.