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

please explain the reasoning behind the "opinionated order" #4

Closed
revelt opened this issue Mar 27, 2018 · 1 comment
Closed

please explain the reasoning behind the "opinionated order" #4

revelt opened this issue Mar 27, 2018 · 1 comment

Comments

@revelt
Copy link

revelt commented Mar 27, 2018

Correct me if I'm wrong, but according to this opinionated setup, not always dependencies and devdependencies are the last keys in package.json. We have keys following them:

'keywords',
'engines',
'engine-strict',
'engineStrict',
'os',
'cpu',
'publishConfig'

Now the reason why we put things at the bottom is easy access for consumers.

@cameronhunter With full respect, Cameron, please explain to all the visitors here why do you need easier access to engines, os or cpu instead of dependencies and devdependencies?

My arguments against this are: engines should be a badge in readme anyway, keywords are set only once and matter only to author (so putting that at the bottom is quite egotist thing to do), os/cpu are never used.

One more observation; I noticed that your all of your own libraries are not using this order, for example, (local-ssl-proxy)[https://github.com/cameronhunter/local-ssl-proxy] - on the contrary, they have the old sensible order in package.json with dependencies and devdependencies at the bottom.

@cameronhunter
Copy link
Owner

In no place does the README say that dependencies and devDependencies are the last keys in package.json. The README states:

Keys in package.json will be sorted in an opinionated order but may be configured to your own preferences.

The reason that I clearly state the defaults are opinionated is because, in my opinion, it's the most helpful order (most important → least important). If you're unhappy with the ordering you can configure it to use whatever key order you want.

As an aside, your attitude and condescension is unnecessary and unwelcome. If this package doesn't fit your needs, create a PR, use another package, or write your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants