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

[proposal] Making most peerDependencies -> dependencies #88

Conversation

fabiomcosta
Copy link
Contributor

@fabiomcosta fabiomcosta commented Nov 22, 2019

Today, when installing any of the eslint-config-godaddy-* packages, you're also required to install some peer deps that most ppl shouldn't care about.
My understanding is that this was done so consumers could more easily control those version on their side and we wouldn't need to have to keep maintaining that on our side.

This PR tries to make installing these packages easier, without showing the annoying warnings about the peerDeps missing.

I need to test this more before an eventual publish, but I was blocked by the fact that I can't publish beta versions, can someone help me with that?

"eslint": ">=6.0.0"
},
"dependencies": {
"babel-eslint": "*",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love these being regular dependencies but don't love them being * versioned. It's not uncommon to encounter breakages due to differing compatibility with different eslint versions and in the case of babel-eslint babel versions. I'd rather using dependencies tied a semver major range.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 ^1.2.3 + renovate/greenkeeper/etc would go a long way here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good... I'll keep eslint as a peer because the other plugins do that anyway...
I'll update the PR now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated based on the suggestions here.
unrelated: we should also probably create a separate PR removing the es5 package, it's just one more thing to maintain and it's probably not used by anyone.

},
"dependencies": {
"babel-eslint": "^10.0.3",
"eslint-config-godaddy": "^4.0.0",
Copy link
Contributor Author

@fabiomcosta fabiomcosta Nov 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to use the next version for these, can I have publish permission please?

"babel-eslint": "^10.0.3",
"eslint-config-godaddy": "^4.0.0",
"eslint-plugin-flowtype": "^4.5.2",
"eslint-plugin-jsx-a11y": "*",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change this to a ^ version? Don't want a non-backwards-compatible release breaking things for people.

@fabiomcosta
Copy link
Contributor Author

fabiomcosta commented Dec 2, 2019 via email

"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-flowtype": "^4.2.0",
"eslint-plugin-json": "^1.4.0",
"eslint-plugin-mocha": "^5.3.0"
Copy link
Member

@Swaagie Swaagie Dec 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these can be just removed. I do understand the peerDependencies messages might be annoying. This plugin extends from the base:

require('./extends')('eslint-config-godaddy')
which in turn has
plugins: ['mocha', 'json'],

Iirc this will just lead to eslint crashing on not finding the modules.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will now installed as regular dependencies, though, so eslint should be able to find all the relevant plugins, no? It doesn't make sense to me that they're peer dependencies; installing our canned config should install all the relevant plugins for you. All other eslint configs I've seen do this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"eslint-plugin-json": "^1.2.0",
"eslint-plugin-mocha": "^5.2.0",
"eslint-plugin-react": "^7.11.0",
"eslint-plugin-jsx-a11y": "^6.2.1"
Copy link
Member

@Swaagie Swaagie Dec 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, see comment above. The extend is two levels deep here though and based on the config-react plugin

Copy link
Member

@Swaagie Swaagie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand peerDependency warnings might be annoying, but the current solution might need more work in order to prevent eslint from crashing

@fabiomcosta fabiomcosta changed the title [proposal] Opening up dep versioning and removing most peerDependencies [proposal] Making most peerDependencies -> dependencies Jan 3, 2020
@DullReferenceException DullReferenceException merged commit 21493ee into godaddy:master Jan 10, 2020
andyfleming added a commit to andyfleming/javascript that referenced this pull request Jan 10, 2020
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

Successfully merging this pull request may close these issues.

4 participants