import-js/eslint-plugin-import

Disallow duplicate require

Open

#2.925 geöffnet am 18. Nov. 2023

Auf GitHub ansehen
 (9 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (4.946 Stars) (1.540 Forks)batch import
enhancementhelp wanted

Beschreibung

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 ?

Contributor Guide