-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: support loading TS config files using --experimental-strip-types
#19401
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: support loading TS config files using --experimental-strip-types
#19401
Conversation
Hi @aryaemami59!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
✅ Deploy Preview for docs-eslint canceled.
|
--experimental-strip-types
--experimental-strip-types
b849290
to
65ab10d
Compare
0cc9a68
to
7ce314d
Compare
32aa8da
to
28f82e0
Compare
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
28f82e0
to
d8710bb
Compare
I apologize for neglecting this important PR, I will finish it soon. In the meantime I could use some ideas on writing unit-tests. |
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.
Thanks for this pull request! I left some comments.
For unit testing probably we will want to check if the current instance of Node.js supports type stripping and only then run the new tests. describe("TypeScript config files with type stripping", () => {
if (process.features.typescript !== "strip") {
return;
}
// Unit tests here...
}); Our CI workflow runs unit tests in different versions of Node.js, including Node.js 23.x which has type stripping enabled by default, and the new tests would only run in that versions. To test with type transformation enabled, we could start by doing something similar, but since no version of Node.js supports type transformation out of the box at the moment, we will have to wait until Node.js 24 is released. Or we could force type transformation support by launching a CI test with Node.js 22.x and the matrix:
os: [ubuntu-latest]
node: [23.x, 22.x, 21.x, 20.x, 18.x, "18.18.0"]
include:
- os: windows-latest
node: "lts/*"
- os: macOS-latest
node: "lts/*"
+ - os: ubuntu-latest
+ node: 22.x
+ experimental_transform_types: true We would then conditionally set the |
e7ca23d
to
849e7d4
Compare
Co-authored-by: Francesco Trotta <github@fasttime.org>
fcfd834
to
f44bd29
Compare
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.
The changes in 23cf96f go beyond the scope of the issue and some of them would likely need additional discussion. What do you think about reverting lib/cli-engine/cli-engine.js
to the version in the main branch, and resubmitting those changes in a new pull request?
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.
LGTM, thanks for the work!
fix: update documentation for --experimental-strip-types #19401 (comment)
Removed jiti since ESLint can now read TypeScript config files without jiti. Ref: eslint/eslint#19401
Removed jiti since ESLint can now read TypeScript config files without jiti. Ref: eslint/eslint#19401
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain:
Resolves #19357.
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?