use std::io::{Read, Write}; use std::path::{Path, PathBuf}; use std::process::ExitCode; use tidy::config::{Config, Resolver}; use tidy::embed::Verbatim; use tidy::{ Error, Formatter, Language, Options, Shared, Whitespace, css, doc, handlebars, ini, js, json, }; use tidy_walk::Output; const HELP: &str = "\ tidy: a fast formatter for markup, scripts, style sheets and data Usage $ tidy [paths...] [options] Print the formatted file $ tidy up [paths...] [options] Rewrite files in place $ tidy check [paths...] [options] List files that aren't formatted, and exit 1 if any $ tidy schema Print the JSON Schema of a tidy.json Without paths, `tidy` reads stdin and prints the result, and `up` and `check` take the current folder. Folders are searched for .html, .htm, .vue, .hbs, .handlebars, .css, .scss, .less, .md, and .markdown files, for JavaScript and TypeScript files: .js, .jsx, .mjs, .cjs, .ts, .tsx, .mts, .cts, and the others that Prettier formats, for JSON files: .json, .jsonc, .json5, package.json, and the others that Prettier formats, for .yml, .yaml, .toml, .graphql, .gql and .graphqls files, for Dockerfile, Containerfile, Dockerfile.dev and .dockerfile files, for INI files: .ini, .cfg, .editorconfig, .npmrc, .gitconfig, .gitmodules, and the others that prettier-plugin-ini formats, and for XML files: .xml, .svg, .plist, .csproj, pom.xml, and the others that @prettier/plugin-xml formats. Style sheets in