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

Move package config into config property #860

Closed
ghost opened this issue Apr 14, 2017 · 7 comments

Comments

@ghost
Copy link

commented Apr 14, 2017

https://standardjs.com/#how-do-i-ignore-files

Docs suggest using pkg.standard to configure standard. I'd like to hear thoughts on moving these into pkg.config.standard section (example), updating the docs to only recommend the new location and leaving in backwards compatibility for those who've already started using pkg.standard.

@feross

This comment has been minimized.

Copy link
Member

commented Apr 14, 2017

What's the rationale? It's common to use the top-level of package.json to do configuration.

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 14, 2017

What's the rationale?

Scoping, mostly, for better manifest organization. Brings the added benefit anyone needing to use standard in the package manifest for another purpose has an escape hatch to do so.

@tunnckoCore

This comment has been minimized.

Copy link

commented Apr 14, 2017

it's better for sure. couple of other tools uses it, and evryone should use it

@LinusU

This comment has been minimized.

Copy link
Member

commented Apr 16, 2017

config is used by npm to define config that the user of a package can set to affect that package. The example that they show is putting port inside so that the user can control the port with npm config set foo:port 8001 (ref)

I think it would be weird to include standard stuff under that since it would give the assumption that you should be able to configure it with npm config set which currently isn't possible. It would also be weird to be able to use npm config set since the standard config should be the same for everyone working on the project, that's the entire idea with the standard...

couple of other tools uses it, and evryone should use it

which tools are using it?

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 16, 2017

@LinusU thanks for dropping the 411. here are two, and it looks like ghook is on the way out as they've deprecated their library in favor of husky, which doesn't use config: https://github.com/jhabdas/fetch-inject/blob/d080c981f8b6b6cbf843fe35c71bc947344884b8/package.json#L51-L58 but whatevs.

I had no idea NPM defined that. I could have swore I double checked the package spec before I opened this. But either way it still seems like the community in general would benefit from a common place to name space their configs, and I feel it would help the packagers and package authors out quite a bit of there was a standard of some kind (even if de facto). Hope that makes sense. I've been up for 48 hours coding :)~

@tunnckoCore

This comment has been minimized.

Copy link

commented Apr 17, 2017

I had no idea NPM defined that.

me too.

@LinusU: which tools are using it?

Commitizen for example. But your explanation make sense to me too, so I'm okey with both places ;d

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 17, 2017

I'm going to drop this. If someone else wants to take the torch please backlink.

@ghost ghost closed this Apr 17, 2017

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.