-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionauto closedThe bot closed this issueThe bot closed this issuecoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionThe team will evaluate this issue to decide whether it meets the criteria for inclusionneeds designImportant details about this change need to be discussedImportant details about this change need to be discussed
Description
The version of ESLint you are using.
v5.10.0
The problem you want to solve.
Similar to this one #3974
It was recommended to simply use process.cwd()
at that time.
And eslint-plugin-import followed this recommendation. import-js/eslint-plugin-import#602
But later cwd
option was introduced to CLIEngine
, so there may be an misalignment between it and process.cwd()
, which causes confusion when invoking ESLint with Node.js API.
Your take on the correct solution to problem.
Rules' context should have a .getCwd()
method which returns CLIEngine#cwd
by default and fallbacks to process.cwd()
.
Are you willing to submit a pull request to implement this change?
Yes.
platinumazure, g-plane, sindresorhus and not-an-aardvark
Metadata
Metadata
Assignees
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionauto closedThe bot closed this issueThe bot closed this issuecoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionThe team will evaluate this issue to decide whether it meets the criteria for inclusionneeds designImportant details about this change need to be discussedImportant details about this change need to be discussed