Static Analysis: Don't Fear the Linter!
summary
Advocates using three separate tools: a formatter (Prettier), a linter (ESLint), and a type checker (TypeScript). Recommends prettier as default formatter with format-on-save, run eslint with --fix and --max-warnings=0 in CI, and avoid using ESLint rules for formatting. Enable TypeScript strict flags (strict, noImplicitAny) and configure VS Code to use node_modules/typescript. Turn on type-checked ESLint rules by setting parserOptions.project: true so rules can use the type checker to auto-fix things like unnecessary awaits.
AI-written summary · about
chapters (9)
- 0:00Intro
- 2:15What is Static Analysis
- 5:33What is a Linter
- 9:33Linter vs Formatter
- 11:24TypeScript
- 16:36TypeScript eslin
- 18:40TypeScript linting
- 21:21Next steps
- 22:16Recap
related talks
24mTypeScript Static Analysis Hidden Gems
35mYou Could Lint More
28mSetting Up ESLint and TypeScript for React
25mWrite Perfect Code with Standard and ESLint
14mGetting Started with JavaScript Linter | What Is Linter?
21mType dependence
30mWait, before you write your next test...
33mTypeScript - JavaScript you are gonna love
