Skip to content

Commit

Permalink
docs: update flat config default ignore patterns (#17258)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Jun 8, 2023
1 parent 3912f3a commit de4d3c1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/src/use/configure/configuration-files-new.md
Expand Up @@ -145,7 +145,21 @@ export default [
];
```

This configuration specifies that all of the files in the `.config` directory should be ignored. This pattern is added after the default patterns, which are `["**/node_modules/**", ".git/**"]`.
This configuration specifies that all of the files in the `.config` directory should be ignored. This pattern is added after the default patterns, which are `["**/node_modules/", ".git/"]`.

You can also unignore files and directories that are ignored by the default patterns. For example, this config unignores `node_modules/mylibrary`:

```js
export default [
{
ignores: [
"!node_modules/", // unignore `node_modules/` directory
"node_modules/*", // ignore its content
"!node_modules/mylibrary/" // unignore `node_modules/mylibrary` directory
]
}
];
```

Note that only global `ignores` patterns can match directories.
`ignores` patterns that are specific to a configuration will only match file names.
Expand Down

0 comments on commit de4d3c1

Please sign in to comment.