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

💅 useNamingConvention: allow consecutive capitals on generic parameters #2773

Closed
1 task done
kevinwolfcr opened this issue May 8, 2024 · 3 comments
Closed
1 task done

Comments

@kevinwolfcr
Copy link
Contributor

Environment information

CLI:
  Version:                      1.7.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.10.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.1.7"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Linter:
  Recommended:                  false
  All:                          true
  Rules:                        nursery/useSortedClasses = {"level":"error","options":{"attributes":["class","className","className","classList"],"functions":["clsx","cva","tw","cn"]}}

Workspace:
  Open Documents:               0

Rule name

useNamingConvention

Playground link

https://biomejs.dev/playground/?lintRules=all&code=ZgB1AG4AYwB0AGkAbwBuACAAdABlAHMAdAA8AFQAQQByAGcAPgAoAGEAcgBnADoAIABUAEEAcgBnACkAIAB7AAoAIAAgAHIAZQB0AHUAcgBuACAAYQByAGcACgB9AAoACgB0AGUAcwB0ACgAMQApAA%3D%3D

Expected result

It should not report consecutive capitals on generic parameters, since a lot of people likes using T{GenericName}.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos
Copy link
Member

Conaclos commented May 9, 2024

You can disable the strictCase option?
We are also working on implementing custom convention in #2770

@atheck
Copy link

atheck commented Jun 8, 2024

I have the same issue. Maybe when using a "match" regex the "strict" option should only check the captured part of the name, because that's what the "formats" use.

@Conaclos
Copy link
Member

Conaclos commented Jun 9, 2024

I have the same issue. Maybe when using a "match" regex the "strict" option should only check the captured part of the name, because that's what the "formats" use.

This is already the current behavior. Closing because the issue is solved.

@Conaclos Conaclos closed this as completed Jun 9, 2024
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

No branches or pull requests

3 participants