Merge pull request #9393 from backstage/rugvip/lint-root
cli: make lint path output relative to repo root
This commit is contained in:
@@ -32,6 +32,11 @@ export default async (cmd: Command, cmdArgs: string[]) => {
|
||||
}
|
||||
|
||||
const formatter = await eslint.loadFormatter(cmd.format);
|
||||
|
||||
// This formatter uses the cwd to format file paths, so let's have that happen from the root instead
|
||||
if (cmd.format === 'eslint-formatter-friendly') {
|
||||
process.chdir(paths.targetRoot);
|
||||
}
|
||||
const resultText = formatter.format(results);
|
||||
|
||||
// If there is any feedback at all, we treat it as a lint failure. This should be
|
||||
|
||||
Reference in New Issue
Block a user