Skip to content

Commit

Permalink
Require configPath when requireConfig is true
Browse files Browse the repository at this point in the history
This commit fixes prettier#2402 by reintroducing changes from 5624041.
  • Loading branch information
redoPop committed Sep 8, 2022
1 parent f4069b3 commit c744ebb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ModuleResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,12 @@ export class ModuleResolver implements ModuleResolverInterface {
resolvedConfig = this.resolveConfigPlugins(resolvedConfig, fileName);
}

if (!isVirtual && !resolvedConfig && vscodeConfig.requireConfig) {
if (
!isVirtual &&
!vscodeConfig.configPath &&
!configPath &&
vscodeConfig.requireConfig
) {
this.loggingService.logInfo(
"Require config set to true and no config present. Skipping file."
);
Expand Down

0 comments on commit c744ebb

Please sign in to comment.