Open
Description
Environment:
Node.js: v22.13.1
npm: v10.9.2
NX: v20.3.2
Sherif: v1.1.1
Steps to Reproduce:
-
Create a new NX project with two apps, one with
"eslint": "^9.7.0"
, another with"eslint": "^9.8.0"
. -
Run
npm i
, followed bynpx sherif -i eslint@^9.7.0
Expected Behavior:
Sherif should not report any errors, as the specified version eslint@^9.7.0
is being ignored.
Actual Behavior:
Sherif reports the following error on Windows, but not macOS or Linux:
1 issue found in ./:
⨯ error Dependency eslint has multiple versions defined in the workspace. multiple-dependency-versions
./ ^9.8.0 ↑ highest
.\apps\app2 ^9.8.0 ↑ highest
.\apps\app1 ^9.7.0 ↓ lowest
1 issue found (1 ⨯, 0 ⚠️, 0 ✓) across 2 packages in 793.5µs.
Observations:
- The
eslint@^9.7.0
version was explicitly ignored usingnpx sherif -i eslint@^9.7.0
. - Despite this, Sherif flagged the version mismatch as an error.
- Testing the same for
"eslint": "9.7.0"
and"eslint": "9.8.0"
does not repro.