This talk takes a game-show format to walking you through all the ways to do TypeScript imports and then follows it up with some fantastic tooling to make the machines do the work.
00:00 agenda
00:34 about import declarations
02:47 a quiz on import errors
06:36 why use type-only imports?
08:19 using ESLint to enforce consistency
10:15 TypeScript can help too
12:11 using prettier to do the same job
15:31 summary
16:16 audience question: why is the prettier plugin so configurable?
17:57 how do you handle side effects
18:25 should we always use namespace imports?
21:01 barrel imports are bad
Links from the video:
https://typescript-eslint.io/blog/con...
https://www.npmjs.com/package/@ianvs/...
-------
Ian VanSchooten is a front-end developer, open source maintainer, and co-organizer of Michigan TypeScript. He is a staff engineer at Defined Networking, and his open source projects include eslint-nibble, @ianvs/prettier-plugin-sort-imports, and the vite-builder for Storybook.
https://github.com/ianvs
https://fosstodon.org/@IanVS
/ ianvanschooten
https://www.defined.net/
-------
MiTS Discord: https://discord.michigantypescript.com
Twitter: / mitypescript
Mastodon: https://fosstodon.org/@MichiganTypeSc...
Instagram: / michigantypescript
TikTok: / michigantypescript