import-js/eslint-plugin-import

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

开放

#759 创建于 2017年3月1日

 (3 条评论) (1 个反应) (0 位负责人)JavaScript (1,549 个派生)batch import
bughelp wanted

仓库指标

星标
 (5,938 个星标)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

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

贡献者指南