eslint-plugin-ava
ESLint rules for AVA
Last updated 6 days ago by novemberborn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-ava 
SYNC missed versions from official npm registry.

eslint-plugin-ava Build Status Coverage Status

ESLint rules for AVA

Translations: Français

This plugin is bundled in XO. No need to do anything if you're using it.

Propose or contribute a new rule ➡

Install

$ npm install --save-dev eslint eslint-plugin-ava

Usage

Configure it in package.json.

{
	"name": "my-awesome-project",
	"eslintConfig": {
		"env": {
			"es6": true
		},
		"parserOptions": {
			"ecmaVersion": 2020,
			"sourceType": "module"
		},
		"plugins": [
			"ava"
		],
		"rules": {
			"ava/assertion-arguments": "error",
			"ava/hooks-order": "error",
			"ava/max-asserts": [
				"off",
				5
			],
			"ava/no-async-fn-without-await": "error",
			"ava/no-cb-test": "off",
			"ava/no-duplicate-modifiers": "error",
			"ava/no-identical-title": "error",
			"ava/no-ignored-test-files": "error",
			"ava/no-import-test-files": "error",
			"ava/no-incorrect-deep-equal": "error",
			"ava/no-inline-assertions": "error",
			"ava/no-invalid-end": "error",
			"ava/no-nested-tests": "error",
			"ava/no-only-test": "error",
			"ava/no-skip-assert": "error",
			"ava/no-skip-test": "error",
			"ava/no-statement-after-end": "error",
			"ava/no-todo-implementation": "error",
			"ava/no-todo-test": "warn",
			"ava/no-unknown-modifiers": "error",
			"ava/prefer-async-await": "error",
			"ava/prefer-power-assert": "off",
			"ava/prefer-t-regex": "error",
			"ava/test-ended": "error",
			"ava/test-title": "error",
			"ava/test-title-format": "off",
			"ava/use-t": "error",
			"ava/use-t-throws-async-well": "error",
			"ava/use-t-well": "error",
			"ava/use-test": "error",
			"ava/use-true-false": "error"
		}
	}
}

Rules

The rules will only activate in test files.

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": {
		"extends": "plugin:ava/recommended"
	}
}

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

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

Current Tags

  • 10.4.0                                ...           latest (6 days ago)
  • 7.0.0-rc.1                                ...           next (a year ago)

50 Versions

  • 10.4.0                                ...           6 days ago
  • 10.3.1                                ...           a month ago
  • 10.3.0                                ...           3 months ago
  • 10.2.0                                ...           5 months ago
  • 10.1.0                                ...           5 months ago
  • 10.0.1                                ...           5 months ago
  • 10.0.0                                ...           6 months ago
  • 9.0.0                                ...           10 months ago
  • 8.0.0                                ...           a year ago
  • 7.1.0                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 7.0.0-rc.1                                ...           a year ago
  • 6.0.0                                ...           a year ago
  • 5.1.1                                ...           2 years ago
  • 5.1.0                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 4.5.1                                ...           2 years ago
  • 4.5.0                                ...           2 years ago
  • 4.4.0                                ...           3 years ago
  • 4.3.0                                ...           3 years ago
  • 4.2.2                                ...           3 years ago
  • 4.2.1                                ...           3 years ago
  • 4.2.0                                ...           3 years ago
  • 4.1.0                                ...           3 years ago
  • 4.0.1                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 3.1.1                                ...           4 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.5.0                                ...           4 years ago
  • 2.4.0                                ...           4 years ago
  • 2.3.1                                ...           4 years ago
  • 2.3.0                                ...           4 years ago
  • 2.2.1                                ...           4 years ago
  • 2.2.0                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.4.1                                ...           4 years ago
  • 1.4.0                                ...           4 years ago
  • 1.3.2                                ...           4 years ago
  • 1.3.1                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Downloads
Today 10
This Week 10
This Month 753
Last Day 13
Last Week 618
Last Month 1,417
Dependencies (8)
Dev Dependencies (15)
Dependents (105)

Copyright 2014 - 2016 © taobao.org |