eslint-config-airbnb-base-typescript-prettier

raw JSON →
5.1.0 verified Sat Apr 25 auth: no javascript

A shareable ESLint configuration combining Airbnb's base style guide with TypeScript support and Prettier integration. v5.1.0 is current; built on eslint-config-airbnb-base and @typescript-eslint/parser. Requires manual installation of peer dependencies. Updated regularly for security; last update v5.1.0 (April 2024). Differentiator: single config package that merges Airbnb's base (no React) with TypeScript and Prettier, avoiding multiple extends.

error Error: Cannot find module 'eslint-config-airbnb-base-typescript-prettier'
cause DevDependencies not installed
fix
Run: npm install --save-dev eslint-config-airbnb-base-typescript-prettier
error Error: Failed to load parser '@typescript-eslint/parser'
cause Missing @typescript-eslint/parser, which is a peer dependency of the config
fix
Run: npm install --save-dev @typescript-eslint/parser
error typeOptions is not defined (no-undef)
cause No TypeScript parser setup or missing file extension
fix
Ensure .eslintrc.js extends 'airbnb-base-typescript-prettier' and run eslint with --ext .ts,.tsx
deprecated eslint-config-airbnb-base may deprecate old rules; check compatibility
fix Run npm outdated and update peer dependencies.
breaking v5.0.0 removed JSX plugin; no React preset
fix If using React, switch to eslint-config-airbnb-typescript-prettier or add react plugin manually.
gotcha Overriding parser breaks TypeScript support
fix Do not set parser in your .eslintrc; the config uses @typescript-eslint/parser internally.
gotcha ESLint 9 flat config not supported; uses legacy config format
fix Use .eslintrc.js or .eslintrc.json; for flat config, manually extend or migrate.
deprecated prettier v3 may deprecate some formatting options; check compatibility with eslint-plugin-prettier
fix Use prettier v2 or adjust Prettier options accordingly.
npm install eslint-config-airbnb-base-typescript-prettier
yarn add eslint-config-airbnb-base-typescript-prettier
pnpm add eslint-config-airbnb-base-typescript-prettier

Install peer deps, create config files with base setup, and lint TypeScript files.

npm install typescript eslint prettier eslint-config-airbnb-base-typescript-prettier --save-dev
echo "module.exports = { extends: 'airbnb-base-typescript-prettier' };" > .eslintrc.js
echo "module.exports = { semi: true, singleQuote: true };" > .prettierrc.js
npx eslint . --ext .ts,.tsx