Skip to content

Repo: remove unused invalid rule listener from no-unused-vars rule #8278

Closed
@auvred

Description

@auvred

Suggestion

I'm playing with ESQuery type inference and I just noticed that there is a selector that queries a node that cannot be represented by the current AST structure:

// module declaration in module declaration should not report unused vars error
// this is workaround as this change should be done in better way
'TSModuleDeclaration > TSModuleDeclaration'(
node: TSESTree.TSModuleDeclaration,
): void {

Little context:

  1. Why it was added:
    Issue: [no-unused-var] False positive for nested namespace declaration #2573
    Fix: fix(eslint-plugin): [no-unused-vars] don't report nested module declaration #3119
  2. Why it's not needed anymore:
    fix(typescript-estree): account for namespace nesting in AST conversion #6272

If I entirely remove this listener, all tests still pass, so it's dead code

Coverage ☠️:

Zero coverage for this listener

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuerepo maintenancethings to do with maintenance of the repo, and not with code/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions