`openedx lint` does not lint `.jsx` files
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, react, typescript
- Área
- tooling
Línea de trabajo
La corrección pertenece a los file patterns de tools/eslint/base.eslint.config.js o a createLintConfig, donde **/*.jsx debería nombrarse junto a las configuraciones de typescript-eslint. Lee tools/cli/openedx.ts para ver cómo se eliminó el manejo anterior de --ext. Verifícalo añadiendo una comprobación, como una variable no utilizada, a un archivo .jsx dentro de una app de fixture o de plantilla, y ejecutando npm run lint; ahora debería reportarla. Está terminado cuando esa comprobación se reporta y la nota de lint:fix para las apps consumidoras está incluida en el cambio.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What: openedx lint does not lint .jsx files. In an app built on createLintConfig, a .jsx file with any error passes npm run lint; the same error in a .js, .ts or .tsx file fails.
Reproduced on 2026-10-26 in fresh clones of every converted app that has .jsx files, by appending const unusedProbe = 1; to one .jsx and one .js file under src/ and running npm run lint (clean baseline before, files restored after):
| app | .jsx files |
.jsx probe |
.js probe |
|---|---|---|---|
| frontend-app-profile | 44 | not reported (src/profile/UserCertificateSummary.jsx) |
@typescript-eslint/no-unused-vars (src/utils.js) |
| frontend-app-account | 89 | not reported (src/account-settings/SwitchContent.jsx) |
reported (src/utils.js) |
| frontend-app-gradebook | 86 | not reported (src/utils/hoc.jsx) |
reported (src/utils/keyStore.js) |
| frontend-app-learner-dashboard | 130 | not reported (src/setupTest.jsx) |
reported (src/testUtils.js) |
| frontend-app-catalog | 4 | not reported (src/widgets/CatalogHeader/ProgramsLinkMenuItem.jsx) |
reported (src/setupTest.js) |
frontend-template-application and frontend-app-instructor-dashboard have no .jsx files, which is why nothing has tripped. frontend-base itself has ten (runtime/react/*.jsx) under the same base config.
Why: ESLint 9 lints .js, .cjs and .mjs by default and other extensions only when a files pattern names them. From the configuration files docs: "To lint files with extensions other than the default .js, .cjs and .mjs, include them in files with a pattern in the format of "**/*.extension". Any pattern will work except if it is * or if it ends with /* or /**." tools/eslint/base.eslint.config.js extends typescript-eslint's configs, which name **/*.ts and **/*.tsx, so TypeScript files are linted; nothing names **/*.jsx. The files: ['src/**/*', 'site.config.*'] block the template and the apps carry ends in /* and adds no extension.
It is a regression of the ESLint 9 upgrade, not a decision. Before f0c0d0db (feat: Upgrade to ESLint 9, 2025-04-23, via #39), tools/cli/openedx.ts added the extensions itself:
// If extensions haven't been specified, add them. Otherwise we don't get jsx/tsx files.
if (process.argv.indexOf('--ext') === -1) {
process.argv.push('--ext');
process.argv.push('.js,.jsx,.ts,.tsx');
}
ESLint 9 dropped --ext, the upgrade deleted the block, and the files patterns that replaced it recovered .tsx through typescript-eslint and not .jsx. No ADR, issue or PR records dropping .jsx; the upgrade's commit message only notes that "the repository wasn't linting very consistently before this".
Fix: name **/*.jsx in the base config's file patterns (or in createLintConfig), so every consumer gets it without touching its own eslint.config.js.
What the fix surfaces in the converted apps, measured the same day with a files: ['src/**/*.jsx'] block added to each app's eslint.config.js:
| app | problems | files | fixable with --fix |
left after --fix |
|---|---|---|---|---|
| profile | 77 (75 errors, 2 warnings) | 12 | 70 | 3 formatjs/enforce-description, 1 @stylistic/indent-binary-ops, 2 unused directives |
| account | 203 (192 errors, 11 warnings) | 26 | 181 | 5 no-import-assign, 2 @typescript-eslint/prefer-for-of, 11 unused directives, a few others |
| gradebook | 70 (66 errors, 4 warnings) | 17 | 27 | 28 react/display-name, 11 react/prop-types, 4 unused directives |
| learner-dashboard | 133 (128 errors, 5 warnings) | 20 | 126 | 4 react/prop-types, 5 unused directives, 2 others |
| catalog | 4 | 4 | 0 | 4 react/prop-types |
The bulk is @stylistic/indent, brace-style and semi that npm run lint:fix clears; the rest is a handful of react/prop-types and react/display-name findings per app and eslint-disable directives for rules the base config does not enable (airbnb-era react/forbid-prop-types and the like). Each app's lint goes red the day the fix ships, so the release note should say so and point at lint:fix.
[!NOTE]
This issue body was drafted by Claude (Claude Code) and reviewed before posting.
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 13
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openedx/frontend-base
-
Export `SkipLink` componentAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
openedx/frontend-base#330 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openedx/frontend-base#210 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
openedx/frontend-base#350 ·
-
External routes ignore paramsPosiblemente ocupada @arbrandes la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
openedx/frontend-base#349 · 1 asignado ·
-
A site cannot override an installed app's route for a role with an external routePosiblemente ocupada @arbrandes la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
openedx/frontend-base#348 · 1 asignado ·
Todos los issues de openedx/frontend-base
Issues similares
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openclaw/openclaw#200365 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
effort: small good first issue priority: medium testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
TMHSDigital/screencast-mcp#351 ·
Los mantenedores suelen responder en 1 día
-
area-templates triage:bot-seen triage:needs-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/aspire#22356 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Archiving an agent that is not loaded keeps its old updatedAtPosiblemente ocupada @luoph la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
content triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día