1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

Improve dprint config (#4314)

This commit is contained in:
Ryan Dahl 2020-03-11 05:51:57 -04:00 committed by GitHub
parent ce14ef09d0
commit 94f4c6807a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,15 +36,15 @@ fn is_supported(path: &Path) -> bool {
}
fn get_config() -> dprint::configuration::Configuration {
dprint::configuration::ConfigurationBuilder::new()
use dprint::configuration::*;
ConfigurationBuilder::new()
.line_width(80)
.indent_width(2)
.next_control_flow_position(
dprint::configuration::NextControlFlowPosition::SameLine,
)
.binary_expression_operator_position(
dprint::configuration::OperatorPosition::SameLine,
)
.next_control_flow_position(NextControlFlowPosition::SameLine)
.binary_expression_operator_position(OperatorPosition::SameLine)
.brace_position(BracePosition::SameLine) // default is NextLineIfHanging
.comment_line_force_space_after_slashes(false)
.construct_signature_space_after_new_keyword(true)
.build()
}