eslint-config-airbnb-typescript-prettier is an ESLint shareable configuration designed to streamline the setup of linting for TypeScript projects by integrating the popular Airbnb JavaScript style guide with Prettier for consistent code formatting. Currently at version 5.0.0, this package aims to reduce boilerplate and configuration overhead for developers. Its release cadence is generally aligned with updates to its upstream dependencies, including ESLint, Airbnb's base config, `@typescript-eslint`, and Prettier itself, ensuring compatibility and leveraging the latest best practices. A key differentiator is its pre-configured merging of these complex tools, saving significant time in initial project setup and ongoing maintenance compared to configuring each tool individually. It handles the often-tricky interoperability between ESLint's parser, TypeScript's syntax, and Prettier's formatting rules, providing a cohesive and opinionated development experience.
npm install eslint-config-airbnb-typescript-prettierVerified import paths — ran on the pinned version, not inferred.
Installs the package and its peer dependencies, then configures ESLint to use the Airbnb TypeScript Prettier ruleset with project-specific TypeScript parsing.
Update your `eslint`, `prettier`, and `typescript` packages to match the peer dependency range specified by `eslint-config-airbnb-typescript-prettier@5.0.0` using `npm install` or `yarn add`.
Ensure your `.eslintrc.js` includes `parserOptions: { project: './tsconfig.json' }` and that the path to your `tsconfig.json` is correct and accessible from the ESLint configuration file.Place `"airbnb-typescript-prettier"` as the last entry in your `extends` array, or ensure any custom Prettier-disabling configs are placed after other rule-defining configs.
For faster linting in development, consider using `eslint-plugin-only-warn` or separating type-aware rules into a script that runs less frequently (e.g., CI/CD, pre-commit hook) or only on changed files.
Run `npm install --save-dev @typescript-eslint/parser` to ensure the parser is installed. Check `npm view eslint-config-airbnb-typescript-prettier peerDependencies` for compatible versions.
Add or correct the `parserOptions` object in your `.eslintrc.js` file: `{ parserOptions: { project: './tsconfig.json' } }`, ensuring `tsconfig.json` exists at the specified path.Verify the package is installed with `npm list eslint-config-airbnb-typescript-prettier` and run `npm install --save-dev eslint-config-airbnb-typescript-prettier` if it's missing. Double-check the spelling in your `.eslintrc.js`.
Run `eslint --fix src/**/*.ts` (or your relevant files) to automatically fix the issue, or configure your IDE to run `eslint --fix` on save. Ensure your editor's Prettier settings (if any) are aligned with the project.
Add `parserOptions: { project: './tsconfig.json' }` to your `.eslintrc.js` and ensure that the specified `tsconfig.json` path is correct and accessible.