By default, the base path is the directory that the config file is in, but if a user passes -c to the CLI with a file path, the base path is the current working directory.
With this capability, the ESLint CLI could pass the file path and, optionally, the base path to the config inspector to ensure the correct file and information is used.
Right now, the config inspector needs to be run from the same directory as
eslint.config.js
in order to read the file.In the ESLint CLI, however, the config file may not be in the current working directory.
What I'd like to do is something like this:
By default, the base path is the directory that the config file is in, but if a user passes
-c
to the CLI with a file path, the base path is the current working directory.With this capability, the ESLint CLI could pass the file path and, optionally, the base path to the config inspector to ensure the correct file and information is used.