Skip to content

feat: add require-comment and require-directive-reset rules - #154

Open
Goodwine wants to merge 1 commit into
lingui:mainfrom
Goodwine:require-comment-and-balance-directives
Open

Goodwine wants to merge 1 commit into
lingui:mainfrom
Goodwine:require-comment-and-balance-directives

Conversation

@Goodwine

Copy link
Copy Markdown
Contributor
  • require-comment enforces adding a "comment" for translators. Adds an option to consider "context" as an alternative, and a pattern to ignore.
  • require-directive-reset keeps the scope of a directive explicit by enforcing all directives are balanced and explicitly reset.

Neither rule is part of the recommended config.

Closes #152

- `require-comment` enforces adding a "comment" for translators. Adds an option to consider "context" as an alternative, and a pattern to ignore.
- `require-directive-reset` keeps the scope of a directive explicit by enforcing all directives are balanced and explicitly reset.

Neither rule is part of the `recommended` config.

Closes lingui#152
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (4a3272b) to head (a9dbc2c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
+ Coverage   98.36%   98.62%   +0.26%     
==========================================
  Files          15       18       +3     
  Lines         732      871     +139     
  Branches      241      296      +55     
==========================================
+ Hits          720      859     +139     
  Misses         12       12              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Lint Idea: Require "comment" on all messages

1 participant