import-js/eslint-plugin-import

Disallow duplicate require

Open

#2,925 opened on 2023年11月18日

GitHub で見る
 (9 comments) (1 reaction) (0 assignees)JavaScript (4,946 stars) (1,540 forks)batch import
enhancementhelp wanted

説明

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 ?

コントリビューターガイド

Disallow duplicate require · import-js/eslint-plugin-import#2925 | Good First Issue