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

Add configPath option #28

Closed
ematipico opened this issue Dec 7, 2023 · 9 comments
Closed

Add configPath option #28

ematipico opened this issue Dec 7, 2023 · 9 comments
Labels
Enhancement Improves an existing feature Good first issue Help wanted External contributions are welcome

Comments

@ematipico
Copy link
Member

This option will allow the extension to resolve the configuration from a different path, as opposed to the default configuration resolution.

This option will pass --config-path to the CLI, so it will behave the same.

@ematipico ematipico added Enhancement Improves an existing feature Help wanted External contributions are welcome Good first issue labels Dec 7, 2023
@nhedger
Copy link
Member

nhedger commented Dec 7, 2023

Addressing this issue might be dependent on #27.

@nhedger
Copy link
Member

nhedger commented Dec 7, 2023

If the biome.configPath option is not specified, should it:

  1. Pass <workspace-root>/biome.json to the CLI as the --config-path option?
    • How does the CLI handle the absence of this file?
  2. Not pass the --config-path option at all?

@ematipico
Copy link
Member Author

We should not pass the option at all. The --config-path option changes slightly how the resolutions work (which I should document).

When we pass --config-path, Biome doesn't do any resolution by looking at parent directories.

@FedericoBiccheddu
Copy link

The related MR is closed saying there will be another path to implementation, but issue marked as completed.

Just to be sure, is still planned or implemented?

@panukettu
Copy link

panukettu commented Mar 9, 2024

I hoped this or similar capability existed - until I realized to just create a fallback biome config higher up in the filesystem.

Before this, it required a lot of willpower to keep this extension when a bunch of linter errors appear in a project that does not want a biome config. (magnified by the fact that biome seems to require ignore-comments on each diagnostic)

imo for general usage it would still be better (less context switchy) if biome defaults could be overridden in vscode settings - instead of a separate config file.

@nfm
Copy link

nfm commented Apr 2, 2024

@nhedger would it be possible to reopen this issue given the approach in #33 didn't pan out?

In case it's helpful context, my use-case for this is that I have a monorepo with standalone packages in subdirectories, some of which need biome and others of which don't. Unless I put biome.json in the top-level directory of the repo, the VSCode extension can't find it and uses the biome default settings.

@nfm
Copy link

nfm commented Apr 6, 2024

Did some more digging - links to upstream issues in biome LSP itself for those interested:

@emilte
Copy link

emilte commented Sep 18, 2024

Would love to see a configPath option in VSCode. It is located in a frontend folder and biome can't find it.

@nhedger
Copy link
Member

nhedger commented Sep 18, 2024

The pre-release supports this using explicitly defined projects.

Docs: https://deploy-preview-974--biomejs.netlify.app/reference/vscode/#defining-projects
Config reference: https://deploy-preview-974--biomejs.netlify.app/reference/vscode/#biomeprojects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improves an existing feature Good first issue Help wanted External contributions are welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants