-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
($470 Bounty) Type Aware Linting #3105
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
https://typescript-eslint.io/getting-started/typed-linting/#how-is-performance @valeneiko I have another idea. Is it viable to build and get all I think I'm not sure about the others rules, but the most important rules oxlint provide should be the ones checking for correctness. All the other ones can deprioritized. |
I had a similar optimization in mind to make us call typechecker less. Basically if we have a list of functions marked async or returning a Promise we could use it to check some of the CallExpressions. And we would not need Generating
I don't think this alone would be sufficient to cover |
The key issue is cross-file knowledge. Do we need this cross-file support? |
Multi-file analysis works under the |
Current progress and conclusion from #2912: The PR managed to build a ts server and communicate with it from the Rust side. But we hit a blocker where we would end up rebuilding @typescript-eslint: we need to convert the typescript ast to our ast so we can have a matching span position to query on. @valeneiko and I felt like it's not worth it to maintain all these code and see no performance improvements. So instead, I propose the following: Given that we are a static analysis tool, we should use static type information from typescript instead of getting them dynamically. TypeScript is heading towards this direction by having explicit-module-boundary-types and isolated-declarations. Since we now have the infrastructure for multi-file analysis, we can leverage this by reading and parsing There is going to be a lot edge cases, so what I'm going to do next is think of a minimal scenario, experiment and test on it. |
How would file-local type linting work though? Since the TS proposal only types exports |
💎 $400 bounty • chenglou92💎 $50 bounty • KubaJastrz💎 $20 bounty • eric.erwan.le.maitreSteps to solve:
Thank you for contributing to oxc-project/oxc! |
Background: https://typescript-eslint.io/getting-started/typed-linting/
Attempt 1:
The text was updated successfully, but these errors were encountered: