Examples (6)
Format a file and print the result to `stdout`
prettier path/to/fileCheck if a specific file has been formatted
prettier --check path/to/fileRun with a specific configuration file
prettier --config path/to/config_file path/to/fileFormat a file or directory, replacing the original
prettier --write path/to/file_or_directoryFormat files or directories recursively using single quotes and no trailing commas
prettier --single-quote --trailing-comma none --write path/to/file_or_directoryFormat JavaScript and TypeScript files recursively, replacing the original
prettier --write "**/*.{js,jsx,ts,tsx}"made by @shridhargupta | data from tldr-pages