import-js/eslint-plugin-import

Support for checking `require.resolve()`

Open

#585 aberto em 25 de set. de 2016

Ver no GitHub
 (2 comments) (5 reactions) (0 assignees)JavaScript (1.540 forks)batch import
acceptedenhancementhelp 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

Sometimes I use require.resolve() just to resolve paths to other resources than javascript modules.

Okay, this is not a regular import, but it would be nice if this plugin could also check these paths.

Maybe it could be a new setting like 'import/check-require-resolve': true, whereas various rules related to CommonJS imports also apply here.

Guia do colaborador