scratch-paint's npm test does not run lint, so CI never lints paint; one lint error is currently in develop
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- eslint, javascript, node.js
調査の方向性
まず packages/scratch-paint/package.json と .github/actions/test-package/action.yml を確認し、CI でパッケージのテストがどのように実行されるかを確かめます。packages/scratch-paint で npm run lint を実行し、src/containers/paper-canvas.jsx:236 で報告されたメソッドチェーンのエラーを修正します。次に、パッケージの test スクリプトでユニットテストの前に lint を実行するよう設定します。npm test が両方を正常に実行すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 310
- フォーク
- 299
- 平均マージ
- 19時間 41分
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scratchfoundation/scratch-editor のほかの issue
-
spork
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
scratchfoundation/scratch-editor#646 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
scratchfoundation/scratch-editor#406 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
scratchfoundation/scratch-editor#750 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Monitor context menus shrink the Editor対応中かも @mxmou が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
scratchfoundation/scratch-editor#744 · コメント 6 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Large SVG costumes exhaust memory during playback on low-RAM devices — no texture budget or warningオープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
scratchfoundation/scratch-editor#722 ·
メンテナーはふだん 1 日以内に返信
scratchfoundation/scratch-editor の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ImranR98/apps.obtainium.imranr.dev#2000 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
microsoft/monaco-editor#5577 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
obsidianmd/obsidian-help#1169 ·
メンテナーはふだん 2 日以内に返信
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish step対応中かも @albertteoh が今日担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
jaegertracing/jaeger-ui#4739 ·
メンテナーはふだん 1 日以内に返信