Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Migrating from a .prettierrc.yaml doesn't work #2760

Closed
1 task done
illright opened this issue May 8, 2024 · 2 comments
Closed
1 task done

🐛 Migrating from a .prettierrc.yaml doesn't work #2760

illright opened this issue May 8, 2024 · 2 comments

Comments

@illright
Copy link

illright commented May 8, 2024

Environment information

CLI:
  Version:                      1.7.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.5.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.15.8"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

mkdir biome-repro
cd biome-repro
echo "trailingComma: all" > .prettierrc.yaml
pnpm init
pnpm add -D prettier
pnpm add --save-dev --save-exact @biomejs/biome
pnpm biome init
pnpm biome migrate prettier --write

Result:

migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Migration has encountered an error: Biome couldn't find a Prettier configuration file.

However, if I do this:

echo '{ "trailingComma": "all" }' > .prettierrc
pnpm biome migrate prettier --write

It works:

.prettierrc has been successfully migrated.

Expected result

It should recognize the YAML file of Prettier RC as a valid configuration

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico
Copy link
Member

It doesn't work because Biome can't parse yaml files. This is out of scope.

@ematipico ematipico closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
@Conaclos
Copy link
Member

Conaclos commented May 8, 2024

Biome is currently unable to handle YAML files. This is documented in our documentation. If Biome gets a YAML parser in the future, then we could support YAML migration for Prettier and ESLint.

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

No branches or pull requests

3 participants