Skip to content

Fix/paint test script lint - #755

Open
jonathanmendoza-tx wants to merge 2 commits into
scratchfoundation:developfrom
jonathanmendoza-tx:fix/paint-test-script-lint
Open

jonathanmendoza-tx wants to merge 2 commits into
scratchfoundation:developfrom
jonathanmendoza-tx:fix/paint-test-script-lint

Conversation

@jonathanmendoza-tx

Copy link
Copy Markdown

Resolves

#754

Proposed Changes

  • packages/scratch-paint/package.json: the test script changes from npm run unit to npm run lint && npm run unit, matching the other packages.
  • packages/scratch-paint/src/containers/paper-canvas.jsx: the chained call at line 236, getPaperSandbox().then(sandbox => sandbox.send({svg})).then(result => {, is split so the second .then starts on its own line. The callback body is re-indented by 4 spaces as @stylistic/indent then requires. Apart from the added line break the change is whitespace only; git diff -w shows just the split. The promise chain and the .catch are unchanged.

Reason for Changes

In the standalone scratch-paint repository, test was npm run lint && npm run unit until commit 433c0ae (2023-10-17, "ci: update package.json and package-lock"). That commit trimmed it to npm run unit while that repository's deploy.yml ran npm run lint as its own step. In this monorepo, CI runs only npm run test per package, so paint's lint stopped running and one lint error reached develop unnoticed (236:63 Expected line break before .then @stylistic/newline-per-chained-call). This PR restores the lint step and fixes that one error so the new test script passes.

Test Coverage

No new test is needed; the check itself is the lint run. Verified on Windows (cmd.exe, Node 24.21.0) in packages/scratch-paint:

  • Before: npm run lint reported exactly 1 error (236:63), and npm test did not run lint.
  • After: npm run lint reports 0 errors (193 warnings, which were already there, mostly jsdoc/valid-types), and npm test runs lint and then Jest, exiting 0 with 14 suites and 64 tests passing.

CI will now lint paint.

Refs scratchfoundation#754 Matches every other package, so CI lints paint again
Refs scratchfoundation#754 Splits the second .then onto its own line; the callback body re-indents by four spaces
@jonathanmendoza-tx
jonathanmendoza-tx requested a review from a team as a code owner November 7, 2026 23:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant