Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upRequire "standard" field in package.json #625
Comments
This comment has been minimized.
This comment has been minimized.
|
For me, half the point is my modules may have forgotten This is going to be very subjective based on the users pre-disposition to varying ... configurations. |
This comment has been minimized.
This comment has been minimized.
|
It's already in there:
I don't think forcing everyone to add a It takes away the beauty of standard, which is that I don't have configure anything at all. I only need to do the very bare minimum (installing a package, adding to |
This comment has been minimized.
This comment has been minimized.
I was thinking that the rule would be, "if package.json exists, then it must have a
When you use standard, you're choosing to be forced to comply with a set of code style rules. Some of them (like requiring one Checking for |
This comment has been minimized.
This comment has been minimized.
|
@anandthakker I sympathize. Turning on and off the
I would check for Honestly, the IMO, the presence of the |
feross
closed this
Sep 15, 2016
This comment has been minimized.
This comment has been minimized.
|
|
anandthakker commentedSep 15, 2016
Bringing this proposal over from a twitter thread: https://twitter.com/anandthakker/status/776252795972362241
I quite like
standard(the rules). My only problem withstandard(the tool) is that it makes it difficult to get automatic, in-editor linter errors when switching between OSS projects (most of which I don't control) that do/don't usestandard. There are, for the most part, three main cases:standardeslint, and contains an.eslintrc(or maybe aneslintConfigproperty inpackage.json)I'd be okay setting up
vimto inspect the current project and pick, eslint or standard accordingly. However, my (main) issue is that there isn't a great way to distinguish between cases 1 and 3: if I just default tostandardwhen there's no.eslintrc, then I get stuck with a bunch of spurious lint errors in projects that use some other linter (or don't use one at all).@feross What do you think about the idea of having
standardrequire thestandardproperty inpackage.json? My reasoning is that this (a) enforces a reliable way to programmatically determine whether a project usesstandardand (b) is a very low burden to comply with (standardcould even add the field on install?)