Bug description
eslint-plugin-obsidianmd pins obsidian to the exact version 1.8.7 in peerDependencies, which makes it impossible to co-install with other official Obsidian tooling that requires a newer Obsidian version.
On the current master branch (commit d7e2239, not yet published), the same package.json is self-contradictory:
"dependencies": {
"obsidian": "1.12.3"
},
"peerDependencies": {
"obsidian": "1.8.7"
}
The dependency was bumped to 1.12.3 but the peer range was not updated.
Concrete failure
In a project using both eslint-plugin-obsidianmd and obsidian-integration-testing (peer: obsidian@^1.12.3), no single obsidian version can satisfy =1.8.7 and ^1.12.3 at the same time, so npm install fails outright:
npm error code ERESOLVE
npm error While resolving: obsidian-integration-testing@12.0.0
npm error Found: obsidian@1.8.7
npm error Could not resolve dependency:
npm error peer obsidian@"^1.12.3" from obsidian-integration-testing@12.0.0
Users currently have to work around this with --legacy-peer-deps or an .npmrc with legacy-peer-deps=true, which disables peer validation project-wide.
Suggested fix
Peer dependencies are a compatibility contract, not a lockfile. Please express it as a range, e.g.:
"peerDependencies": {
"obsidian": ">=1.8.7"
}
or at minimum keep it in sync with dependencies.obsidian (^1.12.3). Since the plugin only uses Obsidian's type definitions for linting, a floor plus open upper bound should be safe and would remove the need for every consumer to set legacy-peer-deps.
Bug description
eslint-plugin-obsidianmdpinsobsidianto the exact version1.8.7inpeerDependencies, which makes it impossible to co-install with other official Obsidian tooling that requires a newer Obsidian version.On the current
masterbranch (commit d7e2239, not yet published), the samepackage.jsonis self-contradictory:The dependency was bumped to 1.12.3 but the peer range was not updated.
Concrete failure
In a project using both
eslint-plugin-obsidianmdandobsidian-integration-testing(peer:obsidian@^1.12.3), no singleobsidianversion can satisfy=1.8.7and^1.12.3at the same time, sonpm installfails outright:Users currently have to work around this with
--legacy-peer-depsor an.npmrcwithlegacy-peer-deps=true, which disables peer validation project-wide.Suggested fix
Peer dependencies are a compatibility contract, not a lockfile. Please express it as a range, e.g.:
or at minimum keep it in sync with
dependencies.obsidian(^1.12.3). Since the plugin only uses Obsidian's type definitions for linting, a floor plus open upper bound should be safe and would remove the need for every consumer to setlegacy-peer-deps.