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

Update to eslint v9 #3385

Merged
merged 15 commits into from
Sep 30, 2024
Merged

Update to eslint v9 #3385

merged 15 commits into from
Sep 30, 2024

Conversation

flodolo
Copy link
Collaborator

@flodolo flodolo commented Sep 28, 2024

Fixes #3384

Going through the individual commits might help:

  1. I moved the excluded paths from .eslintignore into the config. The first surprise there is that I had to add ignorePatterns also to the config file in /translate/.eslintrc.js.
  2. Updated eslint up to 8.40. Beyond that, the update was not working out of the box.
  3. Updated to eslint 8.57.1 (had to install also the globals package, see SO thread).
  4. Converted configs to new flat format (via migration tool).
  5. Fixed remaining errors. This one needs someone who truly understands JS to tell if I just patched the problem in the wrong place. Again, surprising the previous ignores rule for /static wasn't working 🤷🏼
  6. Updated caniuse because I was tired of seeing the warning.

Unrelated:

  • *venv doesn't seem to work in ignore files, ended up adding both venv (virtualenv) and .venv (uv style).
  • Not sure why package-lock.json still had references to tag-admin?

@flodolo flodolo requested a review from eemeli September 28, 2024 13:08
@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.51%. Comparing base (6a8744b) to head (2c6f77d).
Report is 1 commits behind head on main.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flodolo
Copy link
Collaborator Author

flodolo commented Sep 28, 2024

  1. Manually remove one more zombie piece of tag-admin from package-lock.json.

package.json Outdated Show resolved Hide resolved
@flodolo flodolo self-assigned this Sep 30, 2024
@flodolo
Copy link
Collaborator Author

flodolo commented Sep 30, 2024

I actually realized that the update to node 9 is relatively straightforward at this point, so trying to use this PR to do the full jump to v9.

@flodolo flodolo changed the title Update eslint to latest 8 version, move to flat config file Update to eslint v9 Sep 30, 2024
eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Outdated Show resolved Hide resolved
translate/eslint.config.mjs Outdated Show resolved Hide resolved
flodolo and others added 12 commits September 30, 2024 16:26
Last version before it starts breaking apart
Manually install globals to work around error
https://stackoverflow.com/a/75524936

Fixed also ignore files to catch both venv and .venv
– Update `eslint` to latest v9 (9.11.1)
- Switch from `eslint-plugin-import` to `eslint-plugin-import-x`
- Update `eslint-plugin-react`
- Update `@babel/*` and `@typescript/*` packages
Copy link
Member

@eemeli eemeli left a comment

Choose a reason for hiding this comment

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

Sorry for not doing the full review all at once; this should be the last batch of comments.

eslint.config.mjs Outdated Show resolved Hide resolved
translate/eslint.config.mjs Outdated Show resolved Hide resolved
translate/eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Outdated Show resolved Hide resolved
@flodolo flodolo merged commit 174a951 into mozilla:main Sep 30, 2024
6 checks passed
@flodolo flodolo deleted the eslint_prep branch September 30, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ESLint to version 9
4 participants