Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ESLint to 8.x #2386

Merged
merged 1 commit into from
Oct 27, 2021
Merged

Upgrade ESLint to 8.x #2386

merged 1 commit into from
Oct 27, 2021

Conversation

tpmai22
Copy link
Contributor

@tpmai22 tpmai22 commented Oct 22, 2021

Issue This PR Addresses

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

#2362 I use npm install [email protected] to upgrade our ESLint to the newest version. Since the eslint-plugin-import also need to be update to support ESLint 8.x I use the npm install eslint-plugin-import@latest because I can not safely update it using npm update <package-name>@lastest due to our semver range.

I also add some changes inside of our docs/environment-setup.md suggest running sudo apt update for newly installed WSL2 and adding a link on how to install Node for WSL2

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. While we're updating the major bits of eslint, let's also take the opportunity to update all the plugins. I've left comments on the ones I think we should change.

You might want to update them one-by-one locally and run eslint each time to make sure nothing breaks.

@@ -35,8 +35,9 @@ There are two methods to install Redis on Windows. We strongly recommend the fir
##### Option 1: Using [WSL2 (Windows Subsystem Linux)](https://docs.microsoft.com/en-us/windows/wsl/about)

1. Follow Microsoft WSL2 [installation guide](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to complete the installation
2. Depending on the distribution you chose for WSL2, install redis using that distro's package manager. For example, if using Ubuntu, run `sudo apt-get install redis`
2. Depending on the distribution you chose for WSL2, install redis using that distro's package manager. For example, if using Ubuntu, run `sudo apt-get install redis` . Note: make sure to run `sudo apt update` after WSL2 has been installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is good, but really belongs in a separate PR. We want to try and isolate changes so that we only update one thing at a time, and everything that gets updated is related. The reason for this is that later on, if something breaks, we can track down exactly what happened. If we mix multiple things into a fix, it makes it harder to undo something, since there are layers of changes all combined.

In this case, the change is innocuous, and unlikely to be a problem. However, in the future, prefer multiple, small PRs to combining things in one.

package.json Outdated
@@ -104,10 +104,10 @@
"babel-jest": "26.6.3",
"babel-preset-next": "1.4.0",
"cross-env": "7.0.3",
"eslint": "7.23.0",
"eslint": "8.0.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update this to 8.3.0 while you're here.

package.json Outdated
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-jest-playwright": "0.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update to 0.6.0

package.json Outdated
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-jest-playwright": "0.2.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "3.4.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update to 4.0.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update eslint-plugin-promise to 5.1.1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update eslint-plugin-react to 7.26.1

@cindyorangis
Copy link
Contributor

@BeAmazedVariable referring to your #2369 (comment). The environment-setup.md changes in our two PRs (#2386 and #2375) will not conflict much because they're targeting different problems. I don't mind the minor scope creep here and I'll review this PR once you address the other comments mentioned by @humphd . Thank you for your contribution :)

package.json Outdated
@@ -104,10 +104,10 @@
"babel-jest": "26.6.3",
"babel-preset-next": "1.4.0",
"cross-env": "7.0.3",
"eslint": "7.23.0",
"eslint": "8.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is at 8.1.0 now, see https://www.npmjs.com/package/eslint

@manekenpix manekenpix added the dependencies Pull requests that update a dependency file label Oct 24, 2021
@tpmai22
Copy link
Contributor Author

tpmai22 commented Oct 25, 2021

@humphd is it a good practice to commit those pluggin changes seperately and if the code don't break I will squash them into one commit ?

@humphd
Copy link
Contributor

humphd commented Oct 25, 2021

I think they are sufficiently related to this change, since we're doing a major update to eslint, so updating plugins at the same time is a logical step.

@humphd
Copy link
Contributor

humphd commented Oct 26, 2021

@BeAmazedVariable can we wrap this up soon please?

@tpmai22
Copy link
Contributor Author

tpmai22 commented Oct 26, 2021

@humphd Yes I will be able to

@tpmai22
Copy link
Contributor Author

tpmai22 commented Oct 26, 2021

@humphd I just push my commit again, please kindly review it.

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@cindyorangis cindyorangis merged commit c41a150 into Seneca-CDOT:master Oct 27, 2021
@cindyorangis cindyorangis changed the title Upgrade ESLint to 8.x and update environment-setup.md Upgrade ESLint to 8.x Oct 27, 2021
@humphd humphd mentioned this pull request Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants