eslint-plugin-xo

ESLint rules for XO

Renamed to eslint-plugin-unicorn
Last updated 10 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-xo 
SYNC missed versions from official npm registry.

eslint-plugin-xo Build Status Coverage Status

ESLint rules for 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.

{
	"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

Recommended config

This plugin exports a recommended config that enforces good practices.

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

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

See the ESLint docs for more information about extending config files.

Note: This config will also enable the correct parser options and environment.

Created by

License

MIT © Sindre Sorhus

Current Tags

  • 1.0.0                                ...           latest (10 years ago)

11 Versions

  • 1.0.0 [deprecated]           ...           10 years ago
  • 0.5.1                                ...           10 years ago
  • 0.5.0                                ...           10 years ago
  • 0.4.3                                ...           10 years ago
  • 0.4.2                                ...           10 years ago
  • 0.4.1                                ...           10 years ago
  • 0.4.0                                ...           10 years ago
  • 0.3.1                                ...           10 years ago
  • 0.3.0                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (5)
Dev Dependencies (7)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |