GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(generators): remove ctx.cwd from prettier.resolveConfig() by buxit · Pull Request #3554 · feathersjs/feathers

Conversation

@buxit

@buxit buxit commented Dec 6, 2024

Copy link
Copy Markdown

fix prettier formating in generators

prettier.resolveConfig() should either be called with a concrete config file or without any parameters. with just a directory it fails to resolve correctly

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@buxit
remove ctx.cwd from prettier.resolveConfig()
0030d61
prettier.resolveConfig() should either be called with a concrete config file or without any parameters. with just a directory it fails to resolve correctly
@daffl daffl changed the title generators: remove ctx.cwd from prettier.resolveConfig() fix(generators): remove ctx.cwd from prettier.resolveConfig() Feb 1, 2025
daffl
daffl approved these changes Feb 1, 2025
View reviewed changes
@daffl
Update commons.ts to trigger build
456a60f
@daffl

daffl commented Feb 24, 2025

Copy link
Copy Markdown
Member

Thank you for the pull request. It looks like the types require a parameter which is why the compile step fails. What does the current failure look like?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@buxit

buxit commented Feb 25, 2025

Copy link
Copy Markdown
Author

Thank you for the pull request. It looks like the types require a parameter which is why the compile step fails. What does the current failure look like?

it doesn't pick up .prettierrc in the base directory, its contents are ignored. i see two options, calling resolveConfig with an empty string or with await prettier.resolveConfigFile(ctx.cwd) as argument.

the empty string works because there's a check for !configFile in prettier (https://github.com/prettier/prettier/blob/f66d8ec2e02ce95d41fcd0109c9143b1dc3c9b62/src/config/resolve-config.js#L33C3-L36C4)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daffl

daffl commented Feb 25, 2025

Copy link
Copy Markdown
Member

{ resolveConfig: await prettier.resolveConfigFile(ctx.cwd) } sounds like the more robust solution to me?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@buxit

buxit commented Mar 3, 2025

Copy link
Copy Markdown
Author

{ resolveConfig: await prettier.resolveConfigFile(ctx.cwd) } sounds like the more robust solution to me?

not sure await prettier.resolveConfig(await prettier.resolveConfigFile(ctx.cwd)) will actually compile, as resolveConfigFile(ctx.cwd) could return null

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

buxit added 2 commits April 8, 2025 17:46
@buxit
try prettier.resolveConfig('')
52e4213
@buxit
Merge branch 'feathersjs:dove' into patch-1
47e75f1
e-kibet
e-kibet approved these changes Dec 3, 2025
View reviewed changes

@e-kibet e-kibet left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@daffl daffl daffl approved these changes
+1 more reviewer
@e-kibet e-kibet e-kibet approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@buxit @daffl @e-kibet
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.