Skip to content

feat: add rule for 'kill two birds with one stone' idiom#131

Open
LarytheLord wants to merge 3 commits intoretextjs:mainfrom
LarytheLord:feat/add-kill-two-birds-idiom-rule
Open

feat: add rule for 'kill two birds with one stone' idiom#131
LarytheLord wants to merge 3 commits intoretextjs:mainfrom
LarytheLord:feat/add-kill-two-birds-idiom-rule

Conversation

@LarytheLord
Copy link

@LarytheLord LarytheLord commented Feb 25, 2026

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything or linked relevant results below
  • I made sure the docs are up to date
  • I included tests (or that’s not needed)

Description of changes

Add one new misc rule for the idiom kill two birds with one stone.

  • New considerate suggestions:
    • solve two problems at once
    • achieve two goals at once
  • Added a regression test in test.js
  • Regenerated rules.md (new rule table row)

Validation:

  • npm run generate
  • node --conditions development test.js

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Feb 25, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Feb 25, 2026
@LarytheLord
Copy link
Author

Pushed one more follow-up commit: 7aa458a.\n\nI narrowed the coverage tooling pin to c8 7.3.0 (which uses yargs 15) to avoid the Node 25 ESM/CJS runtime break seen in CI. Local validation still passes with npm test.

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2a925cd) to head (7aa458a).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main      #131     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files            3         1      -2     
  Lines         6025       315   -5710     
===========================================
- Hits          6025       315   -5710     

☔ View full report in Codecov by Sentry.
📢 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.

@stuckvgn
Copy link

Leaving a note here since this PR and #130 are closely related — both address issues that are blocking speciesism language pattern support from getting merged.

#130 adds the actual speciesism pattern data (data/en/speciesism.yml) and I just pushed a fix there for the file: '' assertion mismatch in test.js (a Node compat issue pre-existing on main).

The c8/Node 25 fix you've made here would also need to be applied to the #130 branch. If it's easier, these could potentially be combined into one PR. Either way, cross-linking for reviewer visibility — both touch the same CI infrastructure and both are part of the same effort to expand the pattern set.

For what it's worth, this kind of speciesism language guidance is gaining traction: webpack just merged similar rules to their Vale linting config on Feb 25, 2026 (webpack/webpack.js.org#7880). Having it in retext-equality means it propagates automatically to alex and any downstream tool that uses this package.

@LarytheLord
Copy link
Author

Thanks for cross-linking this. Agreed these are related efforts.\n\nI’ve kept this PR scoped to the idiom rule + CI compatibility update on this branch; #130 can apply the same c8 pin strategy if that branch still hits the Node 25 runtime mismatch.\n\nIf maintainers prefer, I can also split out the CI pin into a tiny dedicated PR for easier reuse/cherry-pick across both branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤞 phase/open Post is being triaged manually

Development

Successfully merging this pull request may close these issues.

2 participants