Skip to content

Commit

Permalink
docs: Clarify global ignores in config migration guide (#19032)
Browse files Browse the repository at this point in the history
* docs: Clarify global ignores in config migration guide

* better wording

Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>

---------

Co-authored-by: Amaresh  S M <amareshsm13@gmail.com>
  • Loading branch information
mdjermanovic and amareshsm authored Oct 20, 2024
1 parent 1a7cdbf commit 50f03a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/src/use/configure/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ For more information about the `FlatCompat` class, please see the [package READM
With eslintrc, you can make ESLint ignore files by creating a separate `.eslintignore` file in the root of your project. The `.eslintignore` file uses the same glob pattern syntax as `.gitignore` files. Alternatively, you can use an `ignorePatterns` property in your eslintrc file.
To ignore files with flat config, you can use the `ignores` property in a config object. The `ignores` property accepts an array of glob patterns. Flat config does not support loading ignore patterns from `.eslintignore` files, so you'll need to migrate those patterns directly into flat config.
To ignore files with flat config, you can use the `ignores` property in a config object with no other properties. The `ignores` property accepts an array of glob patterns. Flat config does not support loading ignore patterns from `.eslintignore` files, so you'll need to migrate those patterns directly into flat config.
For example, here's a `.eslintignore` example you can use with an eslintrc config:
Expand All @@ -564,6 +564,7 @@ The equivalent ignore patterns in flat config look like this:
export default [
// ...other config
{
// Note: there should be no other properties in this object
ignores: ["**/temp.js", "config/*"]
}
];
Expand Down

0 comments on commit 50f03a1

Please sign in to comment.