import-js/eslint-plugin-import

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

Open

#759 opened on Mar 1, 2017

View on GitHub
 (3 comments) (1 reaction) (0 assignees)JavaScript (4,946 stars) (1,540 forks)batch import
bughelp wanted

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