import-js/eslint-plugin-import

import/named doesn't work when the target has no exports

Open

#1,147 opened on Jul 30, 2018

 (2 comments) (0 reactions) (0 assignees)JavaScript (1,549 forks)batch import
help wanted

Repository metrics

Stars
 (5,940 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 merged PRs in 30d)

Description

Given:

// a.js
console.log('This file has no exports')

// b.js
import { doesntExist } from './a'

I'd expect the import/named rule to show an error for doesntExist. It doesn't. What am I missing? Is there a way to check for this type of error?

Contributor guide