Skip to content

💅 Plugins can't analyze named imports #6571

Description

@tajo

Environment information

Tested with Biome `2.0.5` but created a reproduction directly in this project. PR attached.

Rule name

Grit plugin

Playground link

#6570

Expected result

It's seems to be impossible to write a matching Grit pattern in Biome to target specific named import (works with the Grit CLI):

import { a, b, c, ButtonLink, Text } from 'geist/components';

We want to match ButtonLink coming from this specific package.

`import { $imports } from "geist/components"` where {
  $imports <: contains `ButtonLink`
  // doesn't work either
  // $imports <: r".*ButtonLink.*"
}

I created a failing test case in this repo: #6570

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

S-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions