My 3rd PR : Telescope
For my third, I got a chance to work with alumini from Seneca to contribute to the Telescope project. I intend to pick another easy one since I'm not that familiar with the project yet and I found issue-2362
I forked the repo and clone it locally into my computer and start to work on upgrading eslint to 8.x. I created a topic branch names issue-2362
and make some reading about how to safely install or upgrade npm packages. Apprently, I will come in and use npm outdated
for a list of outdated npm packages but it seem like ESLint did not show up in the list and it come to my realize that npm outdated
list outdated in dependencies
but not the devDependencies
so I have to use npm outdated --save-dev
instead to get the result that I wanted
Package Current Wanted Latest Location
eslint 8.1.0 7.23.0 8.1.0 @senecacdot/telescope
eslint-config-prettier 8.3.0 8.1.0 8.3.0 @senecacdot/telescope
eslint-plugin-import 2.25.2 2.22.1 2.25.2 @senecacdot/telescope
eslint-plugin-jest-playwright 0.6.0 0.2.1 0.6.0 @senecacdot/telescope
eslint-plugin-prettier 4.0.0 3.4.0 4.0.0 @senecacdot/telescope
eslint-plugin-promise 5.1.1 5.1.0 5.1.1 @senecacdot/telescope
eslint-plugin-react 7.26.1 7.22.0 7.26.1 @senecacdot/telescope
After that, I use npm update "eslint"
but nothing seem to happen. There was no package installing and it seem like the cmd
just skip my command line and when I check for outdated packages again they said I was not be able to update eslint package because I can not pass semver range
. I did make more reading and after half an hour, I figure it out it was because of the version part
npm package versioning follows semantic versioning. So, a package version has 3 parts - Major.Minor.Patch
So npm update <package-name>
will only help me to update minor version and if I want to update my eslint package from 7.23.0
to 8.1.0
I will have to use npm install eslint@latest
Use npm install @latest to upgrade to the latest major version of a package
After that, I use npm run eslint
to make sure my update did not break the project and guess what it really did.
Error: Failed to load plugin 'import' declared in '--config': Cannot find module 'C:\Users\Administrator\Desktop\repo\telescope\node_modules\eslint\lib\util\glob-utils.js'
After talking with @humphd, he found a usefull link about the issue I was having and it point out correctly that I need to have eslint-plugin-import
updated so it can support eslint 8.x. After that running eslint did not break the code anymore.Then, I uploaded my PR-2386 and receive more request asking if I can update eslint related plugins and I would be more happy to work on it !
Top comments (0)