WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@taketo1113
Copy link
Owner

Summary

This Pull Request adds a lint rule to enforce that file extensions(.js) are specified in import statements.

Details

Specifying file extensions is required because, in ESM imports, omitting the file extension(.js) will result in an error.

// correct
import foo from './foo.js';

// error
import foo from './foo';

For more details about the rule being added, see the following:

@taketo1113 taketo1113 self-assigned this Nov 25, 2024
@taketo1113 taketo1113 merged commit 5b53df5 into master Nov 25, 2024
@taketo1113 taketo1113 deleted the lint-import-extensions branch November 25, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants