xojs / eslint-config-xo-typescript

ESLint shareable config for TypeScript to be used with eslint-config-xo
MIT License
171 stars 25 forks source link

Allow pascal-case in `.tsx` files #50

Closed younho9 closed 2 years ago

younho9 commented 2 years ago

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 commented 2 years ago

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.