Skip to content

refactor(cli): centralize lint failure decision - #133

Merged
luojiyin1987 merged 1 commit into
masterfrom
agent/centralize-lint-failure-decision
Aug 9, 2026
Merged

refactor(cli): centralize lint failure decision#133
luojiyin1987 merged 1 commit into
masterfrom
agent/centralize-lint-failure-decision

Conversation

@luojiyin1987

Copy link
Copy Markdown
Contributor

Summary

  • Add the pure shouldFailLint function.
  • Use one failure policy for stdin and file lint.
  • Keep errors and rule failures fatal.
  • Suppress warnings only when the option is active.

Part of #131.

Tests

The policy test covers all 16 input combinations. It varies errors, warnings, rule failures, and warning suppression.

Validation

  • npm run lint
  • npm test -- --runInBand
  • npm run test:package

All 183 tests pass.

@luojiyin1987
luojiyin1987 marked this pull request as ready for review August 9, 2026 16:36
@luojiyin1987
luojiyin1987 merged commit 04b1443 into master Aug 9, 2026
6 checks passed
@luojiyin1987
luojiyin1987 deleted the agent/centralize-lint-failure-decision branch August 9, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant