From 79da875f7610c286fcf095a7a6441ad230597404 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sun, 24 Jan 2021 14:12:48 +0700 Subject: [PATCH] Rename `master` branch to `main` --- docs/new-rule.md | 2 +- docs/rules/assertion-arguments.md | 2 +- docs/rules/hooks-order.md | 2 +- docs/rules/max-asserts.md | 2 +- docs/rules/no-async-fn-without-await.md | 2 +- docs/rules/no-cb-test.md | 2 +- docs/rules/no-duplicate-modifiers.md | 4 ++-- docs/rules/no-identical-title.md | 2 +- docs/rules/no-ignored-test-files.md | 4 ++-- docs/rules/no-import-test-files.md | 4 ++-- docs/rules/no-incorrect-deep-equal.md | 2 +- docs/rules/no-inline-assertions.md | 2 +- docs/rules/no-invalid-end.md | 2 +- docs/rules/no-nested-tests.md | 2 +- docs/rules/no-only-test.md | 2 +- docs/rules/no-skip-assert.md | 2 +- docs/rules/no-skip-test.md | 2 +- docs/rules/no-statement-after-end.md | 2 +- docs/rules/no-todo-implementation.md | 4 ++-- docs/rules/no-todo-test.md | 2 +- docs/rules/no-unknown-modifiers.md | 4 ++-- docs/rules/prefer-async-await.md | 2 +- docs/rules/prefer-power-assert.md | 20 ++++++++++---------- docs/rules/prefer-t-regex.md | 4 ++-- docs/rules/test-ended.md | 2 +- docs/rules/test-title-format.md | 2 +- docs/rules/test-title.md | 2 +- docs/rules/use-t-well.md | 2 +- docs/rules/use-t.md | 2 +- docs/rules/use-test.md | 4 ++-- docs/rules/use-true-false.md | 2 +- readme.md | 4 ++-- 32 files changed, 49 insertions(+), 49 deletions(-) diff --git a/docs/new-rule.md b/docs/new-rule.md index 4fafe879..8cc5aa5e 100644 --- a/docs/new-rule.md +++ b/docs/new-rule.md @@ -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 diff --git a/docs/rules/assertion-arguments.md b/docs/rules/assertion-arguments.md index 24c5a5b7..3942c4be 100644 --- a/docs/rules/assertion-arguments.md +++ b/docs/rules/assertion-arguments.md @@ -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. diff --git a/docs/rules/hooks-order.md b/docs/rules/hooks-order.md index 6dfd96b3..3213b9ce 100644 --- a/docs/rules/hooks-order.md +++ b/docs/rules/hooks-order.md @@ -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: diff --git a/docs/rules/max-asserts.md b/docs/rules/max-asserts.md index 3e25113d..756d5a8b 100644 --- a/docs/rules/max-asserts.md +++ b/docs/rules/max-asserts.md @@ -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. diff --git a/docs/rules/no-async-fn-without-await.md b/docs/rules/no-async-fn-without-await.md index 81a0da47..cad70e38 100644 --- a/docs/rules/no-async-fn-without-await.md +++ b/docs/rules/no-async-fn-without-await.md @@ -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. diff --git a/docs/rules/no-cb-test.md b/docs/rules/no-cb-test.md index b61a29b7..5f640506 100644 --- a/docs/rules/no-cb-test.md +++ b/docs/rules/no-cb-test.md @@ -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. diff --git a/docs/rules/no-duplicate-modifiers.md b/docs/rules/no-duplicate-modifiers.md index 5f57a6c1..517f6f3e 100644 --- a/docs/rules/no-duplicate-modifiers.md +++ b/docs/rules/no-duplicate-modifiers.md @@ -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 diff --git a/docs/rules/no-identical-title.md b/docs/rules/no-identical-title.md index c3786c24..5ba9fe3a 100644 --- a/docs/rules/no-identical-title.md +++ b/docs/rules/no-identical-title.md @@ -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. diff --git a/docs/rules/no-ignored-test-files.md b/docs/rules/no-ignored-test-files.md index 4fac1cf5..17f440cb 100644 --- a/docs/rules/no-ignored-test-files.md +++ b/docs/rules/no-ignored-test-files.md @@ -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. @@ -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: diff --git a/docs/rules/no-import-test-files.md b/docs/rules/no-import-test-files.md index bdcc55f3..2d2941f1 100644 --- a/docs/rules/no-import-test-files.md +++ b/docs/rules/no-import-test-files.md @@ -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. @@ -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: diff --git a/docs/rules/no-incorrect-deep-equal.md b/docs/rules/no-incorrect-deep-equal.md index 2d6b189d..1eb3526a 100644 --- a/docs/rules/no-incorrect-deep-equal.md +++ b/docs/rules/no-incorrect-deep-equal.md @@ -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. diff --git a/docs/rules/no-inline-assertions.md b/docs/rules/no-inline-assertions.md index 9b0a8608..72bd70f3 100644 --- a/docs/rules/no-inline-assertions.md +++ b/docs/rules/no-inline-assertions.md @@ -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. diff --git a/docs/rules/no-invalid-end.md b/docs/rules/no-invalid-end.md index d665cee3..89902ada 100644 --- a/docs/rules/no-invalid-end.md +++ b/docs/rules/no-invalid-end.md @@ -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. diff --git a/docs/rules/no-nested-tests.md b/docs/rules/no-nested-tests.md index 734a6de3..467d5a62 100644 --- a/docs/rules/no-nested-tests.md +++ b/docs/rules/no-nested-tests.md @@ -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. diff --git a/docs/rules/no-only-test.md b/docs/rules/no-only-test.md index 3882388f..c026b137 100644 --- a/docs/rules/no-only-test.md +++ b/docs/rules/no-only-test.md @@ -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. diff --git a/docs/rules/no-skip-assert.md b/docs/rules/no-skip-assert.md index 02906103..8bfe5704 100644 --- a/docs/rules/no-skip-assert.md +++ b/docs/rules/no-skip-assert.md @@ -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. diff --git a/docs/rules/no-skip-test.md b/docs/rules/no-skip-test.md index acdf199b..57c41ee4 100644 --- a/docs/rules/no-skip-test.md +++ b/docs/rules/no-skip-test.md @@ -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. diff --git a/docs/rules/no-statement-after-end.md b/docs/rules/no-statement-after-end.md index bb33351b..eda431c9 100644 --- a/docs/rules/no-statement-after-end.md +++ b/docs/rules/no-statement-after-end.md @@ -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. diff --git a/docs/rules/no-todo-implementation.md b/docs/rules/no-todo-implementation.md index bc2f08e8..fd706e41 100644 --- a/docs/rules/no-todo-implementation.md +++ b/docs/rules/no-todo-implementation.md @@ -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 diff --git a/docs/rules/no-todo-test.md b/docs/rules/no-todo-test.md index 9c94d8c0..72a72c4f 100644 --- a/docs/rules/no-todo-test.md +++ b/docs/rules/no-todo-test.md @@ -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. diff --git a/docs/rules/no-unknown-modifiers.md b/docs/rules/no-unknown-modifiers.md index f936e9f5..de736c10 100644 --- a/docs/rules/no-unknown-modifiers.md +++ b/docs/rules/no-unknown-modifiers.md @@ -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 diff --git a/docs/rules/prefer-async-await.md b/docs/rules/prefer-async-await.md index 19ecb884..570b5aaa 100644 --- a/docs/rules/prefer-async-await.md +++ b/docs/rules/prefer-async-await.md @@ -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. diff --git a/docs/rules/prefer-power-assert.md b/docs/rules/prefer-power-assert.md index 6e1999c9..5513ede4 100644 --- a/docs/rules/prefer-power-assert.md +++ b/docs/rules/prefer-power-assert.md @@ -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). diff --git a/docs/rules/prefer-t-regex.md b/docs/rules/prefer-t-regex.md index 71de1b86..4a561ef5 100644 --- a/docs/rules/prefer-t-regex.md +++ b/docs/rules/prefer-t-regex.md @@ -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. diff --git a/docs/rules/test-ended.md b/docs/rules/test-ended.md index f83171b4..96f17387 100644 --- a/docs/rules/test-ended.md +++ b/docs/rules/test-ended.md @@ -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. diff --git a/docs/rules/test-title-format.md b/docs/rules/test-title-format.md index 103045e3..bdf6f2ce 100644 --- a/docs/rules/test-title-format.md +++ b/docs/rules/test-title-format.md @@ -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. diff --git a/docs/rules/test-title.md b/docs/rules/test-title.md index c90b1740..00f13e58 100644 --- a/docs/rules/test-title.md +++ b/docs/rules/test-title.md @@ -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. diff --git a/docs/rules/use-t-well.md b/docs/rules/use-t-well.md index 29f89753..e9ec3344 100644 --- a/docs/rules/use-t-well.md +++ b/docs/rules/use-t-well.md @@ -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`. diff --git a/docs/rules/use-t.md b/docs/rules/use-t.md index 2465cb59..3d17ddd4 100644 --- a/docs/rules/use-t.md +++ b/docs/rules/use-t.md @@ -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. diff --git a/docs/rules/use-test.md b/docs/rules/use-test.md index 4c279aa0..6ad6a12e 100644 --- a/docs/rules/use-test.md +++ b/docs/rules/use-test.md @@ -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 diff --git a/docs/rules/use-true-false.md b/docs/rules/use-true-false.md index 61711edc..b9d2a494 100644 --- a/docs/rules/use-true-false.md +++ b/docs/rules/use-true-false.md @@ -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. diff --git a/readme.md b/readme.md index 1c8e2342..2e70f084 100644 --- a/readme.md +++ b/readme.md @@ -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.