CmdID

CmdID / Commands

prettier

An opinionated code formatter for JavaScript, JSON, CSS, YAML, and more. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Format a file and print the result to stdout

prettier path/to/fileIdentify

Check if a specific file has been formatted

prettier --check path/to/fileIdentify

Run with a specific configuration file

prettier --config path/to/config_file path/to/fileIdentify

Format a file or directory, replacing the original

prettier --write path/to/file_or_directoryIdentify

Format files or directories recursively using single quotes and no trailing commas

prettier --single-quote --trailing-comma none --write path/to/file_or_directoryIdentify

Format JavaScript and TypeScript files recursively, replacing the original

prettier --write "**/*.{js,jsx,ts,tsx}"Identify