Skip to content

Resolve "Migrate to ESLint Flat Config"

Hiru Fernando requested to merge 146-migrate-to-eslint-flat-config into main

What does this MR do and why?

This MR upgrades Eslint package from 8.57.0 to 9.15.0 (latest). It also changes eslint configuration to flat config (Used npx @eslint/migrate-config .eslintrc.yml for auto migration and then followed some more instructions from https://vueschool.io/articles/vuejs-tutorials/upgrading-eslint-from-v8-to-v9-in-vue-js/). Also referenced main GitLab repo's migration here.

Why?

  • Flat config consolidates all eslint related configuration into one file. Easier for maintenance.
  • We have not been upgrading Eslint and now with the new Eslint, we have to use the flat configuration as well.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. Run make lint-frontend. Make sure there are no console errors.
  3. Make sure we can build local environment normally and also confirm there are no console errors on the website inspect.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #146 (closed)

Edited by Hiru Fernando

Merge request reports

Loading