Skip to content

Bug: no-missing-import does not find index.js in import folder #382

@Ocke-Janssen

Description

@Ocke-Janssen

Environment

Node version: 20.18.0
npm version: 10.8.2
ESLint version: 8
eslint-plugin-n version: 17.3.1
Operating System: MacOS

What rule do you want to report?

no-missing-import

Link to Minimal Reproducible Example

https://eslint-online-playground.netlify.app/#eNp1kDFvwyAQhf+Ky5JWcuzdWTt061J1KR0QXC1auEOAK1eR/3sPo0SOpWxw3+O9e5xFirqHWfngoPtOYhDWB4q5OXT9FzkDsbdoYD6cJO5JmYl2ddhKq40mTMSejsZHKV7AOXqQ4unEDzpIzmKOmpWErD1LbBopYM6AJkkxNB98W0VDBE3e8xyMFC2rgptGiwP2N+SzrR6VXjxwA1RMEF9DtrxYwWvoGqu9eoeYGJS5FE5lSJnTLopEU9Tw9hegCjyZyfG58EXiwp2C0j9qLF+4bWTg9xlCWRG1hV3s2u9OYoXH2ua42+sau/wDnveUww==

What did you expect to happen?

The index.js is the default when importing a folder

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

import './folder/index';
import './folder';

The 2nd import shows the error, it is doing the same as the 1st

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions