Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lint): add rule noJsxPropsBind #4639

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

thecode00
Copy link

Summary

Implement react/jsx-no-bind

Test Plan

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Nov 25, 2024
Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

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

Some minor notes before you get too deep

///
pub NoBind {
version: "next",
name: "noBind",
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like we can come up with a better name than noBind. At the very least, it should mention "Jsx" since this rule should only apply to Jsx.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, I see😅.
However, I've noticed that some existing JSX rules include "jsx" in their names while others do not. Maybe need to standardize "Jsx" naming convention.

crates/biome_js_analyze/src/lint/nursery/no_bind.rs Outdated Show resolved Hide resolved
Comment on lines 29 to 34
pub NoBind {
version: "next",
name: "noBind",
language: "js",
recommended: false,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't have a rule source

@thecode00 thecode00 changed the title Implement react/jsx-no-bind feat(lint): add rule noJsxPropsBind Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants