Skip to content

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

Merged
jordaaash merged 4 commits intoanza-xyz:masterfrom
johnrees:eslint
Aug 29, 2022
Merged

use eslint to enforce .js extensions with relative import paths#547
jordaaash merged 4 commits intoanza-xyz:masterfrom
johnrees:eslint

Conversation

@johnrees
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Holy shit, this is incredible

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

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

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.

Need eslint config to enforce .js file extensions

2 participants