fix(cli): reject file-only options with --stdin - #170
Merged
Conversation
This was referenced Aug 22, 2026
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.
Closes #169
改动
--threads、--max-file-size与--stdin同时出现时拒绝,不再静默接受无效参数:单个冲突:
两个同时出现,一次聚合:
细节:
CONFLICTING_INPUT错误码,检查放在 action 前段(配置加载、stdin 读取之前),冲突命令零副作用--threads abc现在报冲突而不是 INVALID_THREADS——参数根本不会使用,值校验已无意义--config、--fix、--dev、--suppress-warnings测试(新增 3 个,更新 2 个)
新增:
--stdin --threads abc→ 冲突消息(且断言不是 INVALID_THREADS)--stdin --max-file-size 5mb→ 单项冲突更新
threads-validation.spec.ts两个用例:它们锁定的正是本 PR 有意移除的旧契约(stdin 下走数值校验 / auto 跳过校验)。验证
npm run typechecknpm test -- --runInBand--stdin --fix --suppress-warnings)