Advanced Linting in Node js
summary
Argues that linting must go beyond style to detect real bugs by enforcing patterns, demonstrates writing custom ESLint rules with ESLint and ASTExplorer.net, builds a ~20-line rule that flags a promise used inside a callback and shows it removing errors, points out existing rules like no-throw-literal and mentions publishing as eslint-plugin-promise which thousands use, and claims this approach catches mismatched callback/promise, lodash/underscore, and other pattern bugs early.
AI-written summary · about
chapters (9)
- 0:00Intro
- 0:32Why you should lint
- 4:38Error Handling
- 5:56Callback Pattern
- 7:15Promise Pattern
- 9:08Mismatched Patterns
- 11:05Common Mismatched Patterns
- 12:42Creating Custom ESLINT Rules
- 14:47Mixing Promises and Callbacks
related talks
14mGetting Started with JavaScript Linter | What Is Linter?
30mRefactoring large JavaScript codebases
20mThey see me refactorin'. They hatin'
43mJavaScript ❤ binary data
22mHow Linters, Compilers & Other Cool Things Work
58mImproving Quality of JavaScript Code
58mImproving the Quality of JavaScript Code
36mEnforcing coding standards in a JS library
