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

📎 Implement noNestedComponentDefinitions #4989

Open
dyc3 opened this issue Jan 28, 2025 · 9 comments
Open

📎 Implement noNestedComponentDefinitions #4989

dyc3 opened this issue Jan 28, 2025 · 9 comments
Assignees
Labels
A-Linter Area: linter good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages

Comments

@dyc3
Copy link
Contributor

dyc3 commented Jan 28, 2025

Description

Port no-nested-components from @eslint-react/eslint-plugin.

The rule sources should include @eslint-react/eslint-plugin and eslint-plugin-react-x.

Source: https://eslint-react.xyz/docs/rules/no-nested-components

Want to contribute? Lets you know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our contributing guide and analyzer contributing guide.

@dyc3 dyc3 added A-Linter Area: linter good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages labels Jan 28, 2025
@ematipico
Copy link
Member

Personal note: I thought the name of the rule was preventing the use of nested components e.g <Foo><Bar /></Foo>

Maybe the proposed name is fine. I would go for noNestedDeclaredComponents, or noNestedComponentDefinitions. They are way longer though

@dyc3
Copy link
Contributor Author

dyc3 commented Jan 28, 2025

I like noNestedComponentDefinitions

@Atishay-J
Copy link

Hi @dyc3 , I am interested in this, can you assign this to me?

@dyc3
Copy link
Contributor Author

dyc3 commented Jan 29, 2025

@Atishay-J Sure! Be sure to make your PR against the next branch.

@Atishay-J
Copy link

sure! will do

@ematipico ematipico changed the title 📎 Implement noNestedComponents 📎 Implement noNestedComponentDefinitions Jan 30, 2025
@Atishay-J
Copy link

Hi @dyc3 ,
I’m unable to continue with this due to unforeseen reasons.
Please feel free to reassign it.
Apologies for the inconvenience

@mehm8128
Copy link
Contributor

mehm8128 commented Feb 1, 2025

@ematipico @dyc3
Hi, I'm interested in this issue, could you assign it to me?
And I want to confirm one thing. It seems no-nested-components rule in ESLint even covers class component, React.createElement, and nestedComponentInProps, should we cover it?
I've never implemented new lint rule in Biome, so I'm not sure if I would be able to completely cover these cases.

@dyc3
Copy link
Contributor Author

dyc3 commented Feb 1, 2025

Yeah, we should cover those. Give it a shot! It's OK if you don't want to account for all of those cases in the first PR, you can make multiple PRs for this.

@mehm8128
Copy link
Contributor

mehm8128 commented Feb 1, 2025

OK, thank you. I'll try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

No branches or pull requests

4 participants