{"id":14557,"library":"eslint-config-airbnb-base-typescript","title":"Airbnb Base ESLint Config for TypeScript","description":"This package provides an ESLint configuration that extends the popular Airbnb Base JavaScript style guide with support for TypeScript. It integrates `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` to enable linting TypeScript code according to Airbnb's rules. The current stable version is 1.1.0, last updated in April 2020. This config focuses solely on TypeScript and base JavaScript rules, differentiating it from other Airbnb TypeScript configurations that might include React-specific rules. It requires manual installation of its peer dependencies.","status":"maintenance","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/ekoeryanto/eslint-config-airbnb-base-typescript","tags":["javascript","airbnb","config","es2015","es2016","es2017","es2018","eslint","eslintconfig"],"install":[{"cmd":"npm install eslint-config-airbnb-base-typescript","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-airbnb-base-typescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-airbnb-base-typescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for any ESLint configuration to function.","package":"eslint","optional":false},{"reason":"Peer dependency providing ESLint rules for ES module imports.","package":"eslint-plugin-import","optional":false},{"reason":"Peer dependency offering TypeScript-specific linting rules.","package":"@typescript-eslint/eslint-plugin","optional":false},{"reason":"Peer dependency responsible for parsing TypeScript code for ESLint.","package":"@typescript-eslint/parser","optional":false}],"imports":[{"note":"This package is an ESLint configuration and is consumed via the 'extends' array in an ESLint config file, not through direct JavaScript `import` or `require` statements. Ensure `parserOptions.project` is also configured.","wrong":"import airbnbBaseTsConfig from 'eslint-config-airbnb-base-typescript';","symbol":"airbnb-base-typescript","correct":"module.exports = { extends: ['airbnb-base-typescript'] };"}],"quickstart":{"code":"{\n  // .eslintrc.js (or .eslintrc.cjs)\n  \"root\": true,\n  \"env\": {\n    \"node\": true,\n    \"es2020\": true\n  },\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": 2020,\n    \"sourceType\": \"module\",\n    \"project\": \"./tsconfig.json\" // IMPORTANT: Adjust path to your tsconfig.json\n  },\n  \"extends\": [\n    \"eslint:recommended\",\n    \"plugin:@typescript-eslint/recommended\",\n    \"airbnb-base-typescript\"\n  ],\n  \"rules\": {\n    // Add or override rules here, for example:\n    // \"no-console\": \"warn\"\n  }\n}\n\n// To install the necessary packages:\n// npm install --save-dev \\\n//   eslint \\\n//   eslint-config-airbnb-base-typescript \\\n//   eslint-plugin-import \\\n//   @typescript-eslint/eslint-plugin \\\n//   @typescript-eslint/parser\n\n// Example tsconfig.json (must include files to be linted):\n// {\n//   \"compilerOptions\": {\n//     \"target\": \"es2020\",\n//     \"module\": \"commonjs\",\n//     \"strict\": true,\n//     \"esModuleInterop\": true,\n//     \"forceConsistentCasingInFileNames\": true\n//   },\n//   \"include\": [\"src/**/*.ts\", \"test/**/*.ts\"]\n// }\n\n// To run ESLint:\n// npx eslint --ext .js,.ts .","lang":"javascript","description":"Demonstrates how to configure `.eslintrc.js` to extend `airbnb-base-typescript`, set up the TypeScript parser with `parserOptions.project`, and lists the required `npm install` command. It also includes an example `tsconfig.json`."},"warnings":[{"fix":"Run `npm install --save-dev eslint eslint-plugin-import @typescript-eslint/eslint-plugin @typescript-eslint/parser` to ensure all necessary peer dependencies are present.","message":"This ESLint configuration, like many others, requires manual installation of all its peer dependencies. Failing to install packages like `eslint`, `@typescript-eslint/parser`, and `eslint-plugin-import` will lead to 'Module not found' or 'Failed to load plugin' errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add `parserOptions: { project: './tsconfig.json' }` (adjust path as needed) to your `.eslintrc.js` file. For complex project structures, create a dedicated `tsconfig.eslint.json` that extends your main `tsconfig.json` and includes all lintable files.","message":"The configuration implicitly relies on `@typescript-eslint/parser`'s `parserOptions.project` setting to function correctly with type-aware rules. This property must point to your `tsconfig.json` file (or an extended version like `tsconfig.eslint.json`).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If your project uses React, consider using `eslint-config-airbnb-typescript` (by `iamturns`) instead, which includes React support. Alternatively, you can manually add and configure React-related ESLint plugins to your `.eslintrc.js`.","message":"This package (`eslint-config-airbnb-base-typescript`) is based on `eslint-config-airbnb-base`, meaning it does *not* include React-specific linting rules or plugins (`eslint-plugin-react`, `eslint-plugin-jsx-a11y`).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider migrating to `eslint-config-airbnb-typescript` (by `iamturns`) or `eslint-config-airbnb-extended`, which are actively maintained and offer broader compatibility with newer ESLint versions and features, including flat config.","message":"This package (ekoeryanto/eslint-config-airbnb-base-typescript) has not seen significant updates since April 2020 (version 1.1.0) and may not fully support the latest ESLint or TypeScript versions. More actively maintained alternatives exist for similar functionality.","severity":"deprecated","affected_versions":">=1.1.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev eslint-plugin-import` to install the plugin. Ensure it's a compatible version with your ESLint setup.","cause":"The `eslint-plugin-import` peer dependency was not installed or is an incompatible version.","error":"Failed to load plugin 'import' declared in '.eslintrc.js'"},{"fix":"Verify that your `tsconfig.json` (or a `tsconfig.eslint.json`) includes the files you are trying to lint in its `include` array. Adjust the `parserOptions.project` path if using a custom TypeScript configuration file for ESLint.","cause":"ESLint is attempting to lint a file that is not covered by the `include` or `files` array in the `tsconfig.json` specified by `parserOptions.project`.","error":"Parsing error: \"The file must be included in at least one of the projects provided.\""},{"fix":"Ensure both `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` are installed and up-to-date. Run `npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser`.","cause":"This error (or similar for `@typescript-eslint` rules) indicates that `@typescript-eslint/eslint-plugin` or `@typescript-eslint/parser` is missing, or an outdated version is installed that does not support the rule.","error":"Definition for rule '@typescript-eslint/no-unsafe-member-access' was not found"}],"ecosystem":"npm"}