Skip to content

Disallow duplicate require #2925

Open
@edi9999

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 ?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions