Support cwd in the top-level CLI #14731
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
cli
Relates to ESLint's command-line interface
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
Stale
Projects
The version of ESLint you are using.
7.29.0
The problem you want to solve.
I am working on using eslint as part of an arcanist lint flow. Arcanist runs linters via CLI and translates the output to its own format.
Running eslint via npm requires a specific task to be defined, so we opt to run eslint directly via
$repo/node_modules/.bin/eslint
, found from utilities likeyarn bin
The
eslint
binary does not accept a--cwd
flag, even though theCLIEngine
does..Specifically I am running into an issue with resolving a custom formatter when running outside of the node project directory.
Your take on the correct solution to problem.
Add a CLI flag
--cwd
which simply forwards that option intoCLIEngine
.An example command:
Are you willing to submit a pull request to implement this change?
Yes
The text was updated successfully, but these errors were encountered: