mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
upgrade: dprint 0.3.0-alpha.6
This commit is contained in:
parent
f4cc08c4fc
commit
0471243334
3 changed files with 26 additions and 13 deletions
22
cli/fmt.rs
22
cli/fmt.rs
|
@ -27,12 +27,16 @@ fn is_supported(path: &Path) -> bool {
|
|||
&& (TYPESCRIPT.is_match(&path_str) || JAVASCRIPT.is_match(&path_str))
|
||||
}
|
||||
|
||||
fn get_config() -> dprint::Configuration {
|
||||
dprint::ConfigurationBuilder::new()
|
||||
fn get_config() -> dprint::configuration::Configuration {
|
||||
dprint::configuration::ConfigurationBuilder::new()
|
||||
.line_width(80)
|
||||
.indent_width(2)
|
||||
.next_control_flow_position(dprint::NextControlFlowPosition::SameLine)
|
||||
.binary_expression_operator_position(dprint::OperatorPosition::SameLine)
|
||||
.next_control_flow_position(
|
||||
dprint::configuration::NextControlFlowPosition::SameLine,
|
||||
)
|
||||
.binary_expression_operator_position(
|
||||
dprint::configuration::OperatorPosition::SameLine,
|
||||
)
|
||||
.build()
|
||||
}
|
||||
|
||||
|
@ -48,7 +52,10 @@ fn get_supported_files(paths: Vec<PathBuf>) -> Vec<PathBuf> {
|
|||
files_to_check
|
||||
}
|
||||
|
||||
fn check_source_files(config: dprint::Configuration, paths: Vec<PathBuf>) {
|
||||
fn check_source_files(
|
||||
config: dprint::configuration::Configuration,
|
||||
paths: Vec<PathBuf>,
|
||||
) {
|
||||
let start = Instant::now();
|
||||
let mut not_formatted_files = vec![];
|
||||
|
||||
|
@ -91,7 +98,10 @@ fn check_source_files(config: dprint::Configuration, paths: Vec<PathBuf>) {
|
|||
}
|
||||
}
|
||||
|
||||
fn format_source_files(config: dprint::Configuration, paths: Vec<PathBuf>) {
|
||||
fn format_source_files(
|
||||
config: dprint::configuration::Configuration,
|
||||
paths: Vec<PathBuf>,
|
||||
) {
|
||||
let start = Instant::now();
|
||||
let mut not_formatted_files = vec![];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue