# @thoughtbot/eslint-config

> Batteries-included sharable [ESLint][eslint] configurations for React, React Native, TypeScript, and Node.js that enforce [thoughtbot’s JavaScript guides][thoughtbot-js-guides]. These configurations are largely based off of and compatible with [AirBnb’s E

Latest version **2.0.0** (published 2026-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @thoughtbot/eslint-config
pnpm add @thoughtbot/eslint-config
yarn add @thoughtbot/eslint-config
bun add @thoughtbot/eslint-config
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-02-27 |
| First published | 2019-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 107.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 12 |
| Author | thoughtbot, Inc. |
| Maintainers | ralphbot, vendela, luke_mitchell, enatario, nickcharlton, daveiverson-thoughtbot |
| Keywords | eslint, eslintconfig |

## Links

- npm: https://www.npmjs.com/package/@thoughtbot/eslint-config
- Repository: https://github.com/thoughtbot/eslint-config
- Homepage: https://github.com/thoughtbot/eslint-config#readme
- Issues: https://github.com/thoughtbot/eslint-config/issues
- npm.io page: https://npm.io/package/@thoughtbot/eslint-config

## Dependencies (11)

- [eslint-plugin-jest](https://npm.io/package/eslint-plugin-jest.md) ^29.13.0
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.37.5
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.32.0
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) >= 8.7.0
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.10.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) 8
- [confusing-browser-globals](https://npm.io/package/confusing-browser-globals.md) ^1.0.11
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^5.0.0
- [eslint-plugin-testing-library](https://npm.io/package/eslint-plugin-testing-library.md) ^7.15.4
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) 8
- [eslint-import-resolver-typescript](https://npm.io/package/eslint-import-resolver-typescript.md) ^3.5.5

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-02-27
- 2.1.0-alpha.1 (alpha) — 2026-04-01
- 1.0.3 — 2025-01-13
- 1.0.2 — 2023-08-04
- 1.0.1 — 2023-07-27
- 1.0.0 — 2023-07-21
- 0.1.0 — 2019-07-28

## README

# thoughtbot ESLint Config

Batteries-included sharable [ESLint][eslint] configurations for React, React
Native, TypeScript, and Node.js that enforce [thoughtbot’s JavaScript
guides][thoughtbot-js-guides]. These configurations are largely based off of and
compatible with [AirBnb’s ESLint config][airbnb-config].

[eslint]: https://eslint.org/
[thoughtbot-js-guides]: https://github.com/thoughtbot/guides/tree/main/javascript
[airbnb-config]: https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb

## Installation

If using **npm**, run:

```bash
npm install @thoughtbot/eslint-config --save-dev
```

If using **Yarn**, run:

```bash
yarn add @thoughtbot/eslint-config --dev
```

## Usage

This package includes configurations for most common tech stacks. Update your [ESLint configuration][eslint-configuration] to extend the appropriate setup:

- `@thoughtbot/eslint-config` - React web, Jest, Testing Library, Prettier
- `@thoughtbot/eslint-config/react` - React web (same as above)
- `@thoughtbot/eslint-config/base` - base web config, no React or Prettier
- `@thoughtbot/eslint-config/native` - React Native, Jest, RN Testing Library, Prettier
- `@thoughtbot/eslint-config/prettier` - Prettier, automatically used when using React or Native config
- `@thoughtbot/eslint-config/typescript` - TypeScript config, add this if using Typescript

The configurations that include Prettier turn off all formatting rules that are also handled by Prettier to reduce conflicts between the two tools. It is recommended to add Prettier to your project and ensure that your CI environment also runs Prettier to verify code formatting.

### Example usage:

Following are some example usages of this config (eg. in `eslint.config.mjs`).

React with TypeScript:

```js
  extends: compat.extends(
    '@thoughtbot/eslint-config',
    '@thoughtbot/eslint-config/typescript',
  )
```

React Native with TypeScript:

```js
  extends: compat.extends(
    '@thoughtbot/eslint-config/native',
    '@thoughtbot/eslint-config/typescript'
  )
```

Base web without React or TypeScript

```js
  extends: compat.extends(
    '@thoughtbot/eslint-config/base',
  )
```

You can override rules from the shared configuration, by setting your
own values within the `rules` property:

```js
  rules: {
    'no-console': 'off',
    'import/order': 'off',
  }
```

You might also need to add the following to your ESLint config if you get an error about Jest not being able to detect the version:

```js
  settings: {
    jest: {
      version: 'detect',
    },
  },
```

Consult the [ESLint documentation][eslint-configuration] for more information about configuring ESLint, and take a look at the config files in this repo for more information about the rules and plugins they include.

[eslint-configuration]: https://eslint.org/docs/user-guide/configuring

## License

thoughtbot ESLint Config is copyright (c) 2026 thoughtbot, inc.
It is free software, and may be redistributed under the
terms specified in the [LICENSE] file.

[LICENSE]: /LICENSE.md

<!-- START /templates/footer.md -->
## About thoughtbot

![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)

This repo is maintained and funded by thoughtbot, inc.
The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software!
See [our other projects][community].
We are [available for hire][hire].

[community]: https://thoughtbot.com/community?utm_source=github
[hire]: https://thoughtbot.com/hire-us?utm_source=github


<!-- END /templates/footer.md -->

---
_Source: https://npm.io/package/@thoughtbot/eslint-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
