Skip to content

fix: respect configs with stdin-path set#113

Open
43081j wants to merge 1 commit into
mainfrom
jg/stdin-configerootions
Open

fix: respect configs with stdin-path set#113
43081j wants to merge 1 commit into
mainfrom
jg/stdin-configerootions

Conversation

@43081j

@43081j 43081j commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Fixes #21.

This extracts the config loading into a new getConfigNames helper
function which both runStdin and runGlobs call.

In runStdin, we only run it if there is a stdinFilepath set.

In the case the stdinFilepath doesn't exist, we still get the config
from the cwd (just like runGlobs).

Fixes #21.

This extracts the config loading into a new `getConfigNames` helper
function which both `runStdin` and `runGlobs` call.

In `runStdin`, we only run it if there is a `stdinFilepath` set.

In the case the `stdinFilepath` doesn't exist, we still get the config
from the `cwd` (just like `runGlobs`).
@43081j 43081j requested a review from fabiospampinato July 8, 2026 08:57
@pkg-pr-new

pkg-pr-new Bot commented Jul 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

yarn add https://pkg.pr.new/@prettier/cli@113.tgz

commit: 8bd0460

}
});
};
const getEditorConfig: typeof getEditorConfigImpl = memoize(getEditorConfigImpl);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typescript errors on main if we don't do this. i guess it got bumped at some point and is no longer happy about the return type using an unexported type (as in we don't re-export it)

@43081j 43081j requested a review from fisker July 8, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config resolution in stdin mode

2 participants