Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: Add support for TypeScript config files #117
base: main
Are you sure you want to change the base?
feat: Add support for TypeScript config files #117
Changes from 3 commits
5e5fc4c
50676fa
9ab30b5
c0c0714
247393f
d13d556
5e68795
24dac1d
3863834
d5e16db
0e09c10
3c37a94
e0da6c3
24b0893
ef591fc
7dfea39
de7e87a
fb612ed
f60a15c
fef64ec
6e8440f
2a2c9f8
263c467
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to propose using
tsx
instead ofjiti
. Implementation PR is here: eslint/eslint#18440While being a Nuxt team member and a heavy
jiti
user, I'd be really happy to seejiti
being used. However, I'd say thatjiti
's current approach is not honestly future-proof. It uses a built-in babel parser to transpile TS and ESM code and evaluate them in CJS mode, which means it does not support top-level await, and could have some misalignment with ESM. While there is a plan to support full ESM mode, the implementation isn't easy and I would not expect it to be landed very soon (I tried to make it happend a few times but didn't work out)On the other hand,
tsx
's recenttsx/esm/api
seems like a much better approach as it uses Node's native loader API, which means the module resolutions and evaluation is in native Node, which would have a much more smaller interface of potential misalignment.I expiremented three different loader approaches in
eslint-ts-patch
, and so far I see thetsx
the most solid approach. The only downside is that it requires minimal Node.js v20.8.0 and v18.19.0, but I suppose it won't be an issue very soon as the ecosystem moving forward.