import-js/eslint-plugin-import

Check for importing named exports from CJS module

開放

#928 建立於 2017年9月15日

 (8 則留言) (2 個反應) (0 位負責人)JavaScript (1,549 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (5,940 顆星)
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';

貢獻者指南