admin管理员组

文章数量:1402059

I would like to upgrade eslint package to latest version.

yarn upgrade eslint --latest do nothing.

How can I update to latest version via yarn?

I would like to upgrade eslint package to latest version.

yarn upgrade eslint --latest do nothing.

How can I update to latest version via yarn?

Share Improve this question edited Sep 15, 2021 at 12:33 Machavity 31.7k27 gold badges95 silver badges105 bronze badges asked Sep 17, 2020 at 6:33 nirebam368nirebam368 3255 silver badges12 bronze badges 1
  • I do mostly yarn add eslint@latest – Felix Kling Commented Sep 17, 2020 at 7:50
Add a ment  | 

1 Answer 1

Reset to default 5

Recipe of my recent technique.

Some time ago mand below started failing to work

yarn upgrade somePackage -- latest

It's started to has side effects like updating other packages as babel, typescript etc. I don't see any ments about this behavior in official documentation. Going to codebase of yarn is a bit overhead in order to solve so "basic" task

Currently in order to update single package i use

yarn add somePackage

In order to update to latest i use

yarn add somePackage@latest

So, in your case i remend you to try (note that it goes to dev dependencies)

yarn add eslint@latest -D


Please, let me know if it works or not )

本文标签: javascriptHow to upgrade package to latest version using yarnStack Overflow