reactjs / reactjs/react.dev

ESLint v9 Migration Discussion

Offen
#8,261 0 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
11.8k
Forks
7.9k
Ø Merge
1 T. 11 Std.
Gemergte PRs (30 T.)
11

Beschreibung

Hi!

I'd like to get your thoughts on migrating to ESLint v9.

Currently, react.dev uses ESLint 7.x, which reached end-of-life in 2024. It's not causing immediate problems, but it's becoming a limitation for adopting new linting tools going forward.

For example, ko.react.dev introduced eslint-markdown to help maintain translation quality in markdown docs. However, these newer plugins only support ESLint 9's flat config. So right now, ko.react.dev is in an awkward situation where it uses ESLint 7 as the base, but has to run npx eslint@9 separately just for markdown linting:

"textlint-lint": "yarn textlint ... && npx --yes eslint@9 -c eslint.config.mjs"

When translation projects try to add more lint rules to improve documentation quality, ESLint 7 becomes a bottleneck. Official ESLint plugins like @eslint/markdown and @eslint/json are all flat config only.

This came up recently in a ko.react.dev discussion (reactjs/ko.react.dev#1406), where a maintainer mentioned:

"If you want CI/CD integration and improvements in this area, please submit an ESLint v9 migration PR to the react.dev repository first, so we can pull it in later."

They also noted that maintaining ESLint 7, ESLint 9, and Textlint together is becoming difficult, and an upstream migration would help simplify things for translation projects.

Also, some dependencies like babel-eslint and eslint-config-react-app are already deprecated and not even being used, so they'll need to be cleaned up at some point anyway.

Of course, this change would also affect other translation repositories, so I understand it needs careful consideration.

What do you think about upgrading to ESLint v9? If you're open to the idea, we might be able to help with the migration work.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Der Issue erwähnt das ESLint-7.x-Setup von react.dev, den eslint.config.mjs-Einstiegspunkt von ko.react.dev und das Skript textlint-lint, aber keine Dateien oder Tests von react.dev. Beginne damit, die ESLint-Abhängigkeiten und Lint-Skripte des Repositorys zu finden, und definiere anschließend den Umfang der Migration sowie die erforderliche Validierung für Übersetzungs-Repositories vor der Implementierung.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
documentation, tooling
Issue-Typ
Refactoring
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
28/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.