Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In standard v13 (with ESLint v6), the current working directory is evaluated using `process.cwd()` when ESLint is initialized, see [`config-array-factory.js`][1]. Since we currently change the working directory _after_ standard is required, ESLint will fail to find modules because it’s trying to resolve them from the root directory (as can be seen by the require stack of `/__placeholder__.js`). Using standard’s `cwd` option resolves this issue. Previously, we couldn’t use this option because standard-engine did not pass it through to ESLint, see [`5b05e68`][2] and [standard/standard-engine#189][3]. To maintain compatibility with older standard versions, we still use `process.chdir()` as well. Fixes #231. [1]: https://github.com/eslint/eslint/blob/f5e0cc40795f175692acb05daaadb91e9e5ae5d3/lib/cli-engine/config-array-factory.js#L346 [2]: 5b05e68 [3]: standard/standard-engine#189
- Loading branch information