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

Type-aware lints #1138

Open
not-my-profile opened this issue Mar 8, 2023 · 0 comments
Open

Type-aware lints #1138

not-my-profile opened this issue Mar 8, 2023 · 0 comments
Labels
requires type checking Implementation of this rule requires access to type checking information from TSC

Comments

@not-my-profile
Copy link
Contributor

not-my-profile commented Mar 8, 2023

typescript-eslint supports Linting with Type Information. On its rule website you can click on "requires type information" to see all of its type-aware lints. It would be great if deno_lint could also support these rules (and type-aware linting in general).

However I think this is currently blocked since there isn't yet any TypeScript type checker implemented in Rust. There is stc but it's still under development. (The type-aware rules from typescript-eslint are powered by the getTypeChecker API that is part of the TypeScript compiler and implemented in TypeScript, this is not really an option for deno_lint since I assume we don't want deno_lint to depend on TypeScript.) See also TSC bottleneck and swc-project/swc#571.

So while we probably cannot do anything here to support type-aware linting yet, this issue serves as a reminder that we eventually do want to support it. (Which is important since while the typescript compiler does have a couple of strict compiler settings built-in more lintery-settings are generally provided by typescript-eslint via the getTypeChecker compiler API.)

List of type-aware typescript-eslint rules as of March 2023
@not-my-profile not-my-profile mentioned this issue Mar 8, 2023
9 tasks
@magurotuna magurotuna added the requires type checking Implementation of this rule requires access to type checking information from TSC label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires type checking Implementation of this rule requires access to type checking information from TSC
Projects
None yet
Development

No branches or pull requests

2 participants