Skip to content

Commit

Permalink
fix(rule-tester): fix parser fallback logic (#7754)
Browse files Browse the repository at this point in the history
  • Loading branch information
rriski committed Oct 17, 2023
1 parent bb15aae commit 34c23e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rule-tester/src/RuleTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class RuleTester extends TestFramework {
// as of eslint 6 you have to provide an absolute path to the parser
// but that's not as clean to type, this saves us trying to manually enforce
// that contributors require.resolve everything
parser: require.resolve((testerConfig ?? defaultConfig).parser),
parser: require.resolve(testerConfig?.parser ?? defaultConfig.parser),
});

// make sure that the parser doesn't hold onto file handles between tests
Expand Down

0 comments on commit 34c23e0

Please sign in to comment.