import-js/eslint-plugin-import

`import/no-unresolved` ignores require statements with backticks

Open

#1,575 创建于 2019年12月19日

在 GitHub 查看
 (0 评论) (1 反应) (0 负责人)JavaScript (1,540 fork)batch import
bughelp wanted

仓库指标

Star
 (4,946 star)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

First of all, thanks for this plugin! It's great!

We're using the backtick option with the quotes rule in our codebase. About a week ago, we realized that our linter wasn't catching bad imports. After scratching our heads for a bit, we realized that import/no-unresolved doesn't check require statements that use backticks.

// index.js
// Assume a, b, and c do not exist

// Does not result in a linting error
const sweetPotato = require(`a`);

// Shows linting error
const biscuit = require("b");

// Shows linting error
import babyYoda from "c";

贡献者指南