Skip to content

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

Open
@bmish

Description

@bmish

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions