import-js/eslint-plugin-import

Check for importing named exports from CJS module

Open

#928 创建于 2017年9月15日

在 GitHub 查看
 (8 评论) (2 反应) (0 负责人)JavaScript (1,540 fork)batch import
enhancementhelp wanted

仓库指标

Star
 (4,946 star)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

With the new node.js 8.5 ESM support importing CJS modules as if they had named exports is not supported. (Unlike Babel)

Eg:

// bad
import { get } from 'lodash';

//good
import _ from 'lodash';
const get = _.get;

//good
import { get } from 'lodash-es';

贡献者指南