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 an ESLint rule to ensure all imports have .js extensions, for maximum ES Module compatibility. #235

Closed
trusktr opened this issue Jun 7, 2021 · 1 comment

Comments

@trusktr
Copy link
Member

trusktr commented Jun 7, 2021

We can use this ESLint plugin for that:

https://github.com/benmosher/eslint-plugin-import

@trusktr trusktr changed the title add an ESLint rule to ensure all imports have .js extensions, for maximum ES Module compatibility. add a Webpack test to ensure all imports have .js extensions, for maximum ES Module compatibility. Dec 21, 2021
@trusktr trusktr changed the title add a Webpack test to ensure all imports have .js extensions, for maximum ES Module compatibility. add an ESLint rule to ensure all imports have .js extensions, for maximum ES Module compatibility. Dec 21, 2021
@trusktr
Copy link
Member Author

trusktr commented Dec 21, 2021

Webpack 5 actually enforces this, so if our ES Module code passes successfully through Webpack, it means it meets the .js requirement because it checks the Node ESM rules.

@trusktr trusktr closed this as completed Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant