-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eslint] bump minimum v7 version to v7.2.0
- Loading branch information
Showing
2 changed files
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d84062e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljharb what was the reason for this change?
d84062e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the time this was ready for release, there was no point supporting older versions of eslint 7. It’s always best to require as new a version of a major line as one can without a breaking change.
d84062e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. So
eslint
v7 - 7.2 quite possibly works? I need to know if I need to increase my own peer dependency range from v7 to v7.2, which would be a breaking change I would rather avoid.d84062e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about your question. If you're using eslint-plugin-import as a direct dep/dev dep, then you must use eslint v7.2 or above. If you're using it as a peer dep (what's your use case?), then your consumers also must use v7.2 or above.
Whether it "works" is irrelevant; the peer dep range is an absolute requirement, and
npm ls
will indicate that eslint v7.0 or v7.1 makes for an invalid dependency graph.d84062e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint-plugin-import
is a peer dependency ofeslint-config-env
. My new version I haven't pushed up yet will have aneslint
^7.0.0
peer dependency, since I have increased theparserOptions.ecmaVersion
to2021
, breaking support foreslint
v6. Whileeslint-plugin-import
'seslint
v7.2.0 peer dependency will make it impossible for an npm v7 project to installeslint
at v7.0.0, myeslint-config-env
peer dependency range foreslint
^7.0.0
should not cause a problem aseslint-plugin-import
will dictate the version that gets installed as it has a higher requirement.I have some faint recollections of some environment that could have problems (yarn pnp?) so, I will probably match
eslint-plugin-import
'seslint
v7.2.0 peer dependency requirement. It's annoying that we are declaringeslint
v7.0.0 is not supported, when it probably works fine. I disagree we should make peer dependencies as recent as possible in major releases just because you can. Because then it forces the whole ecosystem that might also use your package to abandon the earlier versions in their peer dependency range also.The
eslint-plugin-import
peer dependency"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0"
reveals you have only applied this approach foreslint
v7. By your same through process, why didn't you drop all the earliereslint
major versions at the same time? Why supporteslint
v6.0.0 but not v7.0.0? I.e, why didn't you update it to:"eslint": "^7.2.0"
"eslint": "^2.13.1 || ^3.19 || ^4.19.1 || ^5.16 || ^6.8 || ^7.2.0"
d84062e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should work fine, but declaring v7.0.0 when your deps require v7.2.0 doesn’t add any value imo.
The desire is to force everyone to be on as late a version as possible, at least for a dev tool like eslint where there’s no reason not to update aggressively.
the reason we didn’t do it on the other majors is simply that we didn’t take as long to release support for them (vX.0.0 was the latest at the time), and eslint wasn’t making releases so quickly back then either. It would also be a breaking change to raise the threshold now, but in our next major release, whenever that is, we will definitely be doing precisely that.