import-js/eslint-plugin-import

Check for importing named exports from CJS module

Open

#928 aperta il 15 set 2017

Vedi su GitHub
 (8 commenti) (2 reazioni) (0 assegnatari)JavaScript (1540 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (4946 star)
Metriche merge PR
 (Merge medio 138g 22h) (3 PR mergiate in 30 g)

Descrizione

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';

Guida contributor