reactjs / reactjs/react.dev

ESLint v9 Migration Discussion

Abierto
#8,261 0 comentarios 3 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
JavaScript
Estrellas
11.8k
Forks
7.9k
Merge medio
1 d 11 h
PR fusionados (30 d)
11

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

El issue menciona la configuración de ESLint 7.x de react.dev, el punto de entrada eslint.config.mjs de ko.react.dev y el script textlint-lint, pero no menciona archivos ni pruebas de react.dev. Empieza por localizar las dependencias de ESLint y los scripts de lint del repositorio, y después define el alcance de la migración y la validación necesaria en los repositorios de traducción antes de la implementación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
documentation, tooling
Tipo de issue
Refactorización
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
28/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.