scratch-paint's npm test does not run lint, so CI never lints paint; one lint error is currently in develop
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- eslint, javascript, node.js
Research direction
Start with packages/scratch-paint/package.json and .github/actions/test-package/action.yml to confirm how package tests run in CI. Run npm run lint in packages/scratch-paint and fix the reported chained-call error in src/containers/paper-canvas.jsx:236. Then set the package's test script to run lint before unit tests; done means npm test runs both successfully.
Written by the indexing model from the issue text.
Description
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
- Clone
scratch-editor, check outdevelop, runnpm cifrom the repo root. cd packages/scratch-paint.- Run
npm test: lint does not run. - Run
npm run lint: see thenewline-per-chained-callerror inpaper-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.jsxerror are not platform-specific. scratch-editordevelopat 7b5559d29 (v15.3.0), freshnpm 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.
- Dominant language
- JavaScript
- Stars
- 310
- Forks
- 299
- Avg merge
- 19h 41m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scratchfoundation/scratch-editor
-
spork
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
scratchfoundation/scratch-editor#646 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
scratchfoundation/scratch-editor#406 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
scratchfoundation/scratch-editor#750 · 1 comment ·
Maintainers usually reply within 1 day
-
Monitor context menus shrink the EditorPossibly taken @mxmou claimed this 3 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 50/100
scratchfoundation/scratch-editor#744 · 6 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Large SVG costumes exhaust memory during playback on low-RAM devices — no texture budget or warningOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
scratchfoundation/scratch-editor#722 ·
Maintainers usually reply within 1 day
All issues in scratchfoundation/scratch-editor
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 96/100
google/site-kit-wp#14102 ·
Maintainers usually reply within 2 days
-
area:growth priority:P1 type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
tecnologiasantos/bogoboom#66 ·
Maintainers usually reply within 1 day
-
desktop docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
npm/write-file-atomic#245 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ktwu01/benchmark-radar#1181 ·
Maintainers usually reply within 1 day