Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

🐛 'let' to 'const' for unused variable #4748

Closed
1 task done
buriev opened this issue Aug 1, 2023 · 1 comment
Closed
1 task done

🐛 'let' to 'const' for unused variable #4748

buriev opened this issue Aug 1, 2023 · 1 comment
Assignees
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@buriev
Copy link

buriev commented Aug 1, 2023

Environment information

> rome
> rome rage

CLI:
  Version:                      12.1.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v16.14.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.8.1"

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

Workspace:
  Open Documents:               0

What happened?

When variable unused and not redefined, let a = 1; have formatted to cons_a a = 1; instead of const a = 1;
In my VS Code settings:

...
"editor.codeActionsOnSave": {
    "quickfix.rome": true,
    "source.organizeImports.rome": true,
    "source.fixAll": true
  },
...

Expected result

Result should be const a = 1;

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@buriev buriev added the S-To triage Status: user report of a possible bug that needs to be triaged label Aug 1, 2023
@Conaclos Conaclos added S-Bug: confirmed Status: report has been confirmed as a valid bug A-Linter Area: linter and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Aug 25, 2023
@Conaclos
Copy link
Contributor

Thanks! This issue will be fixed in the up-coming release.

We solve this by disabling unsafe fixes to be applied by "quickfix.rome": true,.

@Conaclos Conaclos self-assigned this Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants