-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Skip package.json files with "xo": false
#151
Conversation
Maybe we can add a Symbol to the returned object of whether the original value is |
Actually, would be better to add an option in Suggested option name: What do you think? |
"xo": false
You're sure that's not slightly too opinionated? If you don't think so I can move the PR there instead. Another option would be to only assign defaults in pkg-conf if EDIT: Or, since you actually want the |
It is too opinionated indeed. That's why it should be an option that is false by default. I considered what you're suggesting, but I want to optimize for the common case and always return an object, for convenience. A pull request on |
By the way, could this cause issues with https://github.com/sindresorhus/xo/blob/master/cli.js#L72? Since you could potentially get the wrong |
pkg-conf@2 is out, can you update this PR to use it? (Keep the tests. Those are useful as integration tests)
No. Meow gets the package.json from |
Could you also document the ability to pass |
Done. I wasn't sure where to put the README section, so let me know if you'd rather have it somewhere else. In regards to the Also, out of curiosity - couldn't you have released pkg-conf version 1.2.0? This doesn't seem to be a breaking change to me. Doesn't matter now though. |
Awesome. Looks great to me. I slightly tweaked the readme change on merge. Thanks for working on this :) Need to go to bed now, but I plan on doing a new XO release tomorrow.
Meow is fetching the
Yes, but was already planning to do a major release with sindresorhus/package-config@d31b445 to reduce the amount of dependencies. |
Great, thanks!
I see, makes sense.
Ah, didn't see that you hadn't released that yet - makes perfect sense then! |
This makes
xo
continue its folder recursion upwards whenever it finds apackage.json
wherexo
is set tofalse
- see discussion at sindresorhus/atom-linter-xo#37 (comment).There's one issue though, since
pkg-conf
usesObject.assign
here there's no way to differ betweenfalse
and an empty object - which results in this test failing. Any ideas?