feat(rules-nlp): add no-superlative-claims rule - #23
Conversation
Co-Authored-By: Codex <noreply@openai.com>
…aims # Conflicts: # packages/rules-nlp/test/rules.test.mjs
|
|
||
| const DEFAULT_PHRASES = [ | ||
| 'best', | ||
| 'leading', |
There was a problem hiding this comment.
industry-leading currently produces two diagnostics because leading is also a default phrase and \b treats the hyphen as a boundary. Local repro after build: This is industry-leading support. reports both industry-leading and nested leading. Please add coverage for this and suppress overlapping matches, or sort by phrase length and skip ranges already claimed, so the longer phrase wins.
Peyton-Spencer
left a comment
There was a problem hiding this comment.
Non-author review on head 52a9f96652b95433c2cd4e018975f91ff11407c1.
I found one blocking issue: industry-leading currently emits overlapping diagnostics for both the full phrase and nested leading, because hyphens create word boundaries. I left an inline comment with a local repro and suggested either overlap suppression or longest-phrase-first range claiming.
Verified locally:
CI=true bunx pnpm@9.15.9 --filter @faircopy/rules-nlp testpasses, 37/37- Additional local repro shows duplicate diagnostics for
This is industry-leading support.
Co-Authored-By: Codex <noreply@openai.com>
Peyton-Spencer
left a comment
There was a problem hiding this comment.
Non-author re-review on updated head ccb25650cf31a70548037a8d2d1832dff5c945a9.
The overlapping-diagnostic blocker is resolved. The rule now evaluates longer phrases first and skips overlapping shorter matches, and the new regression covers industry-leading producing a single diagnostic rather than a nested leading hit.
Verified:
CI=true bunx pnpm@9.15.9 --filter @faircopy/rules-nlp testpasses, 38/38- Local repro for
This is industry-leading support.now returns one diagnostic forindustry-leading - GitHub CI: pass
- Merge state:
CLEAN
No remaining blocking findings.
# [1.14.0](v1.13.0...v1.14.0) (2026-05-11) ### Features * **rules-nlp:** add no-superlative-claims rule ([#23](#23)) ([770ce91](770ce91))
|
🎉 This PR is included in version 1.14.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Summary
no-superlative-claimsto@faircopy/rules-nlppackages/rules-nlp/README.mdphrases, mid-sentence matching, substring boundaries, and registry exposureCloses #16.
Notes
best,leading,world-class,top,premier,ultimate,industry-leading,cutting-edge, andstate-of-the-arttopandleadingare configurable throughphrases, so teams can tune legitimate layout or verb usage out of the ruleorigin/mainafter PR feat(rules-nlp): add no-jargon rule #21 and PR feat(rules-nlp): add no-future-promises rule #22 landedValidation
CI=true bunx pnpm@9.15.9 --workspace-concurrency=1 buildCI=true bunx pnpm@9.15.9 --filter @faircopy/rules-nlp testCI=true bunx pnpm@9.15.9 --workspace-concurrency=1 testCI=true bunx pnpm@9.15.9 --workspace-concurrency=1 typecheck