Skip to content

Conversation

@MariaSolOs
Copy link
Contributor

Follow-up from #20.

rules: {
"react-prefer-function-component/prefer-function-component": "error",
"react-prefer-function-component/react-prefer-function-component":
"error",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to split this into 2 lines to make Prettier happy.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm not seeing this when I run pnpm prettier --write packages/eslint-plugin-react-prefer-function-component/src/config.mts. The repo's lint check should pick up any issues too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't include it initially but that caused the CI Prettier check to fail.

Copy link
Contributor Author

@MariaSolOs MariaSolOs Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming!

Copy link
Contributor Author

@MariaSolOs MariaSolOs Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tatethurston because the name uses in the plugin’s rules property doesn’t match what the config references here. Just try linting using the “flat config” example from this repo and you’ll see the error.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thank you — I totally missed the prefix change and thought this was only a white space change.

I’m going to add a test case for this and I’ll cut a new release this evening.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! Sorry for missing this in my previous PR.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all -- that was a testing gap. I've added a CI check for this. There is probably a more ergonomic solution, but it seems good enough for now:

#25

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published v4.0.1 with your fix

@tatethurston
Copy link
Owner

tatethurston commented Mar 19, 2025

I should have the codecov issue fixed now so CI will pass for forked repo PRs. That will just require pulling in main

@MariaSolOs
Copy link
Contributor Author

I should have the codecov issue fixed now so CI will pass for forked repo PRs. That will just require pulling in main

Yep, rebasing now. I'll also undo the Prettier change and see if it fails again.

@codecov
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5c2f5c8) to head (f2b0592).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           31        31           
  Branches        11        11           
=========================================
  Hits            31        31           

☔ 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.

@tatethurston tatethurston merged commit 1521e1a into tatethurston:main Mar 19, 2025
5 checks passed
@MariaSolOs MariaSolOs deleted the rule-name-again branch March 19, 2025 03:43
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.

2 participants