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

[Tech Debt]: Add react/jsx-curly-brace-presence eslint rule #1953

Closed
DaoDaoNoCode opened this issue Oct 11, 2023 · 0 comments · Fixed by #2234
Closed

[Tech Debt]: Add react/jsx-curly-brace-presence eslint rule #1953

DaoDaoNoCode opened this issue Oct 11, 2023 · 0 comments · Fixed by #2234
Assignees
Labels
infrastructure Anything non feature/* related that improves general working of the Dashboard kind/tech-debt A technical debt item for the development team. E.g. Refactors / Tests / etc

Comments

@DaoDaoNoCode
Copy link
Member

Type

General Tech Debt (eg. Improve the way something exists today)

Source

No response

Description

Currently, in our code, we can see different ways of passing a string to component props or children.
For example, we can see:

<Component testString="test" />

vs

<Component testString={`test`} />

or

<Component testString={"test"} />

For component children, we can see:

<Button>Submit</Button>

vs

<Button>{"Submit"}</Button>

Which are really inconsistent. We should look into using https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md to make it consistent. My suggestion is we should get rid of all the curly braces and quotes when it's unnecessary.

Why?

Make the code style more consistent.

Anything else?

No response

@DaoDaoNoCode DaoDaoNoCode added the kind/tech-debt A technical debt item for the development team. E.g. Refactors / Tests / etc label Oct 11, 2023
@lucferbux lucferbux moved this from Untriaged to Dev To do in ODH Dashboard Planning Oct 16, 2023
@lucferbux lucferbux moved this from Dev To do to Untriaged in ODH Dashboard Planning Oct 16, 2023
@lucferbux lucferbux added the infrastructure Anything non feature/* related that improves general working of the Dashboard label Oct 16, 2023
@lucferbux lucferbux moved this from Untriaged to Dev To do in ODH Dashboard Planning Oct 16, 2023
@manaswinidas manaswinidas self-assigned this Nov 28, 2023
@manaswinidas manaswinidas moved this from Dev To do to Dev In progress in ODH Dashboard Planning Nov 28, 2023
@github-project-automation github-project-automation bot moved this from Dev In progress to Done in ODH Dashboard Planning Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Anything non feature/* related that improves general working of the Dashboard kind/tech-debt A technical debt item for the development team. E.g. Refactors / Tests / etc
Projects
Status: Done
Status: No status
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants