Skip to content
New issue

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

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

Already on GitHub? # to your account

use eslint to enforce .js extensions with relative import paths #547

Merged
merged 4 commits into from
Aug 29, 2022
Merged

use eslint to enforce .js extensions with relative import paths #547

merged 4 commits into from
Aug 29, 2022

Conversation

johnrees
Copy link
Contributor

@johnrees johnrees commented Aug 28, 2022

An eslint plugin which fixes #546

It should autofix code with eslint --fix or on save with eslint plugins installed etc

autofix.mov

You might want to give it a better name and publish it as an npm package if it's going to be shared amongst multiple repos, I put it in here as a starting point for convenience

I think it should cover all types of import and exports. I just pasted some code in https://astexplorer.net then copied the node type names

@jordaaash
Copy link
Collaborator

Holy shit, this is incredible

@jordaaash jordaaash merged commit 8b039a3 into anza-xyz:master Aug 29, 2022
@jordaaash
Copy link
Collaborator

Externalized to https://github.com/solana-labs/eslint-plugin-require-extensions. Thank you so much!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need eslint config to enforce .js file extensions
2 participants