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

[Feature Request]: Take mocha configuration from package.json #171

Open
Enubia opened this issue Oct 20, 2024 · 2 comments
Open

[Feature Request]: Take mocha configuration from package.json #171

Enubia opened this issue Oct 20, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Enubia
Copy link

Enubia commented Oct 20, 2024

Description

Mocha allows you to specify the configuration inside the package.json file. It would be awesome if the extension could also read it from there since I don't want to add a configuration file to all my projects when the configuration is already provided inside the package.json file.

Describe the solution you'd like

Provide the user with an option to read the config from the package.json instead of a needing a dedicated configuration file.

Describe alternatives you've considered

No response

@Danielku15
Copy link
Member

Technically it would be easy to support, but there is a reason why I didn't add it in first place:

  • Currently the extension only needs to activate and load when there is really a mocha configuration file in the workspace. With supporting package.json it would mean the extension is loaded for almost every workspace.
  • While not really confirmed by numbers, I thought it is rather unusual to put too many framework configs in the package.config. It can easily bloat and things would be published for npm packages. The ecosystem somehow agreed and evolved to a direction that frameworks have their own dedicated configuration files to keep things isolated and benefit from scriptable configurations.

But generally you are right, the extension should support it as Mocha supports it.

@Danielku15 Danielku15 added enhancement New feature or request good first issue Good for newcomers labels Oct 20, 2024
@Enubia
Copy link
Author

Enubia commented Oct 20, 2024

While not really confirmed by numbers, I thought it is rather unusual to put too many framework configs in the package.config. It can easily bloat and things would be published for npm packages. The ecosystem somehow agreed and evolved to a direction that frameworks have their own dedicated configuration files to keep things isolated and benefit from scriptable configurations.

I agree with you that it's usually the case that you have configuration files in place for all those things. But some projects (like the ones I have to work on a daily base) were configured when it wasn't commonly adapted to use those files and configurations were done in the package.json if possible.

In any case, thanks for this extension. It's the only one I found that properly works with typescript (and tsx) so keep up the good work. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants