Skip to content
Latchkey

prettier --no-config: Ignore Config Files

prettier --no-config tells Prettier to skip looking for a config file and format with built-in defaults plus any CLI flags.

Most projects want their config respected. --no-config is for the rare case where you need predictable defaults regardless of what config files exist nearby.

What it does

prettier --no-config disables the search for .prettierrc and similar files, so Prettier uses its default options unless you override them with explicit CLI flags. This is useful in a tool or script that must format with known settings irrespective of the host project config.

Common usage

Terminal
prettier --no-config --check .
prettier --no-config --single-quote --print-width 100 --write "**/*.ts"

Flags

FlagWhat it does
--no-configDo not read any config file
--config <path>Use one explicit config and skip the search
--config-precedence <mode>cli-override | file-override | prefer-file
--no-editorconfigIgnore .editorconfig as well

In CI

Reach for --no-config only in a generic formatting tool. For an application repo, the opposite is what you want: a committed config that CI honors. If you need CLI flags to win over a config, use --config-precedence cli-override rather than disabling config entirely.

Common errors in CI

Surprising formatting after adding --no-config usually means it dropped your intended settings back to defaults (for example trailingComma all, double quotes); pass the options you need as CLI flags. Note Prettier also reads .editorconfig by default, so add --no-editorconfig if you want truly default behavior.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →