diff --git a/docs/user-guide/configuring.md b/docs/user-guide/configuring.md index 49d6f8149a1..8ee98568916 100644 --- a/docs/user-guide/configuring.md +++ b/docs/user-guide/configuring.md @@ -833,16 +833,18 @@ Globs are matched using [node-ignore](https://github.com/kaelzhang/node-ignore), In addition to any patterns in a `.eslintignore` file, ESLint always ignores files in `/node_modules/*` and `/bower_components/*`. -For example, placing the following `.eslintignore` file in the current working directory will ignore all of `node_modules`, `bower_components` and anything in the `build/` directory except `build/index.js`: +For example, placing the following `.eslintignore` file in the current working directory will ignore all of `node_modules`, `bower_components` in the project root and anything in the `build/` directory except `build/index.js`: ```text -# /node_modules/* and /bower_components/* ignored by default +# /node_modules/* and /bower_components/* in the project root are ignored by default # Ignore built files except build/index.js build/* !build/index.js ``` +**Important**: Note that `node_modules` directories in, for example, a `packages` directory in a mono repo are *not* ignored by default and need to be added to `.eslintignore` explicitly. + ### Using an Alternate File If you'd prefer to use a different file than the `.eslintignore` in the current working directory, you can specify it on the command line using the `--ignore-path` option. For example, you can use `.jshintignore` file because it has the same format: