feat(ast-spec): support import attributes in TSImportType#10640
feat(ast-spec): support import attributes in TSImportType#10640JoshuaKGoldberg merged 6 commits intotypescript-eslint:mainfrom
TSImportType#10640Conversation
|
Thanks for the PR, @ronami! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
View your CI Pipeline Execution ↗ for commit 9dedfda.
☁️ Nx Cloud last updated this comment at |
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
👍 LGTM! Just requesting the fixture be moved to a more proper directory.
Eventually someone will feel motivated to drive moving all those legacy fixtures into more proper dirs. That person is not me today. 😄
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
LGTM!
I've named this
attributes...
Makes sense to me for the stated reasons. Since it's been a week, our weekly release will automatically start in 5-10 minutes, and this has a 👍 from @fisker too, I think we can go ahead and ship now.
|
Turns out the ast is not aligned with |

PR Checklist
Overview
This PR addresses #10394 and adds import attributes to the
TSImportTypenode.Some thoughts:
I've named this
attributes, similar to other nodes that useImportAttribute[](1, 2). This does mean the AST would be a bit different than Babel's, which uses the nameoptions. Please let me know if this should be changed.I didn't include any adjustments to the
scope-manager, as to my understanding,ImportAttributes can't include any reference to variables (also other nodes don't currently do this).I also didn't include any changes to
visitor-keyssince I didn't see other nodes withImportAttributes do this.Since this is currently auto-fixed incorrectly by Prettier (prettier/prettier#16072), I've added the fixture to
.prettierignore. I've seen this done in similar cases (see here).