-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Make prettier a peerDependency #1
Conversation
This allows the user to choose their version.
Thanks, this looks good. However, I do have a few concerns about this:
I still think this change might be worth it anyway, but do you agree with my assessment of these issues? |
So, yes, I think I agree with your assessment. I guess it makes sense to allow |
I suppose if prettier's API does change, it will only break this plugin for new installs, because people who previously installed an older version will still be getting it. I think that's probably fine -- if it does happen then I can make a patch release for the plugin. (I mainly want to make sure that the plugin can't unexpectedly stop working without user intervention.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
}, | ||
"devDependencies": { | ||
"eslint": "^3.14.1", | ||
"eslint-config-not-an-aardvark": "^2.0.0", | ||
"eslint-plugin-eslint-plugin": "^0.2.1", | ||
"eslint-plugin-node": "^3.0.5", | ||
"mocha": "^3.1.2" | ||
"mocha": "^3.1.2", | ||
"prettier": ">= 0.11.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version range does not technically have to be >= 0.11.0
here; ^0.11.0
could work as well. I thought it might be a good idea to use the same range as the peerDependency, though, to make sure that the tests pass when using the latest version allowed by the peerDependency. When I made the PR, the latest version of prettier on npm was 0.11.0. Now, when the PR was merged, 0.13.1 has been released, with slightly different output. I didn’t realize that this repo uses prettier for linting itself, which caused Travis to fail on the merge commit. Thoughts?
- Change the devDependency version constraint?
- Remove prettier from the eslint rules of this module?
- Just live with it, and re-format the files every now and then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose I'll pin the version of prettier
that this module uses to lint itself so that the build doesn't unexpectedly break.
This allows the user to choose their version.