Skip to content

[Feature request] import/no-same-package-import #2134

Open
@Nantris

Description

@Nantris

Refactoring some code today in a package called 'our-utils' I noticed one of the files in that package was importing like:

import { someDep } from 'our-utils';

Now in reality, someDep was in a file adjacent to the one we were working in, and the optimal import would be, in my view:

import { someDep } from '.';

Is there any rule already that does this? I don't think so, but maybe I overlooked one. This would be like the import/no-self-import rule, but working on entire packages rather than single files.

Metadata

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