Skip to content

Bug: [no-unused-vars] reexporting enum does not pass linting #5944

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
4 tasks done
sviat9440 opened this issue Nov 8, 2022 · 2 comments
Closed
4 tasks done

Bug: [no-unused-vars] reexporting enum does not pass linting #5944

sviat9440 opened this issue Nov 8, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@sviat9440
Copy link
Contributor

sviat9440 commented Nov 8, 2022

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Playground Link

https://typescript-eslint.io/play/#ts=4.8.4&sourceType=module&code=HYQwtgpgzgDiDGEAEAVaAXJBvAsAKCSQgA8YB7AJ0wmAFcwkBldEdZXAwpAQQBp8uSAEL9OhAMKjCAX3yy8+EuSpJQkWAmRoo6AEzYBRUpUwBLMMszNWyALyoMAOmtsA3HPxA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tidmUQAmtAG4BDaKgwBtcNhyJo0DtEiyIAXVkBfEFqA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA

Repro Code

namespace Test {
  export enum State {
    A,
    B,
    C,
  }
}

export namespace Test2 {
  export import State = Test.State;
}

ESLint Config

module.exports = {
  "rules": {
    "@typescript-eslint/no-unused-vars": [
      "error"
    ]
  }
}

tsconfig

{
  "compilerOptions": {
    "strictNullChecks": true
  }
}

Expected Result

No errors

Actual Result

'State' is defined but never used.

Additional Info

If you confirm the bug, I will fix it soon

Versions

package version
@typescript-eslint/eslint-plugin 5.42.1
@typescript-eslint/parser 5.42.1
TypeScript 4.8.4
ESLint 8.15.0
node web
@sviat9440 sviat9440 added bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Nov 8, 2022
@Josh-Cena
Copy link
Member

Duplicate of #4129

@Josh-Cena Josh-Cena marked this as a duplicate of #4129 Nov 11, 2022
@Josh-Cena
Copy link
Member

This should be fixed by changing the AST shape (in 6.0). See #4130

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2022
@Josh-Cena Josh-Cena added duplicate This issue or pull request already exists and removed triage Waiting for team members to take a look bug Something isn't working labels Nov 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants