Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eslint rule of import/extensions #2

Merged
merged 1 commit into from
Nov 25, 2024
Merged

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.

1 participant