Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const config = {
"react-prefer-function-component": plugin,
},
rules: {
"react-prefer-function-component/prefer-function-component": "error",
"react-prefer-function-component/react-prefer-function-component":
"error",
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

},
},
},
Expand Down