Skip to content

Commit e4c90e5

Browse files
wmertensljharb
authored andcommitted
[utils] [patch] mark eslint as an optional peer dep
This allows it to find eslint from module-require.js when the package manager is strict. Maintainer note: this should not be necessary, but using `peerDependenciesMeta` here seems to have no downsides for real npm users, and allows tools like pnpm or yarn PnP to statically "know" that this package wants to access `eslint` if it is present.
1 parent ab8b6d8 commit e4c90e5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

utils/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
88
### Fixed
99
- [Fix] Ignore hashbang and BOM while parsing ([#2431], thanks [@silverwind])
1010

11+
### Changed
12+
- [patch] mark eslint as an optional peer dep ([#2523], thanks [@wmertens])
13+
1114
## v2.7.3 - 2022-01-26
1215

1316
### Fixed
@@ -118,6 +121,7 @@ Yanked due to critical issue with cache key resulting from #839.
118121
### Fixed
119122
- `unambiguous.test()` regex is now properly in multiline mode
120123

124+
[#2523]: https://github.com/import-js/eslint-plugin-import/pull/2523
121125
[#2431]: https://github.com/import-js/eslint-plugin-import/pull/2431
122126
[#2350]: https://github.com/import-js/eslint-plugin-import/issues/2350
123127
[#2343]: https://github.com/import-js/eslint-plugin-import/pull/2343
@@ -164,3 +168,4 @@ Yanked due to critical issue with cache key resulting from #839.
164168
[@timkraut]: https://github.com/timkraut
165169
[@vikr01]: https://github.com/vikr01
166170
[@VitusFW]: https://github.com/VitusFW
171+
[@wmertens]: https://github.com/wmertens

utils/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@
2727
"homepage": "https://github.com/import-js/eslint-plugin-import#readme",
2828
"dependencies": {
2929
"debug": "^3.2.7"
30+
},
31+
"peerDependenciesMeta": {
32+
"eslint": {
33+
"optional": true
34+
}
3035
}
3136
}

0 commit comments

Comments
 (0)