Skip to content

linter: jest/no-export doesn't do what it says it does #14592

@overlookmotel

Description

@overlookmotel

What version of Oxlint are you using?

1.23.0

What command did you run?

No response

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

n/a

What happened?

From Oxc's own repo:

// oxlint-disable-next-line jest/no-export
export function makeUnitsFromTest(filePath, code) {

From the docs for jest/no-export:

What it does
Prevents using exports if a file has one or more tests in it.

This file doesn't have any tests in it, so the rule shouldn't trigger, and it shouldn't be necessary to disable it.

Either:

  • Rule's implementation is not correct. or
  • Docs don't describe it correctly.

It doesn't look like there's any logic in the rule's implementation to look for describe, it etc (unless is_jest_file is meant to do that check).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions