Registry / testing / eslint-config-airbnb-base-typescript

eslint-config-airbnb-base-typescript

JSON →
library1.1.0jsnpmunverified

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.

npm install eslint-config-airbnb-base-typescript
INSTALL
IMPORT
SIG · ESLINT-CONFIG-AIRB
E
eslint-config-airbnb-base-typescript
testingjavascriptv1.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

airbnb-base-typescript
module.exports = { extends: ['airbnb-base-typescript'] };
import airbnbBaseTsConfig from 'eslint-config-airbnb-base-typescript';
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.

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`.

{ // .eslintrc.js (or .eslintrc.cjs) "root": true, "env": { "node": true, "es2020": true }, "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2020, "sourceType": "module", "project": "./tsconfig.json" // IMPORTANT: Adjust path to your tsconfig.json }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "airbnb-base-typescript" ], "rules": { // Add or override rules here, for example: // "no-console": "warn" } } // To install the necessary packages: // npm install --save-dev \ // eslint \ // eslint-config-airbnb-base-typescript \ // eslint-plugin-import \ // @typescript-eslint/eslint-plugin \ // @typescript-eslint/parser // Example tsconfig.json (must include files to be linted): // { // "compilerOptions": { // "target": "es2020", // "module": "commonjs", // "strict": true, // "esModuleInterop": true, // "forceConsistentCasingInFileNames": true // }, // "include": ["src/**/*.ts", "test/**/*.ts"] // } // To run ESLint: // npx eslint --ext .js,.ts .
Debug
Known issues
gotchaThis 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.
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.
affects: >=1.0.0
gotchaThe 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`).
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.
affects: >=1.0.0
gotchaThis 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`).
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`.
affects: >=1.0.0
deprecatedThis 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.
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.
affects: >=1.1.0
Errors
Common errors & fixes
Failed to load plugin 'import' declared in '.eslintrc.js'
The `eslint-plugin-import` peer dependency was not installed or is an incompatible version.
fix
Run `npm install --save-dev eslint-plugin-import` to install the plugin. Ensure it's a compatible version with your ESLint setup.
Parsing error: "The file must be included in at least one of the projects provided."
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`.
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.
Definition for rule '@typescript-eslint/no-unsafe-member-access' was not found
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.
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`.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required for any ESLint configuration to function.
eslint-plugin-importrequiredPeer dependency providing ESLint rules for ES module imports.
@typescript-eslint/eslint-pluginrequiredPeer dependency offering TypeScript-specific linting rules.
@typescript-eslint/parserrequiredPeer dependency responsible for parsing TypeScript code for ESLint.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-airbnb-base-typescript — npm install eslint-config-airbnb-base-typescript · libregistry