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

🐛 noUnusedVariables with class #3779

Closed
1 task done
sonnyp opened this issue Nov 17, 2022 · 1 comment · Fixed by #3861
Closed
1 task done

🐛 noUnusedVariables with class #3779

sonnyp opened this issue Nov 17, 2022 · 1 comment · Fixed by #3861
Assignees
Labels
A-Linter Area: linter L-JavaScript Langauge: JavaScript S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@sonnyp
Copy link

sonnyp commented Nov 17, 2022

Environment information

rome rage

CLI:
  Version:              10.0.1
  Color support:        true

Platform:
  CPU Architecture:     x86_64
  OS:                   linux

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 "xterm-256color"

Rome Configuration:
  Status:               loaded
  Formatter disabled:   false

rome.json

{
  "formatter": {
    "enabled": true,
    "ignore": ["./icon-development-kit-www", ".flatpak", "src/lib", "troll"],
    "indentStyle": "space",
    "indentSize": 2
  },
  "linter": {
    "enabled": true,
    "ignore": ["./icon-development-kit-www", ".flatpak", "src/lib", "troll"],
    "rules": {
      "recommended": true,
      "correctness": {
        "noUnusedVariables": "error",
        "noUselessFragments": "error"
      },
      "style": {
        "useBlockStatements": "off"
      },
    }
  }
}

reproducer.js

const Foo = hello(class Foo {})
console.log(Foo)

What happened?

image

Expected result

Rome doesn't report the Foo as unused.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@sonnyp sonnyp added the S-To triage Status: user report of a possible bug that needs to be triaged label Nov 17, 2022
@MichaReiser MichaReiser added S-Bug: confirmed Status: report has been confirmed as a valid bug A-Linter Area: linter L-JavaScript Langauge: JavaScript and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Nov 25, 2022
@MichaReiser
Copy link
Contributor

MichaReiser commented Nov 25, 2022

@xunilrj is this something you could look into. It's likely a problem that Foo incorrectly resolves to the class Foo playground

@xunilrj xunilrj self-assigned this Nov 25, 2022
@ematipico ematipico added this to the 11.0.0 milestone Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter L-JavaScript Langauge: JavaScript S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants