scratch-paint's npm test does not run lint, so CI never lints paint; one lint error is currently in develop

Abierto Apto para principiantes
#754 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@jonathanmendoza-tx ya está trabajando en esto.

Desde el 7/11/2026.

  • #755 de @jonathanmendoza-tx — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
86/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
eslint, javascript, node.js
Área
ci-cd, testing

Línea de trabajo

Empieza por packages/scratch-paint/package.json y .github/actions/test-package/action.yml para confirmar cómo se ejecutan las pruebas del paquete en CI. Ejecuta npm run lint en packages/scratch-paint y corrige el error notificado en la llamada encadenada de src/containers/paper-canvas.jsx:236. Después, configura el script test del paquete para que ejecute lint antes de las pruebas unitarias; el trabajo estará hecho cuando npm test ejecute ambos correctamente.

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

Descripción

Expected Behavior

npm test in packages/scratch-paint runs lint and then the unit tests, like every other package in the monorepo, so that CI (which runs npm run test per package) catches lint errors in paint.

Actual Behavior

packages/scratch-paint/package.json has

"lint": "eslint",
"test": "npm run unit",

so npm test runs only Jest. .github/actions/test-package/action.yml runs npm run test, so paint is the only package whose lint never runs in CI.

How it got this way: in the standalone scratch-paint repo, test was npm run lint && npm run unit until commit 433c0ae45f (2023-10-17, "ci: update package.json and package-lock"), which trimmed it to npm run unit at the same time as a deploy.yml change. That made sense while paint had its own workflow; after the monorepo import, where CI only runs each package's npm run test, the lint step silently disappeared.

As a result there is a lint error in develop today that CI did not catch. npm run lint in packages/scratch-paint reports:

src/containers/paper-canvas.jsx
  236:63  error  Expected line break before `.then`  @stylistic/newline-per-chained-call

The line is

getPaperSandbox().then(sandbox => sandbox.send({svg})).then(result => {

Steps to Reproduce

  1. Clone scratch-editor, check out develop, run npm ci from the repo root.
  2. cd packages/scratch-paint.
  3. Run npm test: lint does not run.
  4. Run npm run lint: see the newline-per-chained-call error in paper-canvas.jsx:236.

System Details

  • Observed on Windows 10 Pro 22H2 (build 19045), Node v24.21.0, npm 12.0.2; the missing lint step and the paper-canvas.jsx error are not platform-specific.
  • scratch-editor develop at 7b5559d29 (v15.3.0), fresh npm ci

Notes

Suggested fix in two steps so each commit stays small: first fix the one chained-call line, then change paint's test script to npm run lint && npm run unit. Neither changes published code.

Lenguaje dominante
JavaScript
Estrellas
310
Forks
299
Merge medio
19 h 41 min
PR fusionados (30 d)
14

Preparar el entorno

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.

Más de scratchfoundation/scratch-editor

Todos los issues de scratchfoundation/scratch-editor

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.