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

Disable rule for react-router-dom <Route/> element. #67

Open
JesusJimenezC opened this issue May 19, 2024 · 0 comments · May be fixed by #74
Open

Disable rule for react-router-dom <Route/> element. #67

JesusJimenezC opened this issue May 19, 2024 · 0 comments · May be fixed by #74

Comments

@JesusJimenezC
Copy link

I've been having problems with the Route component of react-router-dom. I saw a couple of comments on Reddit and some internet forums about a way to solve the warning/error that the jsx-no-jsx-as-prop rule throws, but honestly, it makes the code too complicated just to not get that error. It would be a good idea to ignore this component, since to keep a cleaner code, at least in this case this rule does not help much. Maybe it would be even better to have a function that gives us the possibility to put something like:

{
ignoreList: [“Route”],
}

I am not an expert, but I think that something like this would work better, since I don't know if there are other components out there that need something like this and instead of helping it would hurt the developer, but disabling this rule is not an option, because it is very useful in most cases.

image

@huynhducduy huynhducduy linked a pull request Nov 30, 2024 that will close this issue
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 a pull request may close this issue.

1 participant