import-js/eslint-plugin-import

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

Open

#759 opened on Mar 1, 2017

 (3 comments) (1 reaction) (0 assignees)JavaScript (1,549 forks)batch import
bughelp wanted

Repository metrics

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

Description

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