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

invalid-typeof: Allow comparing against identifiers #1375

Open
marvinhagemeister opened this issue Dec 10, 2024 · 0 comments
Open

invalid-typeof: Allow comparing against identifiers #1375

marvinhagemeister opened this issue Dec 10, 2024 · 0 comments

Comments

@marvinhagemeister
Copy link
Contributor

Currently this lint rule is complaining about code like this:

const type = "string";
if (typeof foo === type) {}

I feel like that should be accepted by default. TypeScript already checks the type value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant