npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-config-xo-react

v0.32.0

Published

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

Downloads

284,198

Readme

eslint-config-xo-react

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

Install

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

[!NOTE] This config is built on ESLint React, which requires typescript as a peer dependency even in JavaScript-only projects. npm and pnpm install it for you, but Yarn does not, so install it yourself there.

Usage

// eslint.config.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.

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

prettier

Type: boolean | 'compat'
Default: false

Integrate Prettier by turning off the JSX formatting rules that conflict with it. Rules owned by eslint-config-xo are left alone, so you no longer need to add eslint-config-prettier yourself.

export default defineConfig([
	...eslintConfigXo({prettier: 'compat'}),
	...eslintConfigXoReact({prettier: 'compat'}),
]);

This config never runs Prettier, so any truthy value only turns off the conflicting rules. Running Prettier itself is handled by the prettier option in eslint-config-xo. Pass the same value you pass there.

Use with XO

XO comes bundled with eslint-config-xo, so you only need this config:

npm install --save-dev eslint-config-xo-react
// xo.config.js
import eslintConfigXoReact from 'eslint-config-xo-react';
import {defineConfig} from 'eslint/config';

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

Pass the same space and prettier values you use in your XO config.

Included plugins

Accessibility

Accessibility rules come from eslint-plugin-jsx-a11y-x, a maintained fork of eslint-plugin-jsx-a11y. The rules are prefixed with jsx-a11y-x/.

Only the rules that can be decided from the markup alone are enabled. The rules that guess at whether an element is meant to be interactive are left out, as they cannot see through component wrappers and do not apply to React Native. Enable those yourself if they suit your project.

If you wrap native elements in your own components, map them so the rules can see through the wrapper:

export default defineConfig([
	...eslintConfigXoReact(),
	{
		settings: {
			'jsx-a11y-x': {
				components: {
					TextField: 'input',
				},
			},
		},
	},
]);

Related