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

What's the valid structure of .nycrc.json? #1271

Closed
mwoz123 opened this issue Jan 23, 2020 · 5 comments
Closed

What's the valid structure of .nycrc.json? #1271

mwoz123 opened this issue Jan 23, 2020 · 5 comments
Labels

Comments

@mwoz123
Copy link

mwoz123 commented Jan 23, 2020

Readme says it should start with
{ "nyc" : {
While with "nyc":{ it doesn't work (at least for windows 10, and yesterday downloaded nyc) in .nycrc.json

Luckily I found this :
istanbuljs/babel-plugin-istanbul#120

Which let me try to remove the nyc parent

@coreyfarrell
Copy link
Member

The README shows examples of package.json where the configuration is placed inside an nyc object. .nycrc.json and other configuration files just directly contain the configuration.

@AndrewFinlay do you have any thoughts on how we might clarify this?

@mwoz123
Copy link
Author

mwoz123 commented Jan 23, 2020

Maybe then would be good at least to mention that outside package.json
"nyc" : { will cause the whole configuration file will be ignored, and should be removed ?

@AndrewFinlay
Copy link
Contributor

Personally I don't think writing the config examples from a nyc stanza perspective is too bad but I can see how it could be misleading. At the very least the config examples should be consistent.

I can think of two solutions to this, the first is to drop the "nyc": { from the config examples in the documentation and state explicitly that example should be a part of config. The other solution is to look for a nyc block as the top level inside a config file and then use that instead of the top level config but I don't know how practical this is.

@coreyfarrell
Copy link
Member

My strong preference for this issue is a documentation fix. Dropping "nyc": { from the config examples seems fine to me, probably explicitly state that configuration in package.json must be wrapped in the "nyc" key? I'm not sure coherent documentation is not my strength.

@stale
Copy link

stale bot commented Jan 24, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jan 24, 2021
@stale stale bot closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants