import-js/eslint-plugin-import
Check for importing named exports from CJS module
Open
#928 opened on Sep 15, 2017
enhancementhelp wanted
Repository metrics
- Stars
- (5,940 stars)
- PR merge metrics
- (PR metrics pending)
Description
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';