pnpm run lint does not lint the e2e tests

未关闭 适合新手
#293 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
eslint, typescript
领域
testing, tooling

调研方向

从 package.json 中的 lint 脚本和 e2e/cli-publish.test.ts:109 开始;运行报告中的 ESLint 命令,确认现有错误。检查 libs/ 中的包如何组织其 e2e/ 文件夹,然后扩大 lint 覆盖范围并修复报告的非空断言。完成标准是 pnpm run lint 检查根目录和库中的端到端测试并通过。

由索引模型根据 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 小时
30 天内合并 PR
17

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NanoForge-dev/CLI 的其他 Issue

查看 NanoForge-dev/CLI 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。