Repository navigation
Fix/paint test script lint - #755
Open
jonathanmendoza-tx wants to merge 2 commits into
Open
jonathanmendoza-tx wants to merge 2 commits into
jonathanmendoza-tx wants to merge 2 commits into
Conversation
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
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves
#754
Proposed Changes
packages/scratch-paint/package.json: thetestscript changes fromnpm run unittonpm 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.thenstarts on its own line. The callback body is re-indented by 4 spaces as@stylistic/indentthen requires. Apart from the added line break the change is whitespace only;git diff -wshows just the split. The promise chain and the.catchare unchanged.Reason for Changes
In the standalone scratch-paint repository,
testwasnpm run lint && npm run unituntil commit 433c0ae (2023-10-17, "ci: update package.json and package-lock"). That commit trimmed it tonpm run unitwhile that repository'sdeploy.ymlrannpm run lintas its own step. In this monorepo, CI runs onlynpm run testper package, so paint's lint stopped running and one lint error reacheddevelopunnoticed (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 newtestscript 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:npm run lintreported exactly 1 error (236:63), andnpm testdid not run lint.npm run lintreports 0 errors (193 warnings, which were already there, mostlyjsdoc/valid-types), andnpm testruns lint and then Jest, exiting 0 with 14 suites and 64 tests passing.CI will now lint paint.