Sveriges mest populära poddar

ConTejas Code

Josh Goldberg: How to Maximize Success with TypeScript and ESLint

95 min • 5 september 2024

Links

- Codecrafters (sponsor): https://tej.as/codecrafters

- Wix (sponsor): https://tej.as/wix

- Josh Goldberg: https://x.com/joshuakgoldberg

- Learning TypeScript: https://learning.oreilly.com/library/view/-/9781098110321/

- SquiggleConf: https://2024.squiggleconf.com/


Summary


Joshua K Goldberg is a full-time independent open source maintainer in the TypeScript ecosystem. He shares his journey into open source and the importance of filling in the gaps in the ecosystem. He also discusses the best incremental migration path to TypeScript and highlights advanced features like shenanigans with type parameters and the 'satisfies' keyword. The conversation covers topics such as literals in TypeScript, writing a book, the process of writing and shipping a book, the reception of the book, the development of TypeScript ESLint, abstract syntax trees (ASTs), parsing, and static analysis. We also discuss the future of TypeScript, the performance of ESLint, and configuration tips to improve ESLint's performance.


Takeaways


1. Being a full-time independent open source maintainer is rewarding and allows for direct contributions to tools that benefit everyone.

2. When migrating to TypeScript, it's best to start with one file at a time and gradually increase strictness.

3. Type parameters in TypeScript can be complex, but they are useful for advanced scenarios.

4. The 'satisfies' keyword in TypeScript allows for declaring data that adheres to a type while still inferring a more specific type.

5. Parsing is the process of converting a string of code into an AST.

6. ESLint provides a report function that allows lint rules to report issues to the user.

7. TypeScript ESLint supports typed linting, which allows for more powerful linting rules.

8. ESLint's performance can be affected by misconfiguration, the number of plugins, and the use of ESLint plugin prettier.

9. Separating ESLint and Prettier as separate tools can improve performance.

10. Being an open-source maintainer can be challenging, but having a fallback plan and a supportive community can make it sustainable.


Chapters


00:00 Josh Goldberg

03:37 Introduction and Background

06:22 The Journey into Open Source and Filling in the Gaps

15:15 The Best Incremental Migration Path to TypeScript

28:41 Introducing the 'Satisfies' Keyword in TypeScript

30:31 The Process of Writing and Shipping a Book

35:10 The Development of TypeScript ESLint

37:26 Parsing and Static Analysis with Abstract Syntax Trees

56:54 Improving ESLint Performance: Configuration Tips

01:01:00 Understanding the Role of ASTs and Compilers in TypeScript and ESLint

01:03:42 Configuring Type Linting in TypeScript

01:06:22 The Intersection of AI with TypeScript and ESLint

01:11:53 Creating a Standardized Open-Source Sponsorship Rating System


Hosted on Acast. See acast.com/privacy for more information.

Kategorier
Förekommer på
00:00 -00:00