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

linter: false positive in no-this-before-super #3668

Closed
rzvxa opened this issue Jun 14, 2024 · 0 comments · Fixed by #3671
Closed

linter: false positive in no-this-before-super #3668

rzvxa opened this issue Jun 14, 2024 · 0 comments · Fixed by #3671
Assignees
Labels
C-bug Category - Bug

Comments

@rzvxa
Copy link
Collaborator

rzvxa commented Jun 14, 2024

https://github.com/rzvxa/oxlint-ecosystem-ci/actions/runs/9511509383/job/26217870705#step:5:66

eg:

function f() {
    try {
        return a();
    }
    catch (err) {
        throw new class CustomError extends Error {
            constructor() {
                super(err);
            }
        };
    }
    finally {
        this.b();
    }
}
@rzvxa rzvxa added the C-bug Category - Bug label Jun 14, 2024
@rzvxa rzvxa self-assigned this Jun 14, 2024
Boshen pushed a commit that referenced this issue Jun 14, 2024
…3671)

closes #3668

[oxlint-ecosystem-ci](https://github.com/rzvxa/oxlint-ecosystem-ci/actions/runs/9512489987/job/26220576138)

For this code:

```js
function f() {
    try {
        return a();
    }
    catch (err) {
        throw new class CustomError extends Error {
            constructor() {
                super(err);
            }
        };
    }
    finally {
        this.b();
    }
}

```

We went from this:
![image](https://github.com/oxc-project/oxc/assets/3788964/bcb751aa-50cf-4c0a-8975-e01697ff78b2)

To this:
![Screenshot 2024-06-14 110805](https://github.com/oxc-project/oxc/assets/3788964/03a03525-5326-47b1-8d6c-69720f7f3149)
@rzvxa rzvxa closed this as completed Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant