Skip to content

Commit

Permalink
docs: Clarify how to exclude .js files (#18976)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic authored Oct 2, 2024
1 parent 5a6a053 commit d3e4b2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/use/configure/configuration-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Each configuration object contains all of the information ESLint needs to execut
Patterns specified in `files` and `ignores` use [`minimatch`](https://www.npmjs.com/package/minimatch) syntax and are evaluated relative to the location of the `eslint.config.js` file. If using an alternate config file via the `--config` command line option, then all patterns are evaluated relative to the current working directory.
:::

You can use a combination of `files` and `ignores` to determine which files the configuration object should apply to and which not. By default, ESLint lints files that match the patterns `**/*.js`, `**/*.cjs`, and `**/*.mjs`. Those files are always matched unless you explicitly exclude them using `ignores`.
You can use a combination of `files` and `ignores` to determine which files the configuration object should apply to and which not. By default, ESLint lints files that match the patterns `**/*.js`, `**/*.cjs`, and `**/*.mjs`. Those files are always matched unless you explicitly exclude them using [global ignores](#globally-ignoring-files-with-ignores).
Because config objects that don't specify `files` or `ignores` apply to all files that have been matched by any other configuration object, they will apply to all JavaScript files. For example:

```js
Expand Down

0 comments on commit d3e4b2e

Please sign in to comment.