Skip to content

linter: vitest/prefer-describe-function-title doesn't consider type imports #19325

@oleasteo

Description

@oleasteo

What version of Oxlint are you using?

1.46.0

What command did you run?

oxlint --type-aware --fix

What does your .oxlintrc.json config file look like?

{
  "rules": {
    "vitest/prefer-describe-function-title": "error"
  }
}

What happened?

Given

import type { Button } from "./button";

describe("Button", () => {});

This will be fixed to

import type { Button } from "./button";

describe(Button, () => {});

Which is invalid as Button is only type-imported. I think in that case, the safe way is not to change this sample at all. Or maybe better: error/suggest, but don't attempt to autofix.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions