# eslint-plugin-xo

> ESLint rules for XO

Latest version **1.0.0** (published 2016-09-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install eslint-plugin-xo
pnpm add eslint-plugin-xo
yarn add eslint-plugin-xo
bun add eslint-plugin-xo
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-09-16 |
| First published | 2016-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5286 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | eslint, eslintplugin, eslint-plugin, xo, linter, lint, style |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-xo
- Repository: https://github.com/sindresorhus/eslint-plugin-xo
- Homepage: https://github.com/sindresorhus/eslint-plugin-xo#readme
- Issues: https://github.com/sindresorhus/eslint-plugin-xo/issues
- npm.io page: https://npm.io/package/eslint-plugin-xo

## Dependencies (5)

- [req-all](https://npm.io/package/req-all.md) ^0.1.0
- [lodash.camelcase](https://npm.io/package/lodash.camelcase.md) ^4.1.1
- [lodash.kebabcase](https://npm.io/package/lodash.kebabcase.md) ^4.0.1
- [lodash.snakecase](https://npm.io/package/lodash.snakecase.md) ^4.0.1
- [lodash.upperfirst](https://npm.io/package/lodash.upperfirst.md) ^4.2.0

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-09-16
- 0.5.1 — 2016-06-18
- 0.5.0 — 2016-06-14
- 0.4.3 — 2016-05-22
- 0.4.2 — 2016-05-20
- 0.4.1 — 2016-05-02
- 0.4.0 — 2016-04-30
- 0.3.1 — 2016-04-17
- 0.3.0 — 2016-04-17
- 0.2.0 — 2016-04-12
- 0.1.0 — 2016-04-09

## README

# eslint-plugin-xo [![Build Status](https://travis-ci.org/sindresorhus/eslint-plugin-xo.svg?branch=master)](https://travis-ci.org/sindresorhus/eslint-plugin-xo) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-xo/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-xo?branch=master)

> ESLint rules for [XO](https://github.com/sindresorhus/xo)

This plugin is bundled with XO, but can still be useful if you don't use XO.


## Install

```
$ npm install --save-dev eslint eslint-plugin-xo
```


## Usage

Configure it in `package.json`.

```json
{
	"name": "my-awesome-project",
	"eslintConfig": {
		"env": {
			"es6": true
		},
		"parserOptions": {
			"ecmaVersion": 7,
			"sourceType": "module"
		},
		"plugins": [
			"xo"
		],
		"rules": {
			"xo/catch-error-name": ["error", {"name": "err"}],
			"xo/explicit-length-check": "error",
			"xo/filename-case": ["error", {"case": "kebabCase"}],
			"xo/no-abusive-eslint-disable": "error",
			"xo/no-process-exit": "error",
			"xo/throw-new-error": "error"
		}
	}
}
```


## Rules

- [catch-error-name](docs/rules/catch-error-name.md) - Enforce a specific parameter name in catch clauses.
- [explicit-length-check](docs/rules/explicit-length-check.md) - Enforce explicitly comparing the `length` property of a value.
- [filename-case](docs/rules/filename-case.md) - Enforce a case style for filenames.
- [no-abusive-eslint-disable](docs/rules/no-abusive-eslint-disable.md) - Enforce specifying rules to disable in `eslint-disable` comments.
- [no-process-exit](docs/rules/no-process-exit.md) - Disallow `process.exit()`.
- [throw-new-error](docs/rules/throw-new-error.md) - Require `new` when throwing an error. *(fixable)*


## Recommended config

This plugin exports a [`recommended` config](index.js) that enforces good practices.

Enable it in your `package.json` with the `extends` option:

```json
{
	"name": "my-awesome-project",
	"eslintConfig": {
		"plugins": [
			"xo"
		],
		"extends": "plugin:xo/recommended"
	}
}
```

See the [ESLint docs](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information about extending config files.

**Note**: This config will also enable the correct [parser options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options) and [environment](http://eslint.org/docs/user-guide/configuring#specifying-environments).


## Created by

- [Sindre Sorhus](https://github.com/sindresorhus)
- [James Talmage](https://github.com/jamestalmage)
- [Jeroen Engels](https://github.com/jfmengels)
- [Contributors…](https://github.com/sindresorhus/eslint-plugin-xo/graphs/contributors)


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

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