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 imports and disable consistent-generic-constructors #162

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

m-akinc
Copy link
Contributor

@m-akinc m-akinc commented Feb 10, 2025

Found two rules causing new, unwanted violations in the Nimble repo:

  • @typescript-eslint/consistent-generic-constructors results in code like this:

    private readonly hiddenOptions: Set<ListOption> = new Set();
    

    reporting violations like "The generic type arguments should be specified as part of the constructor type arguments". I had tried to disable this in the prior PR, but was doing so from the wrong config.

  • @typescript-eslint/naming-convention now covers imported namespaces (e.g. import * as Foo from '../foo'), and it defaults to allowing both camel and pascal case. However, because we are configuring the 'default' selector (which matches anything not otherwise specified) to only allow camel case, it was disallowing pascal case for those imported namespaces.

@jattasNI
Copy link
Collaborator

@rajsite @TrevorKarjanis bypassing you on this one since it's fairly minor bug-level config changes but feel free to leave feedback after the PR completes and Mert can address it in a follow-up.

@jattasNI jattasNI merged commit 0376138 into ni:main Feb 10, 2025
1 check passed
@m-akinc m-akinc deleted the allow-pascal-imports branch February 10, 2025 23:12
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.

2 participants