Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/rules/consistent-each-for.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `.each` or `.for` consistently (`vitest/consistent-each-for`)
# vitest/consistent-each-for

📝 Enforce using `.each` or `.for` consistently.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/consistent-test-filename.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Require test file pattern (`vitest/consistent-test-filename`)
# vitest/consistent-test-filename

📝 Require test file pattern.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/consistent-test-it.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using test or it but not both (`vitest/consistent-test-it`)
# vitest/consistent-test-it

📝 Enforce using test or it but not both.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/consistent-vitest-vi.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using vitest or vi but not both (`vitest/consistent-vitest-vi`)
# vitest/consistent-vitest-vi

📝 Enforce using vitest or vi but not both.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/expect-expect.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce having expectation in test body (`vitest/expect-expect`)
# vitest/expect-expect

📝 Enforce having expectation in test body.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/hoisted-apis-on-top.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce hoisted APIs to be on top of the file (`vitest/hoisted-apis-on-top`)
# vitest/hoisted-apis-on-top

📝 Enforce hoisted APIs to be on top of the file.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/max-expects.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce a maximum number of expect per test (`vitest/max-expects`)
# vitest/max-expects

📝 Enforce a maximum number of expect per test.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/max-nested-describe.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Require describe block to be less than set max value or default value (`vitest/max-nested-describe`)
# vitest/max-nested-describe

📝 Require describe block to be less than set max value or default value.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-alias-methods.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow alias methods (`vitest/no-alias-methods`)
# vitest/no-alias-methods

📝 Disallow alias methods.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-commented-out-tests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow commented out tests (`vitest/no-commented-out-tests`)
# vitest/no-commented-out-tests

📝 Disallow commented out tests.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-conditional-expect.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow conditional expects (`vitest/no-conditional-expect`)
# vitest/no-conditional-expect

📝 Disallow conditional expects.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-conditional-in-test.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow conditional tests (`vitest/no-conditional-in-test`)
# vitest/no-conditional-in-test

📝 Disallow conditional tests.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-conditional-tests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow conditional tests (`vitest/no-conditional-tests`)
# vitest/no-conditional-tests

📝 Disallow conditional tests.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-disabled-tests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow disabled tests (`vitest/no-disabled-tests`)
# vitest/no-disabled-tests

📝 Disallow disabled tests.

⚠️ This rule _warns_ in the following configs: 🌐 `all`, ✅ `recommended`.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-done-callback.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow using a callback in asynchronous tests and hooks (`vitest/no-done-callback`)
# vitest/no-done-callback

📝 Disallow using a callback in asynchronous tests and hooks.

❌ This rule is deprecated.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-duplicate-hooks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow duplicate hooks and teardown hooks (`vitest/no-duplicate-hooks`)
# vitest/no-duplicate-hooks

📝 Disallow duplicate hooks and teardown hooks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-focused-tests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow focused tests (`vitest/no-focused-tests`)
# vitest/no-focused-tests

📝 Disallow focused tests.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-hooks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow setup and teardown hooks (`vitest/no-hooks`)
# vitest/no-hooks

📝 Disallow setup and teardown hooks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-identical-title.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow identical titles (`vitest/no-identical-title`)
# vitest/no-identical-title

📝 Disallow identical titles.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-import-node-test.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow importing `node:test` (`vitest/no-import-node-test`)
# vitest/no-import-node-test

📝 Disallow importing `node:test`.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-importing-vitest-globals.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow importing Vitest globals (`vitest/no-importing-vitest-globals`)
# vitest/no-importing-vitest-globals

📝 Disallow importing Vitest globals.

🚫 This rule is _disabled_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-interpolation-in-snapshots.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow string interpolation in snapshots (`vitest/no-interpolation-in-snapshots`)
# vitest/no-interpolation-in-snapshots

📝 Disallow string interpolation in snapshots.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-large-snapshots.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow large snapshots (`vitest/no-large-snapshots`)
# vitest/no-large-snapshots

📝 Disallow large snapshots.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-mocks-import.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow importing from **mocks** directory (`vitest/no-mocks-import`)
# vitest/no-mocks-import

📝 Disallow importing from **mocks** directory.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-restricted-matchers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow the use of certain matchers (`vitest/no-restricted-matchers`)
# vitest/no-restricted-matchers

📝 Disallow the use of certain matchers.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-restricted-vi-methods.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow specific `vi.` methods (`vitest/no-restricted-vi-methods`)
# vitest/no-restricted-vi-methods

📝 Disallow specific `vi.` methods.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-standalone-expect.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow using `expect` outside of `it` or `test` blocks (`vitest/no-standalone-expect`)
# vitest/no-standalone-expect

📝 Disallow using `expect` outside of `it` or `test` blocks.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-test-prefixes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow using the `f` and `x` prefixes in favour of `.only` and `.skip` (`vitest/no-test-prefixes`)
# vitest/no-test-prefixes

📝 Disallow using the `f` and `x` prefixes in favour of `.only` and `.skip`.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-test-return-statement.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow return statements in tests (`vitest/no-test-return-statement`)
# vitest/no-test-return-statement

📝 Disallow return statements in tests.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-unneeded-async-expect-function.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow unnecessary async function wrapper for expected promises (`vitest/no-unneeded-async-expect-function`)
# vitest/no-unneeded-async-expect-function

📝 Disallow unnecessary async function wrapper for expected promises.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-after-all-blocks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around `afterAll` blocks (`vitest/padding-around-after-all-blocks`)
# vitest/padding-around-after-all-blocks

📝 Enforce padding around `afterAll` blocks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-after-each-blocks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around `afterEach` blocks (`vitest/padding-around-after-each-blocks`)
# vitest/padding-around-after-each-blocks

📝 Enforce padding around `afterEach` blocks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-all.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around vitest functions (`vitest/padding-around-all`)
# vitest/padding-around-all

📝 Enforce padding around vitest functions.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-before-all-blocks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around `beforeAll` blocks (`vitest/padding-around-before-all-blocks`)
# vitest/padding-around-before-all-blocks

📝 Enforce padding around `beforeAll` blocks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-before-each-blocks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around `beforeEach` blocks (`vitest/padding-around-before-each-blocks`)
# vitest/padding-around-before-each-blocks

📝 Enforce padding around `beforeEach` blocks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-describe-blocks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around `describe` blocks (`vitest/padding-around-describe-blocks`)
# vitest/padding-around-describe-blocks

📝 Enforce padding around `describe` blocks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-expect-groups.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around `expect` groups (`vitest/padding-around-expect-groups`)
# vitest/padding-around-expect-groups

📝 Enforce padding around `expect` groups.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/padding-around-test-blocks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce padding around `test` blocks (`vitest/padding-around-test-blocks`)
# vitest/padding-around-test-blocks

📝 Enforce padding around `test` blocks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-called-exactly-once-with.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith` (`vitest/prefer-called-exactly-once-with`)
# vitest/prefer-called-exactly-once-with

📝 Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`.

💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-called-once.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()` (`vitest/prefer-called-once`)
# vitest/prefer-called-once

📝 Enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`.

🚫 This rule is _disabled_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-called-times.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)` (`vitest/prefer-called-times`)
# vitest/prefer-called-times

📝 Enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-called-with.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()` (`vitest/prefer-called-with`)
# vitest/prefer-called-with

📝 Enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-comparison-matcher.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using the built-in comparison matchers (`vitest/prefer-comparison-matcher`)
# vitest/prefer-comparison-matcher

📝 Enforce using the built-in comparison matchers.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-describe-function-title.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using a function as a describe title over an equivalent string (`vitest/prefer-describe-function-title`)
# vitest/prefer-describe-function-title

📝 Enforce using a function as a describe title over an equivalent string.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-each.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `each` rather than manual loops (`vitest/prefer-each`)
# vitest/prefer-each

📝 Enforce using `each` rather than manual loops.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-equality-matcher.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using the built-in equality matchers (`vitest/prefer-equality-matcher`)
# vitest/prefer-equality-matcher

📝 Enforce using the built-in equality matchers.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-expect-assertions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using expect assertions instead of callbacks (`vitest/prefer-expect-assertions`)
# vitest/prefer-expect-assertions

📝 Enforce using expect assertions instead of callbacks.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-expect-resolves.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `expect().resolves` over `expect(await ...)` syntax (`vitest/prefer-expect-resolves`)
# vitest/prefer-expect-resolves

📝 Enforce using `expect().resolves` over `expect(await ...)` syntax.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-expect-type-of.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce using `expectTypeOf` instead of `expect(typeof ...)` (`vitest/prefer-expect-type-of`)
# vitest/prefer-expect-type-of

📝 Enforce using `expectTypeOf` instead of `expect(typeof ...)`.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/prefer-hooks-in-order.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce having hooks in consistent order (`vitest/prefer-hooks-in-order`)
# vitest/prefer-hooks-in-order

📝 Enforce having hooks in consistent order.

⚠️ This rule _warns_ in the 🌐 `all` config.

Expand Down
Loading
Loading