From b66c3fed70d2af11666d1fa2ea85ef9391c58201 Mon Sep 17 00:00:00 2001 From: Verite Mugabo Date: Fri, 5 Apr 2024 19:55:07 -0400 Subject: [PATCH] chore: updated --- README.md | 110 +++++++++--------- docs/rules/consistent-test-filename.md | 2 - docs/rules/consistent-test-it.md | 2 - docs/rules/expect-expect.md | 2 - docs/rules/max-expects.md | 2 - docs/rules/max-nested-describe.md | 2 - docs/rules/no-alias-methods.md | 2 - docs/rules/no-commented-out-tests.md | 2 - docs/rules/no-conditional-expect.md | 2 - docs/rules/no-conditional-in-test.md | 2 - docs/rules/no-conditional-tests.md | 2 - docs/rules/no-disabled-tests.md | 2 - docs/rules/no-done-callback.md | 2 - docs/rules/no-duplicate-hooks.md | 2 - docs/rules/no-focused-tests.md | 2 - docs/rules/no-hooks.md | 2 - docs/rules/no-identical-title.md | 2 - docs/rules/no-import-node-test.md | 2 - docs/rules/no-interpolation-in-snapshots.md | 2 - docs/rules/no-large-snapshots.md | 2 - docs/rules/no-mocks-import.md | 2 - docs/rules/no-restricted-matchers.md | 2 - docs/rules/no-restricted-vi-methods.md | 2 - docs/rules/no-standalone-expect.md | 2 - docs/rules/no-test-prefixes.md | 2 - docs/rules/no-test-return-statement.md | 2 - docs/rules/prefer-called-with.md | 2 - docs/rules/prefer-comparison-matcher.md | 2 - docs/rules/prefer-each.md | 2 - docs/rules/prefer-equality-matcher.md | 2 - docs/rules/prefer-expect-assertions.md | 2 - docs/rules/prefer-expect-resolves.md | 2 - docs/rules/prefer-hooks-in-order.md | 2 - docs/rules/prefer-hooks-on-top.md | 2 - docs/rules/prefer-lowercase-title.md | 2 - docs/rules/prefer-mock-promise-shorthand.md | 2 - docs/rules/prefer-snapshot-hint.md | 2 - docs/rules/prefer-spy-on.md | 2 - docs/rules/prefer-strict-equal.md | 2 - docs/rules/prefer-to-be-falsy.md | 2 - docs/rules/prefer-to-be-object.md | 2 - docs/rules/prefer-to-be-truthy.md | 2 - docs/rules/prefer-to-be.md | 2 - docs/rules/prefer-to-contain.md | 2 - docs/rules/prefer-to-have-length.md | 2 - docs/rules/prefer-todo.md | 2 - docs/rules/require-hook.md | 2 - ...l-test-context-for-concurrent-snapshots.md | 2 - docs/rules/require-to-throw-message.md | 2 - docs/rules/require-top-level-describe.md | 2 - docs/rules/valid-describe-callback.md | 2 - docs/rules/valid-expect.md | 2 - docs/rules/valid-title.md | 2 - 53 files changed, 54 insertions(+), 160 deletions(-) diff --git a/README.md b/README.md index 6e65b77..4243e0a 100644 --- a/README.md +++ b/README.md @@ -129,66 +129,64 @@ If you're using this feature, you should also enabled `typecheck` in the setting -💼 Configurations enabled in.\ -⚠️ Configurations set to warn in.\ 🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\ 💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\ ❌ Deprecated. -| Name                                                | Description | 💼 | ⚠️ | 🔧 | 💡 | ❌ | -| :----------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------- | :---------------------------- | :-------------------- | :- | :- | :- | -| [consistent-test-filename](docs/rules/consistent-test-filename.md) | forbidden .spec test file pattern | | ![badge-all-legacy][] | | | | -| [consistent-test-it](docs/rules/consistent-test-it.md) | Prefer test or it but not both | | ![badge-all-legacy][] | 🔧 | | | -| [expect-expect](docs/rules/expect-expect.md) | Enforce having expectation in test body | ![badge-recommended-legacy][] | | | | | -| [max-expects](docs/rules/max-expects.md) | Enforce a maximum number of expect per test | | ![badge-all-legacy][] | | | | -| [max-nested-describe](docs/rules/max-nested-describe.md) | Nested describe block should be less than set max value or default value | | ![badge-all-legacy][] | | | | -| [no-alias-methods](docs/rules/no-alias-methods.md) | Disallow alias methods | | ![badge-all-legacy][] | 🔧 | | | -| [no-commented-out-tests](docs/rules/no-commented-out-tests.md) | Disallow commented out tests | ![badge-recommended-legacy][] | | | | | -| [no-conditional-expect](docs/rules/no-conditional-expect.md) | Disallow conditional expects | | ![badge-all-legacy][] | | | | -| [no-conditional-in-test](docs/rules/no-conditional-in-test.md) | Disallow conditional tests | | ![badge-all-legacy][] | | | | -| [no-conditional-tests](docs/rules/no-conditional-tests.md) | Disallow conditional tests | | ![badge-all-legacy][] | | | | -| [no-disabled-tests](docs/rules/no-disabled-tests.md) | Disallow disabled tests | | ![badge-all-legacy][] | | | | -| [no-done-callback](docs/rules/no-done-callback.md) | Disallow using a callback in asynchronous tests and hooks | | ![badge-all-legacy][] | | 💡 | ❌ | -| [no-duplicate-hooks](docs/rules/no-duplicate-hooks.md) | Disallow duplicate hooks and teardown hooks | | ![badge-all-legacy][] | | | | -| [no-focused-tests](docs/rules/no-focused-tests.md) | Disallow focused tests | | ![badge-all-legacy][] | 🔧 | | | -| [no-hooks](docs/rules/no-hooks.md) | Disallow setup and teardown hooks | | ![badge-all-legacy][] | | | | -| [no-identical-title](docs/rules/no-identical-title.md) | Disallow identical titles | ![badge-recommended-legacy][] | | 🔧 | | | -| [no-import-node-test](docs/rules/no-import-node-test.md) | Disallow importing `node:test` | ![badge-recommended-legacy][] | | 🔧 | | | -| [no-interpolation-in-snapshots](docs/rules/no-interpolation-in-snapshots.md) | Disallow string interpolation in snapshots | | ![badge-all-legacy][] | 🔧 | | | -| [no-large-snapshots](docs/rules/no-large-snapshots.md) | Disallow large snapshots | | ![badge-all-legacy][] | | | | -| [no-mocks-import](docs/rules/no-mocks-import.md) | Disallow importing from __mocks__ directory | | ![badge-all-legacy][] | | | | -| [no-restricted-matchers](docs/rules/no-restricted-matchers.md) | Disallow the use of certain matchers | | ![badge-all-legacy][] | | | | -| [no-restricted-vi-methods](docs/rules/no-restricted-vi-methods.md) | Disallow specific `vi.` methods | | ![badge-all-legacy][] | | | | -| [no-standalone-expect](docs/rules/no-standalone-expect.md) | Disallow using `expect` outside of `it` or `test` blocks | | ![badge-all-legacy][] | | | | -| [no-test-prefixes](docs/rules/no-test-prefixes.md) | Disallow using `test` as a prefix | | ![badge-all-legacy][] | 🔧 | | | -| [no-test-return-statement](docs/rules/no-test-return-statement.md) | Disallow return statements in tests | | ![badge-all-legacy][] | | | | -| [prefer-called-with](docs/rules/prefer-called-with.md) | Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()` | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-comparison-matcher](docs/rules/prefer-comparison-matcher.md) | Suggest using the built-in comparison matchers | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-each](docs/rules/prefer-each.md) | Prefer `each` rather than manual loops | | ![badge-all-legacy][] | | | | -| [prefer-equality-matcher](docs/rules/prefer-equality-matcher.md) | Suggest using the built-in quality matchers | | ![badge-all-legacy][] | | 💡 | | -| [prefer-expect-assertions](docs/rules/prefer-expect-assertions.md) | Suggest using expect assertions instead of callbacks | | ![badge-all-legacy][] | | 💡 | | -| [prefer-expect-resolves](docs/rules/prefer-expect-resolves.md) | Suggest using `expect().resolves` over `expect(await ...)` syntax | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-hooks-in-order](docs/rules/prefer-hooks-in-order.md) | Prefer having hooks in consistent order | | ![badge-all-legacy][] | | | | -| [prefer-hooks-on-top](docs/rules/prefer-hooks-on-top.md) | Suggest having hooks before any test cases | | ![badge-all-legacy][] | | | | -| [prefer-lowercase-title](docs/rules/prefer-lowercase-title.md) | Enforce lowercase titles | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-mock-promise-shorthand](docs/rules/prefer-mock-promise-shorthand.md) | Prefer mock resolved/rejected shorthands for promises | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-snapshot-hint](docs/rules/prefer-snapshot-hint.md) | Prefer including a hint with external snapshots | | ![badge-all-legacy][] | | | | -| [prefer-spy-on](docs/rules/prefer-spy-on.md) | Suggest using `vi.spyOn` | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-strict-equal](docs/rules/prefer-strict-equal.md) | Prefer strict equal over equal | | ![badge-all-legacy][] | | 💡 | | -| [prefer-to-be](docs/rules/prefer-to-be.md) | Suggest using toBe() | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-to-be-falsy](docs/rules/prefer-to-be-falsy.md) | Suggest using toBeFalsy() | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-to-be-object](docs/rules/prefer-to-be-object.md) | Prefer toBeObject() | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-to-be-truthy](docs/rules/prefer-to-be-truthy.md) | Suggest using `toBeTruthy` | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-to-contain](docs/rules/prefer-to-contain.md) | Prefer using toContain() | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-to-have-length](docs/rules/prefer-to-have-length.md) | Suggest using toHaveLength() | | ![badge-all-legacy][] | 🔧 | | | -| [prefer-todo](docs/rules/prefer-todo.md) | Suggest using `test.todo` | | ![badge-all-legacy][] | 🔧 | | | -| [require-hook](docs/rules/require-hook.md) | Require setup and teardown to be within a hook | | ![badge-all-legacy][] | | | | -| [require-local-test-context-for-concurrent-snapshots](docs/rules/require-local-test-context-for-concurrent-snapshots.md) | Require local Test Context for concurrent snapshot tests | ![badge-recommended-legacy][] | | | | | -| [require-to-throw-message](docs/rules/require-to-throw-message.md) | Require toThrow() to be called with an error message | | ![badge-all-legacy][] | | | | -| [require-top-level-describe](docs/rules/require-top-level-describe.md) | Enforce that all tests are in a top-level describe | | ![badge-all-legacy][] | | | | -| [valid-describe-callback](docs/rules/valid-describe-callback.md) | Enforce valid describe callback | ![badge-recommended-legacy][] | | | | | -| [valid-expect](docs/rules/valid-expect.md) | Enforce valid `expect()` usage | ![badge-recommended-legacy][] | | | | | -| [valid-title](docs/rules/valid-title.md) | Enforce valid titles | ![badge-recommended-legacy][] | | 🔧 | | | +| Name                                                | Description | 🔧 | 💡 | ❌ | +| :----------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------- | :- | :- | :- | +| [consistent-test-filename](docs/rules/consistent-test-filename.md) | forbidden .spec test file pattern | | | | +| [consistent-test-it](docs/rules/consistent-test-it.md) | Prefer test or it but not both | 🔧 | | | +| [expect-expect](docs/rules/expect-expect.md) | Enforce having expectation in test body | | | | +| [max-expects](docs/rules/max-expects.md) | Enforce a maximum number of expect per test | | | | +| [max-nested-describe](docs/rules/max-nested-describe.md) | Nested describe block should be less than set max value or default value | | | | +| [no-alias-methods](docs/rules/no-alias-methods.md) | Disallow alias methods | 🔧 | | | +| [no-commented-out-tests](docs/rules/no-commented-out-tests.md) | Disallow commented out tests | | | | +| [no-conditional-expect](docs/rules/no-conditional-expect.md) | Disallow conditional expects | | | | +| [no-conditional-in-test](docs/rules/no-conditional-in-test.md) | Disallow conditional tests | | | | +| [no-conditional-tests](docs/rules/no-conditional-tests.md) | Disallow conditional tests | | | | +| [no-disabled-tests](docs/rules/no-disabled-tests.md) | Disallow disabled tests | | | | +| [no-done-callback](docs/rules/no-done-callback.md) | Disallow using a callback in asynchronous tests and hooks | | 💡 | ❌ | +| [no-duplicate-hooks](docs/rules/no-duplicate-hooks.md) | Disallow duplicate hooks and teardown hooks | | | | +| [no-focused-tests](docs/rules/no-focused-tests.md) | Disallow focused tests | 🔧 | | | +| [no-hooks](docs/rules/no-hooks.md) | Disallow setup and teardown hooks | | | | +| [no-identical-title](docs/rules/no-identical-title.md) | Disallow identical titles | 🔧 | | | +| [no-import-node-test](docs/rules/no-import-node-test.md) | Disallow importing `node:test` | 🔧 | | | +| [no-interpolation-in-snapshots](docs/rules/no-interpolation-in-snapshots.md) | Disallow string interpolation in snapshots | 🔧 | | | +| [no-large-snapshots](docs/rules/no-large-snapshots.md) | Disallow large snapshots | | | | +| [no-mocks-import](docs/rules/no-mocks-import.md) | Disallow importing from __mocks__ directory | | | | +| [no-restricted-matchers](docs/rules/no-restricted-matchers.md) | Disallow the use of certain matchers | | | | +| [no-restricted-vi-methods](docs/rules/no-restricted-vi-methods.md) | Disallow specific `vi.` methods | | | | +| [no-standalone-expect](docs/rules/no-standalone-expect.md) | Disallow using `expect` outside of `it` or `test` blocks | | | | +| [no-test-prefixes](docs/rules/no-test-prefixes.md) | Disallow using `test` as a prefix | 🔧 | | | +| [no-test-return-statement](docs/rules/no-test-return-statement.md) | Disallow return statements in tests | | | | +| [prefer-called-with](docs/rules/prefer-called-with.md) | Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()` | 🔧 | | | +| [prefer-comparison-matcher](docs/rules/prefer-comparison-matcher.md) | Suggest using the built-in comparison matchers | 🔧 | | | +| [prefer-each](docs/rules/prefer-each.md) | Prefer `each` rather than manual loops | | | | +| [prefer-equality-matcher](docs/rules/prefer-equality-matcher.md) | Suggest using the built-in quality matchers | | 💡 | | +| [prefer-expect-assertions](docs/rules/prefer-expect-assertions.md) | Suggest using expect assertions instead of callbacks | | 💡 | | +| [prefer-expect-resolves](docs/rules/prefer-expect-resolves.md) | Suggest using `expect().resolves` over `expect(await ...)` syntax | 🔧 | | | +| [prefer-hooks-in-order](docs/rules/prefer-hooks-in-order.md) | Prefer having hooks in consistent order | | | | +| [prefer-hooks-on-top](docs/rules/prefer-hooks-on-top.md) | Suggest having hooks before any test cases | | | | +| [prefer-lowercase-title](docs/rules/prefer-lowercase-title.md) | Enforce lowercase titles | 🔧 | | | +| [prefer-mock-promise-shorthand](docs/rules/prefer-mock-promise-shorthand.md) | Prefer mock resolved/rejected shorthands for promises | 🔧 | | | +| [prefer-snapshot-hint](docs/rules/prefer-snapshot-hint.md) | Prefer including a hint with external snapshots | | | | +| [prefer-spy-on](docs/rules/prefer-spy-on.md) | Suggest using `vi.spyOn` | 🔧 | | | +| [prefer-strict-equal](docs/rules/prefer-strict-equal.md) | Prefer strict equal over equal | | 💡 | | +| [prefer-to-be](docs/rules/prefer-to-be.md) | Suggest using toBe() | 🔧 | | | +| [prefer-to-be-falsy](docs/rules/prefer-to-be-falsy.md) | Suggest using toBeFalsy() | 🔧 | | | +| [prefer-to-be-object](docs/rules/prefer-to-be-object.md) | Prefer toBeObject() | 🔧 | | | +| [prefer-to-be-truthy](docs/rules/prefer-to-be-truthy.md) | Suggest using `toBeTruthy` | 🔧 | | | +| [prefer-to-contain](docs/rules/prefer-to-contain.md) | Prefer using toContain() | 🔧 | | | +| [prefer-to-have-length](docs/rules/prefer-to-have-length.md) | Suggest using toHaveLength() | 🔧 | | | +| [prefer-todo](docs/rules/prefer-todo.md) | Suggest using `test.todo` | 🔧 | | | +| [require-hook](docs/rules/require-hook.md) | Require setup and teardown to be within a hook | | | | +| [require-local-test-context-for-concurrent-snapshots](docs/rules/require-local-test-context-for-concurrent-snapshots.md) | Require local Test Context for concurrent snapshot tests | | | | +| [require-to-throw-message](docs/rules/require-to-throw-message.md) | Require toThrow() to be called with an error message | | | | +| [require-top-level-describe](docs/rules/require-top-level-describe.md) | Enforce that all tests are in a top-level describe | | | | +| [valid-describe-callback](docs/rules/valid-describe-callback.md) | Enforce valid describe callback | | | | +| [valid-expect](docs/rules/valid-expect.md) | Enforce valid `expect()` usage | | | | +| [valid-title](docs/rules/valid-title.md) | Enforce valid titles | 🔧 | | | diff --git a/docs/rules/consistent-test-filename.md b/docs/rules/consistent-test-filename.md index b405ed8..9cc0b71 100644 --- a/docs/rules/consistent-test-filename.md +++ b/docs/rules/consistent-test-filename.md @@ -1,7 +1,5 @@ # Forbidden .spec test file pattern (`vitest/consistent-test-filename`) -⚠️ This rule _warns_ in the `all-legacy` config. - ### Rule Details diff --git a/docs/rules/consistent-test-it.md b/docs/rules/consistent-test-it.md index 2f73699..9439eb1 100644 --- a/docs/rules/consistent-test-it.md +++ b/docs/rules/consistent-test-it.md @@ -1,7 +1,5 @@ # Prefer test or it but not both (`vitest/consistent-test-it`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/expect-expect.md b/docs/rules/expect-expect.md index 4d98939..6cfac95 100644 --- a/docs/rules/expect-expect.md +++ b/docs/rules/expect-expect.md @@ -1,7 +1,5 @@ # Enforce having expectation in test body (`vitest/expect-expect`) -💼 This rule is enabled in the `recommended-legacy` config. - diff --git a/docs/rules/max-expects.md b/docs/rules/max-expects.md index bba1e4a..8a9be0b 100644 --- a/docs/rules/max-expects.md +++ b/docs/rules/max-expects.md @@ -1,7 +1,5 @@ # Enforce a maximum number of expect per test (`vitest/max-expects`) -⚠️ This rule _warns_ in the `all-legacy` config. - ### Rule Details diff --git a/docs/rules/max-nested-describe.md b/docs/rules/max-nested-describe.md index 52a93a6..fb084f2 100644 --- a/docs/rules/max-nested-describe.md +++ b/docs/rules/max-nested-describe.md @@ -1,7 +1,5 @@ # Nested describe block should be less than set max value or default value (`vitest/max-nested-describe`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-alias-methods.md b/docs/rules/no-alias-methods.md index 61d3d95..514491c 100644 --- a/docs/rules/no-alias-methods.md +++ b/docs/rules/no-alias-methods.md @@ -1,7 +1,5 @@ # Disallow alias methods (`vitest/no-alias-methods`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-commented-out-tests.md b/docs/rules/no-commented-out-tests.md index 8d69d1a..736b6c6 100644 --- a/docs/rules/no-commented-out-tests.md +++ b/docs/rules/no-commented-out-tests.md @@ -1,7 +1,5 @@ # Disallow commented out tests (`vitest/no-commented-out-tests`) -💼 This rule is enabled in the `recommended-legacy` config. - ## Rule Details diff --git a/docs/rules/no-conditional-expect.md b/docs/rules/no-conditional-expect.md index fe1b8f5..3421bdf 100644 --- a/docs/rules/no-conditional-expect.md +++ b/docs/rules/no-conditional-expect.md @@ -1,7 +1,5 @@ # Disallow conditional expects (`vitest/no-conditional-expect`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-conditional-in-test.md b/docs/rules/no-conditional-in-test.md index 0bd27e8..a40e173 100644 --- a/docs/rules/no-conditional-in-test.md +++ b/docs/rules/no-conditional-in-test.md @@ -1,7 +1,5 @@ # Disallow conditional tests (`vitest/no-conditional-in-test`) -⚠️ This rule _warns_ in the `all-legacy` config. - ### Rule Details diff --git a/docs/rules/no-conditional-tests.md b/docs/rules/no-conditional-tests.md index 6776144..c41b2e7 100644 --- a/docs/rules/no-conditional-tests.md +++ b/docs/rules/no-conditional-tests.md @@ -1,7 +1,5 @@ # Disallow conditional tests (`vitest/no-conditional-tests`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-disabled-tests.md b/docs/rules/no-disabled-tests.md index e074e0b..c70e726 100644 --- a/docs/rules/no-disabled-tests.md +++ b/docs/rules/no-disabled-tests.md @@ -1,7 +1,5 @@ # Disallow disabled tests (`vitest/no-disabled-tests`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-done-callback.md b/docs/rules/no-done-callback.md index d91915d..05daeb4 100644 --- a/docs/rules/no-done-callback.md +++ b/docs/rules/no-done-callback.md @@ -2,8 +2,6 @@ ❌ This rule is deprecated. -⚠️ This rule _warns_ in the `all-legacy` config. - 💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/no-duplicate-hooks.md b/docs/rules/no-duplicate-hooks.md index 24706e6..09c6550 100644 --- a/docs/rules/no-duplicate-hooks.md +++ b/docs/rules/no-duplicate-hooks.md @@ -1,7 +1,5 @@ # Disallow duplicate hooks and teardown hooks (`vitest/no-duplicate-hooks`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-focused-tests.md b/docs/rules/no-focused-tests.md index b012946..5b47607 100644 --- a/docs/rules/no-focused-tests.md +++ b/docs/rules/no-focused-tests.md @@ -1,7 +1,5 @@ # Disallow focused tests (`vitest/no-focused-tests`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-hooks.md b/docs/rules/no-hooks.md index 82bf092..676f489 100644 --- a/docs/rules/no-hooks.md +++ b/docs/rules/no-hooks.md @@ -1,7 +1,5 @@ # Disallow setup and teardown hooks (`vitest/no-hooks`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule details diff --git a/docs/rules/no-identical-title.md b/docs/rules/no-identical-title.md index 83f6db4..7ffa063 100644 --- a/docs/rules/no-identical-title.md +++ b/docs/rules/no-identical-title.md @@ -1,7 +1,5 @@ # Disallow identical titles (`vitest/no-identical-title`) -💼 This rule is enabled in the `recommended-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-import-node-test.md b/docs/rules/no-import-node-test.md index ac34cb3..6d4ecf6 100644 --- a/docs/rules/no-import-node-test.md +++ b/docs/rules/no-import-node-test.md @@ -1,7 +1,5 @@ # Disallow importing `node:test` (`vitest/no-import-node-test`) -💼 This rule is enabled in the `recommended-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-interpolation-in-snapshots.md b/docs/rules/no-interpolation-in-snapshots.md index 0573198..72027f9 100644 --- a/docs/rules/no-interpolation-in-snapshots.md +++ b/docs/rules/no-interpolation-in-snapshots.md @@ -1,7 +1,5 @@ # Disallow string interpolation in snapshots (`vitest/no-interpolation-in-snapshots`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-large-snapshots.md b/docs/rules/no-large-snapshots.md index 5a95e69..5d0315e 100644 --- a/docs/rules/no-large-snapshots.md +++ b/docs/rules/no-large-snapshots.md @@ -1,7 +1,5 @@ # Disallow large snapshots (`vitest/no-large-snapshots`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-mocks-import.md b/docs/rules/no-mocks-import.md index 2d302c3..1b912f7 100644 --- a/docs/rules/no-mocks-import.md +++ b/docs/rules/no-mocks-import.md @@ -1,7 +1,5 @@ # Disallow importing from __mocks__ directory (`vitest/no-mocks-import`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-restricted-matchers.md b/docs/rules/no-restricted-matchers.md index 08f8635..a9cc1bc 100644 --- a/docs/rules/no-restricted-matchers.md +++ b/docs/rules/no-restricted-matchers.md @@ -1,7 +1,5 @@ # Disallow the use of certain matchers (`vitest/no-restricted-matchers`) -⚠️ This rule _warns_ in the `all-legacy` config. - ### Rule Details diff --git a/docs/rules/no-restricted-vi-methods.md b/docs/rules/no-restricted-vi-methods.md index e3c6e1b..b4cf74b 100644 --- a/docs/rules/no-restricted-vi-methods.md +++ b/docs/rules/no-restricted-vi-methods.md @@ -1,7 +1,5 @@ # Disallow specific `vi.` methods (`vitest/no-restricted-vi-methods`) -⚠️ This rule _warns_ in the `all-legacy` config. - You may wish to restrict the use of specific `vi` methods. diff --git a/docs/rules/no-standalone-expect.md b/docs/rules/no-standalone-expect.md index 5da1aff..aab7492 100644 --- a/docs/rules/no-standalone-expect.md +++ b/docs/rules/no-standalone-expect.md @@ -1,7 +1,5 @@ # Disallow using `expect` outside of `it` or `test` blocks (`vitest/no-standalone-expect`) -⚠️ This rule _warns_ in the `all-legacy` config. - ## Rule Details diff --git a/docs/rules/no-test-prefixes.md b/docs/rules/no-test-prefixes.md index 2a935fc..35d68e4 100644 --- a/docs/rules/no-test-prefixes.md +++ b/docs/rules/no-test-prefixes.md @@ -1,7 +1,5 @@ # Disallow using `test` as a prefix (`vitest/no-test-prefixes`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-test-return-statement.md b/docs/rules/no-test-return-statement.md index 02015ae..314802a 100644 --- a/docs/rules/no-test-return-statement.md +++ b/docs/rules/no-test-return-statement.md @@ -1,7 +1,5 @@ # Disallow return statements in tests (`vitest/no-test-return-statement`) -⚠️ This rule _warns_ in the `all-legacy` config. - ### Rule Details diff --git a/docs/rules/prefer-called-with.md b/docs/rules/prefer-called-with.md index 79f4427..ce030b1 100644 --- a/docs/rules/prefer-called-with.md +++ b/docs/rules/prefer-called-with.md @@ -1,7 +1,5 @@ # Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()` (`vitest/prefer-called-with`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-comparison-matcher.md b/docs/rules/prefer-comparison-matcher.md index a73bee5..5dc6341 100644 --- a/docs/rules/prefer-comparison-matcher.md +++ b/docs/rules/prefer-comparison-matcher.md @@ -1,7 +1,5 @@ # Suggest using the built-in comparison matchers (`vitest/prefer-comparison-matcher`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-each.md b/docs/rules/prefer-each.md index 26fe000..df4e618 100644 --- a/docs/rules/prefer-each.md +++ b/docs/rules/prefer-each.md @@ -1,7 +1,5 @@ # Prefer `each` rather than manual loops (`vitest/prefer-each`) -⚠️ This rule _warns_ in the `all-legacy` config. - ```js diff --git a/docs/rules/prefer-equality-matcher.md b/docs/rules/prefer-equality-matcher.md index 7bb47bd..6145567 100644 --- a/docs/rules/prefer-equality-matcher.md +++ b/docs/rules/prefer-equality-matcher.md @@ -1,7 +1,5 @@ # Suggest using the built-in quality matchers (`vitest/prefer-equality-matcher`) -⚠️ This rule _warns_ in the `all-legacy` config. - 💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-expect-assertions.md b/docs/rules/prefer-expect-assertions.md index dca0851..c136e37 100644 --- a/docs/rules/prefer-expect-assertions.md +++ b/docs/rules/prefer-expect-assertions.md @@ -1,7 +1,5 @@ # Suggest using expect assertions instead of callbacks (`vitest/prefer-expect-assertions`) -⚠️ This rule _warns_ in the `all-legacy` config. - 💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-expect-resolves.md b/docs/rules/prefer-expect-resolves.md index 5f877be..56dd792 100644 --- a/docs/rules/prefer-expect-resolves.md +++ b/docs/rules/prefer-expect-resolves.md @@ -1,7 +1,5 @@ # Suggest using `expect().resolves` over `expect(await ...)` syntax (`vitest/prefer-expect-resolves`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-hooks-in-order.md b/docs/rules/prefer-hooks-in-order.md index 9fec502..0c8065c 100644 --- a/docs/rules/prefer-hooks-in-order.md +++ b/docs/rules/prefer-hooks-in-order.md @@ -1,7 +1,5 @@ # Prefer having hooks in consistent order (`vitest/prefer-hooks-in-order`) -⚠️ This rule _warns_ in the `all-legacy` config. - ```js diff --git a/docs/rules/prefer-hooks-on-top.md b/docs/rules/prefer-hooks-on-top.md index b636ae1..0962ac7 100644 --- a/docs/rules/prefer-hooks-on-top.md +++ b/docs/rules/prefer-hooks-on-top.md @@ -1,7 +1,5 @@ # Suggest having hooks before any test cases (`vitest/prefer-hooks-on-top`) -⚠️ This rule _warns_ in the `all-legacy` config. - ```ts // bad diff --git a/docs/rules/prefer-lowercase-title.md b/docs/rules/prefer-lowercase-title.md index 8a99035..b92401d 100644 --- a/docs/rules/prefer-lowercase-title.md +++ b/docs/rules/prefer-lowercase-title.md @@ -1,7 +1,5 @@ # Enforce lowercase titles (`vitest/prefer-lowercase-title`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-mock-promise-shorthand.md b/docs/rules/prefer-mock-promise-shorthand.md index 72c09f9..c869b06 100644 --- a/docs/rules/prefer-mock-promise-shorthand.md +++ b/docs/rules/prefer-mock-promise-shorthand.md @@ -1,7 +1,5 @@ # Prefer mock resolved/rejected shorthands for promises (`vitest/prefer-mock-promise-shorthand`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-snapshot-hint.md b/docs/rules/prefer-snapshot-hint.md index a24a147..3092926 100644 --- a/docs/rules/prefer-snapshot-hint.md +++ b/docs/rules/prefer-snapshot-hint.md @@ -1,7 +1,5 @@ # Prefer including a hint with external snapshots (`vitest/prefer-snapshot-hint`) -⚠️ This rule _warns_ in the `all-legacy` config. - When working with external snapshot matchers it's considered best practice to diff --git a/docs/rules/prefer-spy-on.md b/docs/rules/prefer-spy-on.md index cf3a99f..cd6d2a5 100644 --- a/docs/rules/prefer-spy-on.md +++ b/docs/rules/prefer-spy-on.md @@ -1,7 +1,5 @@ # Suggest using `vi.spyOn` (`vitest/prefer-spy-on`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-strict-equal.md b/docs/rules/prefer-strict-equal.md index c669e2b..c9803b6 100644 --- a/docs/rules/prefer-strict-equal.md +++ b/docs/rules/prefer-strict-equal.md @@ -1,7 +1,5 @@ # Prefer strict equal over equal (`vitest/prefer-strict-equal`) -⚠️ This rule _warns_ in the `all-legacy` config. - 💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). diff --git a/docs/rules/prefer-to-be-falsy.md b/docs/rules/prefer-to-be-falsy.md index f9a92be..fbf1a11 100644 --- a/docs/rules/prefer-to-be-falsy.md +++ b/docs/rules/prefer-to-be-falsy.md @@ -1,7 +1,5 @@ # Suggest using toBeFalsy() (`vitest/prefer-to-be-falsy`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-to-be-object.md b/docs/rules/prefer-to-be-object.md index 6312753..360f052 100644 --- a/docs/rules/prefer-to-be-object.md +++ b/docs/rules/prefer-to-be-object.md @@ -1,7 +1,5 @@ # Prefer toBeObject() (`vitest/prefer-to-be-object`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-to-be-truthy.md b/docs/rules/prefer-to-be-truthy.md index acd793e..46d7f7d 100644 --- a/docs/rules/prefer-to-be-truthy.md +++ b/docs/rules/prefer-to-be-truthy.md @@ -1,7 +1,5 @@ # Suggest using `toBeTruthy` (`vitest/prefer-to-be-truthy`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-to-be.md b/docs/rules/prefer-to-be.md index 4869d5f..425bf68 100644 --- a/docs/rules/prefer-to-be.md +++ b/docs/rules/prefer-to-be.md @@ -1,7 +1,5 @@ # Suggest using toBe() (`vitest/prefer-to-be`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-to-contain.md b/docs/rules/prefer-to-contain.md index 4b20f52..1beaa0c 100644 --- a/docs/rules/prefer-to-contain.md +++ b/docs/rules/prefer-to-contain.md @@ -1,7 +1,5 @@ # Prefer using toContain() (`vitest/prefer-to-contain`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-to-have-length.md b/docs/rules/prefer-to-have-length.md index 84889c8..23f0fa0 100644 --- a/docs/rules/prefer-to-have-length.md +++ b/docs/rules/prefer-to-have-length.md @@ -1,7 +1,5 @@ # Suggest using toHaveLength() (`vitest/prefer-to-have-length`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/prefer-todo.md b/docs/rules/prefer-todo.md index 48fb106..6c2edf5 100644 --- a/docs/rules/prefer-todo.md +++ b/docs/rules/prefer-todo.md @@ -1,7 +1,5 @@ # Suggest using `test.todo` (`vitest/prefer-todo`) -⚠️ This rule _warns_ in the `all-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/require-hook.md b/docs/rules/require-hook.md index 59311a5..d4f52f9 100644 --- a/docs/rules/require-hook.md +++ b/docs/rules/require-hook.md @@ -1,7 +1,5 @@ # Require setup and teardown to be within a hook (`vitest/require-hook`) -⚠️ This rule _warns_ in the `all-legacy` config. - It's common when writing tests to need to perform a particular setup work before and after a test suite run. Because Vitest executes all `describe` handlers in a test file _before_ it executes any of the actual tests, it's important to ensure setup and teardown work is done inside `before*` and `after*` handlers respectively, rather than inside the `describe` blocks. diff --git a/docs/rules/require-local-test-context-for-concurrent-snapshots.md b/docs/rules/require-local-test-context-for-concurrent-snapshots.md index 103b438..e56539e 100644 --- a/docs/rules/require-local-test-context-for-concurrent-snapshots.md +++ b/docs/rules/require-local-test-context-for-concurrent-snapshots.md @@ -1,7 +1,5 @@ # Require local Test Context for concurrent snapshot tests (`vitest/require-local-test-context-for-concurrent-snapshots`) -💼 This rule is enabled in the `recommended-legacy` config. - ## Rule details diff --git a/docs/rules/require-to-throw-message.md b/docs/rules/require-to-throw-message.md index 3f45849..afe2180 100644 --- a/docs/rules/require-to-throw-message.md +++ b/docs/rules/require-to-throw-message.md @@ -1,7 +1,5 @@ # Require toThrow() to be called with an error message (`vitest/require-to-throw-message`) -⚠️ This rule _warns_ in the `all-legacy` config. - This rule triggers a warning if `toThrow()` or `toThrowError()` is used without diff --git a/docs/rules/require-top-level-describe.md b/docs/rules/require-top-level-describe.md index c3e6408..3e3d7e2 100644 --- a/docs/rules/require-top-level-describe.md +++ b/docs/rules/require-top-level-describe.md @@ -1,7 +1,5 @@ # Enforce that all tests are in a top-level describe (`vitest/require-top-level-describe`) -⚠️ This rule _warns_ in the `all-legacy` config. - This rule triggers warning if a test case (`test` and `it`) or a hook (`beforeAll`, `beforeEach`, `afterEach`, `afterAll`) is not located in a top-level `describe` block. diff --git a/docs/rules/valid-describe-callback.md b/docs/rules/valid-describe-callback.md index c85a13b..f83de83 100644 --- a/docs/rules/valid-describe-callback.md +++ b/docs/rules/valid-describe-callback.md @@ -1,7 +1,5 @@ # Enforce valid describe callback (`vitest/valid-describe-callback`) -💼 This rule is enabled in the `recommended-legacy` config. - diff --git a/docs/rules/valid-expect.md b/docs/rules/valid-expect.md index cf14d3c..c5e742a 100644 --- a/docs/rules/valid-expect.md +++ b/docs/rules/valid-expect.md @@ -1,7 +1,5 @@ # Enforce valid `expect()` usage (`vitest/valid-expect`) -💼 This rule is enabled in the `recommended-legacy` config. - This rule triggers a warning if `expect` is called with no argument or with more than one argument. You change that behavior by setting the `minArgs` and `maxArgs` options. diff --git a/docs/rules/valid-title.md b/docs/rules/valid-title.md index 46689dc..547e950 100644 --- a/docs/rules/valid-title.md +++ b/docs/rules/valid-title.md @@ -1,7 +1,5 @@ # Enforce valid titles (`vitest/valid-title`) -💼 This rule is enabled in the `recommended-legacy` config. - 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).