# eslint-config-xo-react

> ESLint shareable config for React to be used with eslint-config-xo

Latest version **0.31.0** (published 2026-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-xo-react
pnpm add eslint-config-xo-react
yarn add eslint-config-xo-react
bun add eslint-config-xo-react
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.31.0 |
| Published | 2026-06-27 |
| First published | 2015-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18.18 |
| Dependencies | 2 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 121 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus, marionebl |
| Keywords | react, jsx, eslintconfig, xo, xoxo, hugs, kisses, happy, happiness, code, quality, style, lint, linter, jscs, jshint, jslint, eslint, validate, code style, standard, strict, check, checker, verify, enforce, hint, simple |

## Links

- npm: https://www.npmjs.com/package/eslint-config-xo-react
- Repository: https://github.com/xojs/eslint-config-xo-react
- Homepage: https://github.com/xojs/eslint-config-xo-react#readme
- Issues: https://github.com/xojs/eslint-config-xo-react/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/eslint-config-xo-react

## Dependencies (2)

- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.37.5
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^7.0.1

## 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

- 0.31.0 (latest) — 2026-06-27
- 0.30.1 — 2026-04-17
- 0.30.0 — 2026-03-24
- 0.29.0 — 2025-10-26
- 0.28.0 — 2025-01-21
- 0.27.0 — 2022-03-19
- 0.26.0 — 2022-01-09
- 0.25.0 — 2021-04-03
- 0.24.0 — 2021-02-20
- 0.23.0 — 2020-02-13
- 0.22.0 — 2020-01-08
- 0.21.0 — 2020-01-08
- 0.20.0 — 2019-07-06
- 0.19.0 — 2019-03-04
- 0.18.0 — 2019-01-14
- … 18 more at https://npm.io/package/eslint-config-xo-react/versions

## README

# eslint-config-xo-react

> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for React to be used with [eslint-config-xo](https://github.com/xojs/eslint-config-xo)

## Install

```sh
npm install --save-dev eslint-config-xo eslint-config-xo-react
```

## Usage

Add some ESLint config to your `eslint.config.js`:

```js
import eslintConfigXo from 'eslint-config-xo';
import eslintConfigXoReact from 'eslint-config-xo-react';
import {defineConfig} from 'eslint/config';

export default defineConfig([
	...eslintConfigXo(),
	...eslintConfigXoReact(),
]);
```

### Options

#### space

Type: `boolean | number`\
Default: `false`

Use spaces for indentation instead of tabs for JSX props. Set to `true` for 2 spaces, or a number for a custom count.

```js
export default defineConfig([
	...eslintConfigXo({space: true}),
	...eslintConfigXoReact({space: true}),
]);
```

<!-- ## Tip

### Use with XO

```sh
npm install --save-dev eslint-config-xo-react eslint-plugin-react eslint-plugin-react-hooks
```

```json
{
	"name": "my-awesome-project",
	"xo": {
		"extends": "xo-react"
	}
}
``` -->

## Related

- [eslint-config-xo](https://github.com/xojs/eslint-config-xo) - ESLint shareable config for XO
- [XO](https://github.com/xojs/xo)

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