diff --git a/docs/src/use/configure/migration-guide.md b/docs/src/use/configure/migration-guide.md index 4791dc7c5d0..6a054246a9b 100644 --- a/docs/src/use/configure/migration-guide.md +++ b/docs/src/use/configure/migration-guide.md @@ -345,14 +345,14 @@ export default [ 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. Note that flat config glob patterns do _not_ match dot files (e.g. `*.js` won't match `.dotfile.js`). 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. 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: ```shell # .eslintignore temp.js -.config/* +config/* # ...other ignored files ``` @@ -362,7 +362,7 @@ temp.js // .eslintrc.js module.exports = { // ...other config - ignorePatterns: ["temp.js", ".config/*"], + ignorePatterns: ["temp.js", "config/*"], }; ``` @@ -370,13 +370,15 @@ Here are the same files ignore patterns in flat config: ```javascript export default [ + // ...other config { - // ...other config - ignores: ["temp.js", ".config/*"] + ignores: ["**/temp.js", "config/*"] } ]; ``` +Also, with flat config, dotfiles (e.g. `.dotfile.js`) are no longer ignored by default. If you want to ignore dotfiles, add files ignore pattern `"**/.*"`. + ### Linter Options ESlintrc files let you configure the linter itself with the `noInlineConfig` and `reportUnusedDisableDirectives` properties.