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 ESlint and plugins #311

Merged

Conversation

WilsonZiweiWang
Copy link
Contributor

@WilsonZiweiWang WilsonZiweiWang commented Aug 27, 2024

  1. Remove unused eslint plugins as eslint runs fine without them.
  2. Start using flat config system as required by the latest eslint. (First step because eslint 8.x can work with the new config system as well)

Next steps:

  1. Replace eslint-config-standard-with-typescript with eslint-config-love as mentioned by the maintainer.
  2. eslint-plugin-deprecation doesn't support eslint 9.x yet, and it seems like it is still WIP. Look for a replacement.
    ESLint v9 compatibility gund/eslint-plugin-deprecation#78
  3. Current header rules don't work with eslint 9.x. Find a replacement or use the fix from the fork mentioned in this PR.
    fix: disable rule options schema validation in eslint 9, fix https://github.com/Stuk/eslint-plugin-header/issues/57 Stuk/eslint-plugin-header#58
  4. Update the eslint to 9.x when the issues above are resolved.

Plugin eslint-plugin-import, eslint-plugin-n and eslint-plugin-promise were added at the very beginning of the eslint setup.
But they were never used. eslint-plugin-jest was added along with the jest framework and it was never used either.
.eslintrc.js and .eslintignore are deprecated and the new flat config system is preferred. The CLI also doesn't
support --ext flag with the flat config system.

How the new config is generated:
https://eslint.org/docs/latest/use/configure/migration-guide#migrate-your-config-file
Reference for cli flag changes:
https://eslint.org/docs/latest/use/configure/migration-guide#cli-flag-changes
@WilsonZiweiWang WilsonZiweiWang marked this pull request as ready for review September 3, 2024 15:29
@WilsonZiweiWang WilsonZiweiWang merged commit 1c545dc into yoctoproject:staging Sep 10, 2024
5 checks passed
@WilsonZiweiWang WilsonZiweiWang deleted the Update-eslint-config branch September 10, 2024 14:32
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.

2 participants