-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Don't print Validation Warning for "//" comments in package.json #6027
Comments
I don't know, is this a widely used practice? Honestly I see this for the first time, but maybe it's just me. We would probably need to add more if these special characters to the whitelist, which I'm not happy with. |
Is this actually documented somewhere outside of node mailing list? I'd be happy to accept a PR if this really exists |
This does not appear to be documented at docs.npmjs.com, but the mailing list looks pretty official to me. It was written by the creator (and current CEO) of npm. Unfortunately github doesn't allow searching on special characters, so I can't see how common this is. FYI the SO post is the first Google hit for |
I remember seeing this as the response on the npm issue tracker, I think I actually submitted a PR at one point to npm supporting comments. Lemme see if I can dig it up! EDIT: Yeah, see npm/npm#4482 (and my rejected PR, for posterity: npm/read-package-json#46) |
I've seen this used before and since node people are directing folks to do it I'm also +1 for supporting 👍It's not like we're ever going to use "//" as a config for anything Labeling good first issue! @melissachang any interesting in taking it? |
Sorry, not at the moment :/ |
No sweat! |
@rickhanlonii First-time contributor here. I’d like to take a stab at implementing this feature. Can you point me at the validation logic for Jest configuration in |
That's awesome @andrew-pyle! What I would do (I think, haven't tested it) is add |
Fixed in #7295 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
package.json
doesn't support comments. The official, npm-sanctioned way to add comments is to use"//"
key:Running https://repl.it/repls/ThornyHatefulVirus prints a Validation Warning:
What is the expected behavior?
No warning should be printed for
"//"
keys.The text was updated successfully, but these errors were encountered: