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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Cannot extends a jsonc configuration file #2279

Closed
1 task done
KittyGiraudel opened this issue Apr 3, 2024 · 2 comments 路 Fixed by #2393
Closed
1 task done

馃悰 Cannot extends a jsonc configuration file #2279

KittyGiraudel opened this issue Apr 3, 2024 · 2 comments 路 Fixed by #2393
Assignees
Labels
A-Core Area: core S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@KittyGiraudel
Copy link

KittyGiraudel commented Apr 3, 2024

Environment information

$ /Users/kitty/Sites/biome-jsonc-repro/packages/some-dir/node_modules/.bin/biome rage
CLI:
  Version:                      1.6.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.16.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/1.22.21"

Biome Configuration:
  Error:                        Expected a property but instead found '// Test comment'.
  Error:                        End of file expected
  Error:                        End of file expected
  Error:                        End of file expected
  Error:                        End of file expected
  Error:                        Incorrect type, expected an object, but received an array.
  Status:                       Loaded with errors
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

  1. Define a biome.jsonc configuration file.
  2. Define a second configuration file extending from the first.
  3. Witness an error when loading that second file.

Expected result

If jsonc is supported to define configuration files, it should be possible to extend jsonc-defined configuration files, otherwise it鈥檚 a bit weird.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@KittyGiraudel KittyGiraudel changed the title 馃悰 Cannot extends a jsonc file 馃悰 Cannot extends a jsonc configuration file Apr 3, 2024
@ematipico
Copy link
Member

Thank you, @KittyGiraudel. Can you share a snippet of the configuration you're using?

@ematipico ematipico added S-Needs repro Status: needs a reproduction S-Needs response Status: await response from OP labels Apr 3, 2024
@KittyGiraudel
Copy link
Author

I updated my original comment to reflect the output from biome rage ran on this reproducible test case I just created: https://github.com/KittyGiraudel/biome-2279

I noticed that the problem only occurs when the JSONC configuration file contains comments. So it鈥榮 not the format per se that is the problem, but the presence of comments that make the extends choke.

I hope this helps. :)

@Sec-ant Sec-ant added A-Core Area: core S-Bug-confirmed Status: report has been confirmed as a valid bug and removed S-Needs repro Status: needs a reproduction S-Needs response Status: await response from OP labels Apr 10, 2024
@Sec-ant Sec-ant self-assigned this Apr 10, 2024
@Sec-ant Sec-ant linked a pull request Apr 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core Area: core S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants