Page MenuHomePhabricator

Migrate all Wikimedia repos to use ESLint 9
Open, Needs TriagePublic

Description

Migration guide

  • Re-write LibUp to support flat file format config
  • Convert .eslintrc.json files to flat file format, eslint.config.js
  • Move .eslintignore files into ignores property of .eslintrc.json
  • ???

Event Timeline

I wonder if, instead of being blocked on a re-write of LibUp to support js config files (maybe with inspiration from https://github.com/eslint/rewrite?), we could modify LibUp to open a Phabricator task with the team if it can't finish a run due to an eslint problem?

The rewrite could still happen later.

Current blockers are at the eslint-config-wikimedia level – eslint-plugin-jest, eslint-plugin-mocha, eslint-plugin-n, and eslint-plugin-vue all still have dependencies on eslint 8 not 9 in their latest versions, and at least eslint-plugin-security doesn't seem compatible with eslint 9 and there isn't even an open Issue upstream to fix that.

At this point the migration cost is so steep we might want to just switch away from eslint. :-(

Current blockers are at the eslint-config-wikimedia level – eslint-plugin-jest, eslint-plugin-mocha, eslint-plugin-n, and eslint-plugin-vue all still have dependencies on eslint 8 not 9 in their latest versions, and at least eslint-plugin-security doesn't seem compatible with eslint 9 and there isn't even an open Issue upstream to fix that.

From my checking, all these packages have been updated to ESLint 9 (1, 2, 3, 4, 5). Can we push this forward?

FYI: eslint-config-wikimedia issue: https://github.com/wikimedia/eslint-config-wikimedia/issues/563