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

BC-8147 - Upgrade to ESLint 9 #3411

Merged
merged 39 commits into from
Oct 28, 2024
Merged

BC-8147 - Upgrade to ESLint 9 #3411

merged 39 commits into from
Oct 28, 2024

Conversation

NFriedo
Copy link
Contributor

@NFriedo NFriedo commented Sep 27, 2024

Short Description

In Eslint 9, there is a new default config format system, the flat config. Its also possible to use the new format in Eslint v8 (current: eslintrc format).
We want try to use the flat config and see if there are any problems.

This PR will upgrade ESLint 8 to ESLint 9.

Links to Ticket and related Pull-Requests

BC-8147

Changes

  • change eslintrc format to flat config
  • add configType: "flat" option to ESLintWebpackPlugin in webpack.common.js
    • ⚠️ Attention: as long as we use eslint 8, we need to add eslintPath: "eslint/use-at-your-own-risk", this is experimental
    • eslint 9 support is already there for the eslint webpack plugin
  • just @vue/eslint-config-typescript is not supporting the new format yet:
    • so we need to use the compatibility utilities FlatCompat from @eslint/eslintrc
    • they already working on v14, where they add support for flat config
  • we don't need to add our custom eslint plugin to the package.json anymore
  • remove .eslint.ignore (no longer supported), moved to ignores config object in eslint.config.js

Commits 7.10.24:

  • upgrade @vue/eslint-config-typescript to version 14
  • upgrade to eslint 9.12.0
  • set "@typescript-eslint/no-unused-vars": "warn", because there are many eslint errors in catch block
    • need to decide if want to use default option caughtErrors: all for 'catch' blocks
  • disable "no-unused-vars for @typescript-eslint/no-unused-vars
  • set "@typescript-eslint/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" },],
  • set "@typescript-eslint/no-require-imports": "off" for now
  • remove eslintPath: "eslint/use-at-your-own-risk" because this was just needed vor eslint 8
  • fix eslint errors

Data-security

Deployment

New Repos, NPM packages or vendor scripts

Screenshots of UI changes

Checklist before merging

  • QA: In addition to review, the code has been manually tested (if manual testing is possible)
  • PO: Any deviation from requirements was agreed with Product-Owner / ticket author / support-team
  • DEV: Every new component is implemented having accessibility in mind (e.g. aria-label, role property)

Notice: Please keep this Pull-Request as a Draft (or add WIP label), until it is ready to be reviewed

@NFriedo NFriedo requested a review from uidp September 27, 2024 14:39
@NFriedo NFriedo added the waiting for review Someone should review this ASAP label Sep 27, 2024
@NFriedo NFriedo marked this pull request as ready for review September 27, 2024 14:57
eslint.config.js Outdated Show resolved Hide resolved
uidp
uidp previously approved these changes Oct 25, 2024
eslint.config.js Outdated Show resolved Hide resolved
eslint.config.js Outdated Show resolved Hide resolved
uidp
uidp previously approved these changes Oct 25, 2024
@NFriedo NFriedo changed the title BC-8147 - [Research] New eslint flat config BC-8147 - Upgrade to ESLint 9 Oct 28, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@NFriedo NFriedo merged commit e8dc494 into main Oct 28, 2024
68 of 70 checks passed
@NFriedo NFriedo deleted the BC-8147-eslint-flat-config branch October 28, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for review Someone should review this ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants