Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Commit bba318b

Browse files
fix: Resolve bug on eslint when linting multi projects (#80)
Co-authored-by: jose.rosa <[email protected]>
1 parent f431f31 commit bba318b

File tree

1 file changed

+6
-6
lines changed
  • packages/plugin-runner-eslint/src

1 file changed

+6
-6
lines changed

packages/plugin-runner-eslint/src/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ export default defineRunner(
4040
const { configFile, outputDir, fix: fixFlag } = options;
4141
const fix = Boolean(outputDir) && fixFlag;
4242

43-
/*
44-
* Updates the cwd to be the project
45-
* In this way the TS parser will only parse the project files
46-
*/
47-
process.chdir(project.fullPath);
48-
4943
logger.info(`Linting files with ESLint`);
5044

5145
const cliEngineOpts: CLIEngine.Options = { fix, cwd: workspace.cwd };
@@ -58,6 +52,12 @@ export default defineRunner(
5852
const cli = new CLIEngine(cliEngineOpts);
5953

6054
ctx.input(files => {
55+
/*
56+
* Updates the cwd to be the project
57+
* In this way the TS parser will only parse the project files
58+
*/
59+
process.chdir(project.fullPath);
60+
6161
const fixes: File[] = [];
6262

6363
files.forEach(file => {

0 commit comments

Comments
 (0)