-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
replace prettier with dprint for "deno fmt" #3818
Comments
Based on this, #3427 (comment) and #3806, is the goal to not have any |
That's correct. Test runner is more tricky though. First it shares some functionality with formatter (walking dir tree and finding matching files), so it should wait until we land it. Second, test runner still needs to run tests - this is done by |
Moving Rather, a blocking point of thought is how to enhance the API in light of first-class support. For example, I don't think we need to expose a |
That's correct;
I will open up formatter PR shortly, @nayeemrmn I would very much welcome help on glob expander and include/exclude filter. |
Also, I guess this is a breaking change that removes #3033, where some people will have expectations around those configs. |
Are we going to change the default rules to be more like prettier's? The current ones are yucky. |
@nayeemrmn see #3824. Let me know about any other changes that should be made or configuration added. |
Just out of curiosity, what was the motivation for this? Is it that dprint is written in rust and that improves performance, or makes maintenance easier? Also, the dprint website says it currently only supports |
@dev-nicolaos the one used in deno supports Few points:
|
Also, in theory, dprint uses a crate which generates AST for TypeScript. While it is a long long road, we might parse TS/JS in Rust and hand the AST over to the TypeScript compiler for type checking and emitting. |
@kitsonk given we have parsed nad JSON serialized AST, in the present, is there actually a way to load it into compiler just for type check and emit? What changes would our compiler host require? |
No. See microsoft/TypeScript#33502. I am not sure how much the core team are going to be interested in it, so it might be something that we need to contribute. I also suspect there is a gap between what swc currently produces and what we would need to hydrate an AST for the compiler. It is a long road, but we can chip away at it. |
https://dprint.dev/
https://github.com/dsherret/dprint/tree/master/packages/rust-dprint-plugin-typescript
dprint is a TS formatter written in Rust by David Sherret @dsherret
The text was updated successfully, but these errors were encountered: