reactjs / reactjs/react.dev

ESLint v9 Migration Discussion

Ouverte
#8,261 0 commentaires 3 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
JavaScript
Étoiles
11.8k
Forks
7.9k
Merge moyen
1 j 11 h
PR mergées (30 j)
11

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

L’issue mentionne la configuration ESLint 7.x de react.dev, le point d’entrée eslint.config.mjs de ko.react.dev et le script textlint-lint, mais aucun fichier ni test de react.dev. Commencez par localiser les dépendances ESLint et les scripts de lint du dépôt, puis définissez le périmètre de la migration et la validation nécessaire dans les dépôts de traduction avant l’implémentation.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
documentation, tooling
Type d'issue
Refactorisation
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
28/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.