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

🐛 noRedeclare does not report shadowed parameters by a local variable #4291

Open
1 task done
Conaclos opened this issue Mar 10, 2023 · 1 comment
Open
1 task done
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@Conaclos
Copy link
Contributor

Conaclos commented Mar 10, 2023

Environment information

CLI:
  Version:              11.0.0-nightly.846c15e
  Color support:        true

Platform:
  CPU Architecture:     x86_64
  OS:                   linux

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 "xterm-256color"
  JS_RUNTIME_VERSION:   "v18.12.0"
  JS_RUNTIME_NAME:      "node"
  NODE_PACKAGE_MANAGER: "npm/8.19.2"

Rome Configuration:
  Status:               Loaded successfully
  Formatter disabled:   false
  Linter disabled:      false

Workspace:
  Open Documents:       0

What happened?

The following code should be reported by noRedeclare:

function f(x) { var x = 5; }

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@Conaclos Conaclos added S-To triage Status: user report of a possible bug that needs to be triaged 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 Mar 10, 2023
@Conaclos
Copy link
Contributor Author

Conaclos commented Mar 10, 2023

Note: I think it is a bug related to the determination of the scope of the bindings.

@Conaclos Conaclos changed the title 🐛 noRedeclaration does not report shadowed parameters by a local variable 🐛 noRedeclare does not report shadowed parameters by a local variable Mar 27, 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

1 participant