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

Upgraded to eslint v9 #343

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Upgraded to eslint v9 #343

merged 2 commits into from
Nov 21, 2024

Conversation

lempira
Copy link
Contributor

@lempira lempira commented Nov 19, 2024

I updated eslint to v9 and to use the new flat config.

These are the steps I took

  1. Upgrading the eslint-related 1 by 1 led to peerDep errors so I uninstalled all of them and reinstalled:

Uninstalled:
@makerx/eslint-config
@typescript-eslint/eslint-plugin
@typescript-eslint/parser
eslint
eslint-config-prettier
eslint-plugin-prettier
eslint-plugin-react-hooks
eslint-plugin-react-refresh
eslint-plugin-tailwindcss

Reinstalled (in this order)
eslint
@eslint/js
typescript-eslint // Takes the place of @typescript-eslint
eslint-config-prettier
eslint-plugin-react // New, not sure if it's needed
eslint-plugin-react-hooks
eslint-plugin-react-refresh
eslint-plugin-tailwindcss

Note: I didn't install the makerx eslint config because it doesn't conform to flat config and couldn't be imported. I did take what is defined in the file and added it to this config

  1. Create the new eslint.config.mjs which uses tseslint for linting instead of eslint and adding ts directives.
  2. Ran npm run lint and added exceptions that I missed when creating the file like ignoring vars that begin with '_'
  3. Fixed linting errors
  • unused vars for errors in try/catch
  • Turned expressions that conditionally executed function into if block
  1. Deleted package-lock and node_modules and reinstalled.
  2. Fixed errors that results from package upgrade
  • algokit-utils beta from .20 to .23 removed the default export.

@lempira lempira added the dependencies Pull requests that update a dependency file label Nov 19, 2024
@lempira lempira requested a review from neilcampbell November 19, 2024 20:20
Copy link

cloudflare-workers-and-pages bot commented Nov 21, 2024

Deploying algokit-lora with  Cloudflare Pages  Cloudflare Pages

Latest commit: 649f1e8
Status: ✅  Deploy successful!
Preview URL: https://7957233b.algokit-lora.pages.dev
Branch Preview URL: https://upgrade-eslint-v9.algokit-lora.pages.dev

View logs

@lempira lempira merged commit 3cdb8d3 into main Nov 21, 2024
2 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants