import-js/eslint-plugin-import

`import/extensions` flagging when default package export is a json file

Offen

#759 geöffnet am 01.03.2017

 (3 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (1.549 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (5.938 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 138T 22h) (3 gemergte PRs in 30 T)

Beschreibung

I have a package with a default export of index.json instead of index.js. When I try to import this package:

import foo from 'json-package';

import/extensions complains about the lack of an extensions. This doesn't seem like desired behavior.

fyi: @ljharb

Contributor Guide