import-js/eslint-plugin-import

Check for importing named exports from CJS module

Open

#928 aberto em 15 de set. de 2017

Ver no GitHub
 (8 comments) (2 reactions) (0 assignees)JavaScript (1.540 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (4.946 stars)
Métricas de merge de PR
 (Mesclagem média 138d 22h) (3 fundiu PRs em 30d)

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

Guia do colaborador