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

Move dependencies from peerDependencies to dependencies #5

Merged
merged 2 commits into from
Sep 1, 2020

Conversation

mortnod
Copy link
Contributor

@mortnod mortnod commented Jan 31, 2020

In Rainbow PR #21 I updated Rainbows dependencies. As part of that I upgraded ESLint from v5 to v6.

This change seemed to break the ESLint setup. The v6 migration guide seemed to indicate that plugins must be installed locally now. Thus, the dependencies was moved out of peerDependencies and into dependencies. This fixed my problem.

I'm not quite sure about the implications of this change, though. Feedback (and alternative solutions) are greatly appreciated. 🙂

@mortnod mortnod requested review from kmkr and rix1 January 31, 2020 16:28
@mortnod mortnod self-assigned this Jan 31, 2020
Copy link
Member

@kmkr kmkr left a comment

Choose a reason for hiding this comment

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

Great! I don't think moving from peer to non-peer dependencies will cause problems.

package.json Outdated
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"peerDependencies": {},
Copy link
Member

Choose a reason for hiding this comment

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

Can be removed.

'error',
'ignorePackages',
{
'js': 'never',
Copy link
Member

Choose a reason for hiding this comment

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

I can't find it now but I remember reading the spec requires extensions for import. Any reason for disallowing extensions? What about ignoring the rule instead for now?

Copy link
Member

@rix1 rix1 left a comment

Choose a reason for hiding this comment

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

Nice work! Keeping deps up to date is important and I appreciate you taking the time to do this 🙌

I tried this locally, and I had no issues with just upgrading the packages, but keeping them in peerDependencies 🤔 Maybe you encountered a different problem? Or is it because I don't have eslint installed globally?

After seeing and agreeing with @kmkr's comment, I suggest that you split your commit into 2 (or three):

  1. Upgrade packages
  2. Move from deps to peerDeps
  3. typescript: update import/extensions, and then add a rationale for why this was done 👍

I guess you could do 1 and 2 in one go – you decide :)

@rix1 rix1 force-pushed the mortnod/move-peer-dependencies branch from 7f8e30c to c522a9b Compare September 1, 2020 09:31
@rix1
Copy link
Member

rix1 commented Sep 1, 2020

Upgraded all dependencies. Merging this now ✌️ Will publish to npm as soon as we're in master

@rix1 rix1 merged commit 8f4e5da into master Sep 1, 2020
@mortnod
Copy link
Contributor Author

mortnod commented Sep 1, 2020

what-year-is-this

Thanks for dragging this across the finish line @rix1 ❤️

@mortnod mortnod deleted the mortnod/move-peer-dependencies branch September 1, 2020 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants