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

[generic-type-naming] conflict with [camelcase] #913

Closed
klmdb opened this issue Aug 28, 2019 · 2 comments · Fixed by #925
Closed

[generic-type-naming] conflict with [camelcase] #913

klmdb opened this issue Aug 28, 2019 · 2 comments · Fixed by #925
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule good first issue Good for newcomers has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@klmdb
Copy link

klmdb commented Aug 28, 2019

I am trying to configure the [generic-type-naming] rule as follows:

"@typescript-eslint/generic-type-naming": ["warn", "^T(_([A-Z][a-z]*)+)?$"],

This is in conflict with the [camelcase] eslint rule. Would it be possible to overide its behavior for generic identifiers when the [generic-type-naming] rule is configured? Or would it be possible to configure the [camelcase] rule to ignore generic identifiers?

@bradzacher bradzacher added enhancement: plugin rule option New rule option for an existing eslint-plugin rule package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin good first issue Good for newcomers labels Aug 28, 2019
@a-tarasyuk
Copy link
Contributor

@bradzacher how should be named the new option for camelcase to ignore generic identifiers?

@bradzacher
Copy link
Member

looking at the options in the current rule, there's one for "properties": 'always' | 'never'.

I would probably just go with "generic-type": 'always' | 'never', and default it to "always" so it's not a breaking change.

@bradzacher bradzacher added the has pr there is a PR raised to close this label Aug 30, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule good first issue Good for newcomers has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants