Pass working directory to standard
Pass working directory to standard

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]: https://github.com/ricardofbarros/linter-js-standard/commit/5b05e688090e0c4abfa36c1cc2833321dd6a0a10
[3]: https://github.com/standard/standard-engine/pull/189

ricardofbarros/linter-js-standard