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

Allow pascal-case in .tsx files #50

Conversation

younho9
Copy link
Contributor

@younho9 younho9 commented Jan 3, 2022

Added override of @typescript-eslint/naming-convention rule for the tsx file.

When the rule was overridden, the internal options are not merged, so I just copied above rule.

I considered the detailed choices to allow the PascalCase for a while, but the component function could be used anywhere, I just added StrictPascalCase to origin rule.

If there is another opinion, I will reflect it in the PR.

resolve #48

@sindresorhus
Copy link
Member

Instead of copying, can you extract the whole object to a function at the top-level that returns it when called, and then use it in both, but modify it in the .tsx one.

@sindresorhus sindresorhus changed the title Allow StrictPascalCase in tsx Allow pascal-case in .tsx files Jan 6, 2022
@sindresorhus sindresorhus merged commit 1105aa8 into xojs:main Jan 6, 2022
@younho9 younho9 deleted the feat/override-typescript-eslint-naming-convention-in-tsx branch January 11, 2022 13:48
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 this pull request may close these issues.

Allow PascalCase to React Component in @typescript-eslint/naming-convention rule
2 participants