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

--config-path fails with JSONC #2164

Closed
1 task done
ivany4 opened this issue Mar 22, 2024 · 3 comments · Fixed by #2169
Closed
1 task done

--config-path fails with JSONC #2164

ivany4 opened this issue Mar 22, 2024 · 3 comments · Fixed by #2169
Assignees
Labels
A-CLI Area: CLI S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@ivany4
Copy link

ivany4 commented Mar 22, 2024

Environment information

I am using pre-commit hook, where I've overridden the entry, to benefit from `--config-path` argument, as my config file is in a subdirectory.

CLI:
  Version:                      1.6.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm"
  JS_RUNTIME_VERSION:           "v20.11.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.2.4"

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

Workspace:
  Open Documents:               0

What happened?

  1. I use JSONC configuration (as generated by biome init --jsonc)
  2. If I run biome with the --config-path argument, it does not actually find the config file and fails with error
    Biome couldn't read the following file, maybe for permissions reasons or it doesn't exists: ./src/rome.json
  3. If I rename biome.jsonc to biome.json, no error is reported

Expected result

Both biome.json and biome.jsonc should be valid configuration files.

Code of Conduct

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

Could you please tell us how you use the argument via CLI?

@ematipico ematipico added the S-Needs response Status: await response from OP label Mar 22, 2024
@ivany4
Copy link
Author

ivany4 commented Mar 22, 2024

I point it to the containing directory of the config file, in this example that would be biome check --config-path=./src

@ematipico ematipico added A-CLI Area: CLI S-Bug-confirmed Status: report has been confirmed as a valid bug and removed S-Needs response Status: await response from OP labels Mar 22, 2024
@Sec-ant
Copy link
Contributor

Sec-ant commented Mar 23, 2024

I'll work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI 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