Skip to content

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

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

Closed
auvred opened this issue Jan 20, 2024 · 0 comments · Fixed by #8279
Closed

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

auvred opened this issue Jan 20, 2024 · 0 comments · Fixed by #8279
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@auvred
Copy link
Member

auvred commented Jan 20, 2024

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
@auvred auvred added repo maintenance things to do with maintenance of the repo, and not with code/docs triage Waiting for team members to take a look labels Jan 20, 2024
@bradzacher bradzacher added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Jan 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
2 participants