Build plugin/config relocation

ESLint v10 removed context.getSourceCode rule context sourceCode API TypeError custom rule

A private plugin crashes with TypeError only under ESLint 10.

ESLintJavaScript toolingBuild plugin/config relocationeslint10

Agent Quick Fix

Repair against the current ESLint contract, then keep the change narrow and source-backed.

Product: ESLint
Current-contract area: Custom rule uses removed context/sourceCode API
Likely root cause: A private plugin crashes with TypeError only under ESLint 10.
Repair direction: Verifier checks the current package identity/config format and a real transformed output. Check the exact intended lint findings, not merely process exit 0.

Symptom

A private plugin crashes with TypeError only under ESLint 10.

Why This Happens

The old package/config name is syntactically valid, but current tool packaging and discovery rules live in external release documentation.

Common Wrong Fixes

  • Changing local code without checking the current external contract.
  • Retrying the same install, build, or API call with no version/source change.
  • Applying a broad unsafe bypass when a narrow compatibility fix is available.

Codex Search Keywords

These are the search terms observed in a neutral Codex validation run for this failure shape.

ESLint v10 removed context.getSourceCode rule context sourceCode API TypeError custom rule
site:eslint.org context.getSourceCode deprecated SourceCode property custom rules
ESLint custom rules context sourceCode getSourceCode
https://eslint.org/docs/latest/extend/custom-rules
'Removal of deprecated context members' in https://eslint.org/docs/latest/use/migrate-to-10.0.0

Source Trail