Skip to content

Commit a766a48

Browse files
Zamiellnzakas
andauthored
docs: document lack of config file names (#17442)
* docs: document lack of config file names * Update configuration-files-new.md * Update docs/src/use/configure/configuration-files-new.md Co-authored-by: Nicholas C. Zakas <[email protected]> --------- Co-authored-by: Nicholas C. Zakas <[email protected]>
1 parent a1635d6 commit a766a48

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docs/src/use/configure/configuration-files-new.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ module.exports = (async () => {
5858
})();
5959
```
6060

61+
::: warning
62+
ESLint only automatically looks for a config file named `eslint.config.js` and does not look for `eslint.config.cjs` or `eslint.config.mjs`. If you'd like to specify a different config filename than the default, use the `--config` command line option.
63+
:::
64+
6165
## Configuration Objects
6266

6367
Each configuration object contains all of the information ESLint needs to execute on a set of files. Each configuration object is made up of these properties:
@@ -667,7 +671,7 @@ When ESLint is run on the command line, it first checks the current working dire
667671
You can prevent this search for `eslint.config.js` by setting the `ESLINT_USE_FLAT_CONFIG` environment variable to `true` and using the `-c` or `--config` option on the command line to specify an alternate configuration file, such as:
668672

669673
```shell
670-
ESLINT_USE_FLAT_CONFIG=true npx eslint -c some-other-file.js **/*.js
674+
ESLINT_USE_FLAT_CONFIG=true npx eslint --config some-other-file.js **/*.js
671675
```
672676

673677
In this case, ESLint does not search for `eslint.config.js` and instead uses `some-other-file.js`.

0 commit comments

Comments
 (0)