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

Status: search-observed
Product: ESLint
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/eslint-v10-removed-context-getsourcecode-rule-context-sourcecode-api-typeerror-custom-rule
Machine JSON: https://gitdocs.org/api/fixes/eslint-v10-removed-context-getsourcecode-rule-context-sourcecode-api-typeerror-custom-rule.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

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

## Fix

```
Verifier checks the current package identity/config format and a real transformed output. Check the exact intended lint findings, not merely process exit 0.
```

## Avoid

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

## Observed Codex Queries

- 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

## Sources

- ESLint v10.0.0: https://eslint.org/blog/2026/02/eslint-v10.0.0-released/
- Official reference opened by Codex: https://eslint.org/docs/latest/extend/custom-rules
