FlowCrypt / flowcrypt-browser

FlowCrypt Browser extension for Chrome and Firefox
https://flowcrypt.com
Other
372 stars 48 forks source link

Update to ESLint v9 #5713

Open sosnovsky opened 1 month ago

sosnovsky commented 1 month ago

Migration guide - https://eslint.org/docs/latest/use/migrate-to-9.0.0

sosnovsky commented 1 month ago

some tips on migrating to v9 https://x.com/karlhorky/status/1792500811307622631

it also mentions that it's easier to migrate to ESLint flat config before starting migration to v9, I filed separate issue for config migration - https://github.com/FlowCrypt/flowcrypt-browser/issues/5728

ioanmo226 commented 1 week ago

@sosnovsky When upgrading to ESLint v9, I encountered two major issues with packages:

  1. eslint-plugin-import: This package doesn't yet support ESLint v9 and flat config. The solutions could be:

  2. typescript-eslint: This package doesn't support ESLint v9. However, there is an alpha version (latest is ^8.0.0-alpha.30) that supports ESLint v9. We might consider using this version even though it's not yet stable.

ioanmo226 commented 1 week ago

Let me know your thoughts

sosnovsky commented 1 week ago

Oh, I thought typescript-eslint added support for eslint v9 in their current release, then let's wait before typescript-eslint update

ioanmo226 commented 1 week ago

You mean postpone our ESLint v9 update until typescript-eslint stable release and eslint-plugin-import release for ESLint v9 support?

sosnovsky commented 1 week ago

Yes, let's wait until support in stable typescript-eslint version. Maybe import plugin will add support too by that time, but it's not so critical.

sosnovsky commented 1 week ago

By the way, it looks like currently we don't use any rules from eslint-plugin-import - eslint config mentions only 'import/order' rule, but it's off. I haven't found any other rules from this package in our config, so it should be ok to remove it.