Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

fix(deps): add downstream peer dependencies #120

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
"eslint-config-airbnb-base": "^14.2.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^3.6.1"
"@typescript-eslint/eslint-plugin": "^3.6.1",
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
"eslint-plugin-import": "^2.21.2",
Copy link
Owner

Choose a reason for hiding this comment

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

Curious where this version came from?

In both eslint-config-airbnb and eslint-config-airbnb-base they reference ^2.22.0

Copy link
Author

Choose a reason for hiding this comment

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

I got that version from the warning logs when installing with Yarn V2 PNP.

Copy link
Owner

Choose a reason for hiding this comment

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

Looks like the peer dependency version was updated pretty recently in eslint-config-airbnb. Maybe the warning log you referenced was slightly outdated. Can you update this line ^2.22.0?

Copy link

Choose a reason for hiding this comment

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

This will be a bit hard to maintain. To mimic other libraries' peer dependencies will just go out of sync with time. I think it's cleaner to deal with this problem to decouple this library's dependencies from airbnb as much as possible and instead provide guidance on how to deal with these.
An alternative approach is proposed here #201

"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4 || ^3 || ^2.3.0 || ^1.7.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "3.6.1",
Expand All @@ -55,5 +60,16 @@
"javascript",
"styleguide",
"typescript"
]
],
"peerDependenciesMeta": {
"eslint-plugin-jsx-a11y": {
"optional": true
},
"eslint-plugin-react": {
"optional": true
},
"eslint-plugin-react-hooks": {
"optional": true
}
}
}