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

🐛 false positive noInvalidConstructorSuper #4499

Closed
1 task done
sonnyp opened this issue May 17, 2023 · 1 comment · Fixed by #4501
Closed
1 task done

🐛 false positive noInvalidConstructorSuper #4499

sonnyp opened this issue May 17, 2023 · 1 comment · Fixed by #4501
Assignees
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@sonnyp
Copy link

sonnyp commented May 17, 2023

I think it's a regression in 12.1

Environment information

Rome 12.1.0
https://github.com/sonnyp/Workbench/

{
  "formatter": {
    "enabled": true,
    "ignore": [
      "src/icon-development-kit.json",
      "icon-development-kit-www",
      "src/lib",
      "troll"
    ],
    "indentStyle": "space",
    "indentSize": 2
  },
  "linter": {
    "enabled": true,
    "ignore": [
      "src/icon-development-kit.json",
      "icon-development-kit-www",
      "src/lib",
      "troll"
    ],
    "rules": {
      "recommended": true,
      "style": {
        "useBlockStatements": "off",
        "noParameterAssign": "off"
      }
    }
  },
  "vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
  }
}

What happened?

The rule lint/correctness/noInvalidConstructorSuper triggers when extending an object property, for example:

// KO 
class CodeView extends Gtk.Widget {
  constructor() {
    console.log('cool');
    super(); // This class calls super(), but the class extends from a non-constructor.
  }
}
// OK (removed the dot in Gtk.Widget)
class CodeView extends GtkWidget {
  constructor() {
    console.log('cool');
    super();
  }
}

Expected result

Extending an object property shouldn't trigger noInvalidConstructorSuper

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 May 17, 2023
@Conaclos Conaclos self-assigned this May 17, 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 May 17, 2023
@sonnyp
Copy link
Author

sonnyp commented May 17, 2023

Merci!

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

Successfully merging a pull request may close this issue.

2 participants