import-js/eslint-plugin-import

Disallow duplicate require

Open

#2.925 aberto em 18 de nov. de 2023

Ver no GitHub
 (9 comments) (1 reaction) (0 assignees)JavaScript (1.540 forks)batch import
enhancementhelp 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

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 ?

Guia do colaborador