-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add support for TS config files #16828
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
Conversation
|
I tested that making a |
|
Add flag here should be able to test prettier/tests/integration/run-cli.js Line 40 in 2c8440e
|
|
Reverted the unnecessary changes and added the flag, let me know if there is anything else to do |
tests/integration/run-cli.js
Outdated
| execArgv: [ | ||
| "--trace-deprecation", | ||
| "--disable-warning=ExperimentalWarning", | ||
| "--experimental-strip-types", |
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.
Would this work in Node < 22.6 where this flag was introduced? We should make sure we don’t get any warnings in all supported Node versions and if the flag is not available, there should be a meaningful error about why prettier.config.ts could not load. Docs need to reflect min version for TS config too, unless we want to change the approach and use a built-in transpiler.
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.
It should be passed via options and only set when testing ts configs.
39369c1 to
8f10863
Compare
8955900 to
1d8b411
Compare
commit: |
Description
This PR adds prettier.config.ts support, addressing: #16119
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨