Skip to content

Commit

Permalink
Rename master branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 24, 2021
1 parent 45aa6f9 commit 79da875
Show file tree
Hide file tree
Showing 32 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion docs/new-rule.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creating a new rule

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/new-rule.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/new-rule.md)

## Prerequisite

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/assertion-arguments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enforce passing correct arguments to assertions

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/assertion-arguments.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/assertion-arguments.md)

Enforces passing the right number of arguments to assertion methods like `t.is()`. This rule can optionally also enforce or forbid the use of assertion messages.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/hooks-order.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enforce test hook ordering

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/hooks-order.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/hooks-order.md)

Hooks should be placed before any tests and in the proper semantic order:

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/max-asserts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Limit the number of assertions in a test

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/max-asserts.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/max-asserts.md)

Limit the amount of assertions in a test to enforce splitting up large tests into smaller ones.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-async-fn-without-await.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure that async tests use `await`

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-async-fn-without-await.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-async-fn-without-await.md)

AVA comes with built-in support for async functions (async/await). This allows you to write shorter and clearer tests.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-cb-test.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no `test.cb()` is used

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-cb-test.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-cb-test.md)

Disallow the use of `test.cb()`. We instead recommend using `test()` with an async function or a function returning a promise.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-duplicate-modifiers.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Ensure tests do not have duplicate modifiers

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-duplicate-modifiers.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-duplicate-modifiers.md)

Prevent the use of duplicate [test modifiers](https://github.com/avajs/ava/blob/master/docs/01-writing-tests.md).
Prevent the use of duplicate [test modifiers](https://github.com/avajs/ava/blob/main/docs/01-writing-tests.md).


## Fail
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-identical-title.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no tests have the same title

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-identical-title.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-identical-title.md)

Disallow tests with identical titles as it makes it hard to differentiate them.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-ignored-test-files.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no tests are written in ignored files

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-ignored-test-files.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-ignored-test-files.md)

This rule will verify that files which create tests are treated as test files by AVA. It will consider the root of the project to be the closest folder containing a `package.json` file, and will not do anything if it can't find one. Test files in `node_modules` will not be linted as they are ignored by ESLint.

Expand Down Expand Up @@ -45,7 +45,7 @@ This rule supports the following options:
* `files`: an array of glob patterns to select test files. Overrides the `files` configuration otherwise used by AVA itself.
* `helpers`: an array of glob patterns to select helper files. Overrides the `helpers` configuration otherwise used by AVA itself.

See also [AVA's configuration](https://github.com/avajs/ava/blob/master/docs/06-configuration.md#options).
See also [AVA's configuration](https://github.com/avajs/ava/blob/main/docs/06-configuration.md#options).

You can set the options like this:

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-import-test-files.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no test files are imported anywhere

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-import-test-files.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-import-test-files.md)

This rule will verify that you don't import any test files. It will consider the root of the project to be the closest folder containing a `package.json` file, and will not do anything if it can't find one. Test files in `node_modules` will not be linted as they are ignored by ESLint.

Expand Down Expand Up @@ -44,7 +44,7 @@ This rule supports the following options:
* `extensions`: an array of extensions of the files that AVA recognizes as test files or helpers. Overrides *both* the `babel.extensions` *and* `extensions` configuration otherwise used by AVA itself.
* `files`: an array of glob patterns to select test files. Overrides the `files` configuration otherwise used by AVA itself.

See also [AVA's configuration](https://github.com/avajs/ava/blob/master/docs/06-configuration.md#options).
See also [AVA's configuration](https://github.com/avajs/ava/blob/main/docs/06-configuration.md#options).

You can set the options like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-incorrect-deep-equal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Avoid using `deepEqual` with primitives

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-incorrect-deep-equal.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-incorrect-deep-equal.md)

The `deepEqual` and `notDeepEqual` assertions are unnecessary when comparing primitives. Use `is` or `not` instead.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-inline-assertions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure assertions are not called from inline arrow functions

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-inline-assertions.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-inline-assertions.md)

The test implementation should not purely consist of an inline assertion as assertions do not return a value and having them inline also makes the tests less readable.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-invalid-end.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure `t.end()` is only called inside `test.cb()`

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-invalid-end.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-invalid-end.md)

AVA will fail if `t.end()` is called in a non-`.cb` test function.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-nested-tests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no tests are nested

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-nested-tests.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-nested-tests.md)

In AVA, you cannot nest tests, for example, create tests inside of other tests. Doing so will lead to odd behavior.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-only-test.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no `test.only()` are present

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-only-test.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-only-test.md)

It's easy to run only one test with `test.only()` and then forget about it. It's visible in the results, but still easily missed. Forgetting to remove `.only`, means only this one test in the whole file will run, and if not caught, can let serious bugs slip into your codebase.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-skip-assert.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no assertions are skipped

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-skip-assert.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-skip-assert.md)

It's easy to make an assertion skipped with `t.skip.xyz()` and then forget about it.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-skip-test.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no tests are skipped

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-skip-test.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-skip-test.md)

It's easy to make a test skipped with `test.skip()` and then forget about it. It's visible in the results, but still easily missed.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-statement-after-end.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure `t.end()` is the last statement executed.

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-statement-after-end.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-statement-after-end.md)

`t.end()` should mark the end of your test, and additional statements should not be executed.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-todo-implementation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Ensure `test.todo()` is not given an implementation function

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-todo-implementation.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-todo-implementation.md)

[`test.todo()`](https://github.com/avajs/ava/blob/master/docs/01-writing-tests.md#test-placeholders-todo) is intended for planning tests. It's not meant to be passed a function to implement the test, and if given one, AVA will throw an error. If you added an implementation, you probably meant to remove the `.todo` modifier.
[`test.todo()`](https://github.com/avajs/ava/blob/main/docs/01-writing-tests.md#test-placeholders-todo) is intended for planning tests. It's not meant to be passed a function to implement the test, and if given one, AVA will throw an error. If you added an implementation, you probably meant to remove the `.todo` modifier.


## Fail
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-todo-test.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure no `test.todo()` is used

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-todo-test.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-todo-test.md)

Disallow the use of `test.todo()`. You might want to do this to only ship features with specs fully written and passing.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-unknown-modifiers.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Prevent the use of unknown test modifiers

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/no-unknown-modifiers.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-unknown-modifiers.md)

Prevent the use of unknown [test modifiers](https://github.com/avajs/ava/blob/master/docs/01-writing-tests.md).
Prevent the use of unknown [test modifiers](https://github.com/avajs/ava/blob/main/docs/01-writing-tests.md).


## Fail
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-async-await.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prefer using async/await instead of returning a Promise

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/prefer-async-await.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/prefer-async-await.md)

AVA comes with built-in support for async functions (async/await). This allows you to write shorter and clearer tests.

Expand Down
20 changes: 10 additions & 10 deletions docs/rules/prefer-power-assert.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Allow only use of the asserts that have no power-assert alternative.

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/prefer-power-assert.md)

- [`t.assert()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#assertvalue-message)
- [`t.deepEqual()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#deepequalvalue-expected-message)
- [`t.notDeepEqual()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#notdeepequalvalue-expected-message)
- [`t.like()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#likevalue-selector-message)
- [`t.throws()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#throwsfn-expected-message)
- [`t.notThrows()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#notthrowsfn-message)
- [`t.pass()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#passmessage)
- [`t.fail()`](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#failmessage)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/prefer-power-assert.md)

- [`t.assert()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#assertvalue-message)
- [`t.deepEqual()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#deepequalvalue-expected-message)
- [`t.notDeepEqual()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#notdeepequalvalue-expected-message)
- [`t.like()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#likevalue-selector-message)
- [`t.throws()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#throwsfn-expected-message)
- [`t.notThrows()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#notthrowsfn-message)
- [`t.pass()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#passmessage)
- [`t.fail()`](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#failmessage)

Useful for people wanting to fully embrace the power of [power-assert](https://github.com/power-assert-js/power-assert).

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/prefer-t-regex.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Prefer using `t.regex()` to test regular expressions

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/prefer-t-regex.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/prefer-t-regex.md)

The AVA [`t.regex()` assertion](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#regexcontents-regex-message) can test a string against a regular expression.
The AVA [`t.regex()` assertion](https://github.com/avajs/ava/blob/main/docs/03-assertions.md#regexcontents-regex-message) can test a string against a regular expression.

This rule will enforce the use of `t.regex()` instead of manually using `RegExp#test()`, which will make your code look clearer and produce better failure output.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/test-ended.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure callback tests are explicitly ended

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/test-ended.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/test-ended.md)

If you forget a `t.end();` in `test.cb()` the test will hang indefinitely.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/test-title-format.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure test titles have a certain format

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/test-title-format.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/test-title-format.md)

This rule is useful when you want to make sure all test titles match a common pattern to increase readability when tests fail.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/test-title.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure tests have a title

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/test-title.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/test-title.md)

Tests should have a title. AVA [v1.0.1](https://github.com/avajs/ava/releases/tag/v1.0.1) and later enforces this at runtime.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/use-t-well.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prevent the incorrect use of `t`

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/use-t-well.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/use-t-well.md)

Prevent the use of unknown assertion methods and the access to members other than the assertion methods and `.context`, as well as some known misuses of `t`.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/use-t.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure test functions use `t` as their parameter

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/use-t.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/use-t.md)

The convention is to have the parameter in AVA's test function be named `t`. Most rules in `eslint-plugin-ava` are based on that assumption.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/use-test.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Ensure that AVA is imported with `test` as the variable name

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/use-test.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/use-test.md)

The convention is to import AVA and assign it to a variable named `test`. Most rules in `eslint-plugin-ava` are based on that assumption.
In a TypeScript file (`.ts` or `.tsx`) AVA can be assigned to a variable named `anyTest` in order to define the types of `t.context` (see [Typing t.context](https://github.com/avajs/ava/blob/master/docs/recipes/typescript.md#typing-tcontext)).
In a TypeScript file (`.ts` or `.tsx`) AVA can be assigned to a variable named `anyTest` in order to define the types of `t.context` (see [Typing t.context](https://github.com/avajs/ava/blob/main/docs/recipes/typescript.md#typing-tcontext)).

### Fail

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/use-true-false.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure that `t.true()`/`t.false()` are used instead of `t.truthy()`/`t.falsy()`

Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/use-true-false.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/use-true-false.md)

`t.true()` and `t.false()` are stricter in their checks than `t.truthy()` and `t.falsy`.
For example: if you have a function `foo()` which normally returns `true`, but suddenly returns `1` instead, `t.truthy(foo())` would not catch the change, but `t.true(foo())` would.
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# eslint-plugin-ava [![Build Status](https://travis-ci.com/avajs/eslint-plugin-ava.svg?branch=master)](https://travis-ci.com/github/avajs/eslint-plugin-ava) [![Coverage Status](https://coveralls.io/repos/github/avajs/eslint-plugin-ava/badge.svg?branch=master)](https://coveralls.io/github/avajs/eslint-plugin-ava?branch=master)
# eslint-plugin-ava [![Build Status](https://travis-ci.com/avajs/eslint-plugin-ava.svg?branch=main)](https://travis-ci.com/github/avajs/eslint-plugin-ava) [![Coverage Status](https://coveralls.io/repos/github/avajs/eslint-plugin-ava/badge.svg?branch=main)](https://coveralls.io/github/avajs/eslint-plugin-ava?branch=main)

> ESLint rules for [AVA](https://avajs.dev)
Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/readme.md)
Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/readme.md)

This plugin is bundled in [XO](https://github.com/xojs/xo). No need to do anything if you're using it.

Expand Down

0 comments on commit 79da875

Please sign in to comment.