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 same fix as the current one #664

Closed
1 task done
11Firefox11 opened this issue Nov 3, 2023 · 1 comment · Fixed by #668
Closed
1 task done

🐛 useNamingConvention same fix as the current one #664

11Firefox11 opened this issue Nov 3, 2023 · 1 comment · Fixed by #668
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@11Firefox11
Copy link

Environment information

CLI:
  Version:                      1.3.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.9.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.2.0"

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

Workspace:
  Open Documents:               0

What happened?

The fix for the useNamingConvention rule is same as the current code. For example it suggests to rename my variable fooYPosition to fooYPosition.

Run this playground and get this output:

✖ This top-level const name should be in camelCase or PascalCase or CONSTANT_CASE.
  
  > 1 │ const fooYPosition = 0;
      │       ^^^^^^^^^^^^
    2 │ 
  
  ℹ The name could be renamed to `fooYPosition`.

Expected result

Don't suggest a fix if there is no fix for it, meaning the fix is same as the current name.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Nov 3, 2023
@Conaclos
Copy link
Member

Conaclos commented Nov 3, 2023

Thanks for reporting this bug! If you want to enable consecutive uppercase characters in camel and pascal cases, you can turn off the strictCase option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants