Skip to content

Commit 50f03a1

Browse files
docs: Clarify global ignores in config migration guide (#19032)
* 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>
1 parent 1a7cdbf commit 50f03a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/src/use/configure/migration-guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ For more information about the `FlatCompat` class, please see the [package READM
537537
538538
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.
539539
540-
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.
540+
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.
541541
542542
For example, here's a `.eslintignore` example you can use with an eslintrc config:
543543
@@ -564,6 +564,7 @@ The equivalent ignore patterns in flat config look like this:
564564
export default [
565565
// ...other config
566566
{
567+
// Note: there should be no other properties in this object
567568
ignores: ["**/temp.js", "config/*"]
568569
}
569570
];

0 commit comments

Comments
 (0)