diff --git a/docs/cli.md b/docs/cli.md index 59fa7215..16345cf8 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -44,7 +44,7 @@ You can also use `--config` if your configuration file lives somewhere where pre If you don't have a configuration file, or want to ignore it if it does exist, you can pass `--no-config` instead. -### `--ignore-path` +## `--ignore-path` Path to a file containing patterns that describe files to ignore. By default, prettier looks for `./.prettierignore`. diff --git a/docs/ignore.md b/docs/ignore.md index a64b32b1..b69c4cc0 100644 --- a/docs/ignore.md +++ b/docs/ignore.md @@ -3,7 +3,11 @@ id: ignore title: Ignoring Code --- -Prettier offers an escape hatch to ignore a block of code from being formatted. +Prettier offers an escape hatch to ignore a block of code or prevent entire files from being formatted. + +## Ignoring Files + +To exclude files from formatting, add entries to a `.prettierignore` file in the project root or set the `--ignore-path` [CLI](cli.md) option. ## JavaScript