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

TS Support #10

Merged
merged 4 commits into from
Apr 29, 2024
Merged

TS Support #10

merged 4 commits into from
Apr 29, 2024

Conversation

matheusccastroo
Copy link
Contributor

@matheusccastroo matheusccastroo commented Apr 26, 2024

This PR adds support to the walker for parsing ts and tsx files. It also add a flag to ignore the cache.

The way to support typescript is to simply compile it before parsing it with babel.parse with the typescript compiler. We can't really use the babel typescript plugin/preset because it can still cause compilation errors and it would conflict with the flow plugin that comes from the babel options from reify.

We also added the flag METEOR_ESLINT_PLUGIN_IGNORE_CACHE to allow the user to ignore or not the cache. This is needed because there seems to be a race condition between the 2 rules that uses the walker, and the end result is the cache file empty. I think this happens only in larger projects because ESLint might run the rules concurrently. I tested with the TS meteor sample and it worked with the cache without a problem.

@renanccastro renanccastro linked an issue Apr 27, 2024 that may be closed by this pull request
@matheusccastroo matheusccastroo merged commit d63fd7e into main Apr 29, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

Error linting typescript file
2 participants