We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@typescript-eslint/naming-convention
Currently @typescript-eslint/naming-convention rule reports "react function component is not strictCamelCase."
strictCamelCase
How about add overrides for .tsx (react file extension) ?
.tsx
Maybe can override it in the following way or copy all configuration for @typescript-eslint/naming-convention
overrides: [ { files: ['**/*.tsx'], rules: { // ... '@typescript-eslint/naming-convention': [ 'error', { selector: 'function', format: ['PascalCase', 'camelCase'], }, ], }, }, ]
The text was updated successfully, but these errors were encountered:
I don't know how common this is in react, but react-table also uses object properties to specify components, so they're in PascalCase
https://react-table.tanstack.com/docs/quick-start#define-columns
So I had to append this to the config:
{ selector: ["function", "objectLiteralProperty", "objectLiteralMethod"], format: ["PascalCase", "camelCase"] }
Sorry, something went wrong.
I found variable name could be PascalCase when declare component as arrow function.
This is enforced in the xo-react rule.
{ selector: ['variable', 'function', 'objectLiteralProperty', 'objectLiteralMethod'], types: ['function'], format: ['StrictPascalCase', 'strictCamelCase'], },
In order to select more specifically, it seems necessary to add function type.
PR welcome
Successfully merging a pull request may close this issue.
Currently
@typescript-eslint/naming-convention
rule reports "react function component is notstrictCamelCase
."How about add overrides for
.tsx
(react file extension) ?Maybe can override it in the following way or copy all configuration for
@typescript-eslint/naming-convention
The text was updated successfully, but these errors were encountered: