Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch additional deprecated methods in no-deprecated-context-methods rule #398

Open
bmish opened this issue Dec 3, 2023 · 0 comments
Open
Labels
accepted BREAKING CHANGE This change will require a major version bump

Comments

@bmish
Copy link
Member

bmish commented Dec 3, 2023

The no-deprecated-context-methods could catch additional methods:

  • getAncestors() -> SourceCode#getAncestors(node)
  • getDeclaredVariables() -> SourceCode#getDeclaredVariables(node)
  • getScope() -> SourceCode#getScope(node)
  • markVariableAsUsed(name) -> SourceCode#markVariableAsUsed(name, node)

There's also a property we could catch:

  • parserServices -> SourceCode#parserServices

Note that there's a challenge of supporting both styles in order to support both ESLint v8 and v9, as in:

I'm not sure if this is autofixable as a new node parameter needs to be captured and passed.

These deprecated members are being removed in ESLint v9:

See:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted BREAKING CHANGE This change will require a major version bump
Projects
None yet
Development

No branches or pull requests

2 participants