import-js/eslint-plugin-import

Disallow duplicate require

Open

#2,925 创建于 2023年11月18日

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

仓库指标

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

描述

I have following code :

const { addCellToRow } = require("./cell-utils.js");
const { setCellValue, findCell, createCell } = require("./cell-utils.js");

Both require are using the same path, and should thus be grouped.

I've tried to enable this in my .eslintrc :

"import/no-duplicates": ["error", {"prefer-inline": true}],

But it didn't have any effect.

Are there any rules that can catch this ?

贡献者指南