pnpm run lint does not lint the e2e tests

オープン 初心者向け
#293 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
eslint, typescript
領域
testing, tooling

調査の方向性

package.json の lint スクリプトと e2e/cli-publish.test.ts:109 から始め、報告された ESLint コマンドを実行して既存のエラーを確認します。libs/ のパッケージが e2e/ フォルダーをどのように構成しているかを確認し、lint の対象範囲を広げて、報告された non-null アサーションを修正します。pnpm run lint がルートとライブラリの end-to-end テストをチェックし、成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Which package is this bug report for?

@nanoforge-dev/cli

Which command is this bug report for?

other

Issue description

pnpm run lint runs eslint on src only (package.json#L47: prettier --check . && eslint --format=pretty src), so e2e/ is never linted. It already holds lint errors:

pnpm exec eslint e2e/cli-publish.test.ts
  109:12  error  Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion

(cli-publish.test.ts#L109, reported twice on that line.) Found while reviewing the Windows test fixes (#274).

Expected: the lint script covers e2e/ (and the libs' e2e/ folders), and the existing errors are fixed.

Code sample
// e2e/cli-publish.test.ts:109 (main)
expect(put!.files!.sort()).toEqual(["index.ts", "nanoforge.manifest.json", "src/player.ts"]);
Versions
  • @nanoforge-dev/cli main (e95b881)
  • Node.js 26, Linux
Issue priority

Low (slightly annoying)

I have tested this issue on a development release

e95b881

主要言語
TypeScript
スター
2
フォーク
2
平均マージ
2日 18時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NanoForge-dev/CLI のほかの issue

NanoForge-dev/CLI の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。