Skip to content

import/named falsely reports import as not found (regression in 2.25) #2294

Closed
@ludofischer

Description

@ludofischer

eslint-plugin-import version: 2.25.0 and 2.25.2
eslint version: 7.32 and 8.1
Reproduction repo: https://github.com/ludofischer/eslint-plugin-import-error-demo

When using the optimize named import from the svgo 2.8 library, since 2.25 eslint-plugin-import reports

error  optimize not found in 'svgo'  import/named

while the import was correctly handled as valid in eslint-plugin-import 2.24. svgo uses CommonJS with just a main package.json field that points to this file: https://github.com/svg/svgo/blob/master/lib/svgo-node.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions