Skip to content

Commit

Permalink
fix(linter): ensure tslint converter works with pnp
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Jul 26, 2023
1 parent 1dadb3d commit 8f8ab84
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ export async function convertToESLintConfig(
*/
writeJsonFile(pathToTslintJson, updatedTSLintJson);
}
const pm = getPackageManagerCommand();
const reportedConfiguration = await findReportedConfiguration(
'npx tslint --print-config',
`${pm.exec} tslint --print-config`,
pathToTslintJson
);

Expand All @@ -121,8 +122,7 @@ export async function convertToESLintConfig(
* This error could occur if, for example, the user does not have a TSLint plugin installed correctly that they
* reference in their config.
*/
const printConfigFailureMessageStart =
'Command failed: npx tslint --print-config "tslint.json"';
const printConfigFailureMessageStart = `Command failed: ${pm.exec} tslint --print-config "tslint.json"`;
if (
reportedConfiguration.message.startsWith(printConfigFailureMessageStart)
) {
Expand Down

0 comments on commit 8f8ab84

Please sign in to comment.