Skip to content

☂️ eslint-plugin-vitest #4656

@Boshen

Description

@Boshen

Warning

This comment is maintained by CI. Do not edit this comment directly.
To update comment template, see https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules

This is the tracking issue for @vitest/eslint-plugin.

There are 79(+ 1 deprecated) rules.

  • 3/17 recommended rules are remaining as TODO
    • 1 of which have pending fixes
  • 20/62 not recommended rules are remaining as TODO

To get started, run the following command:

just new-vitest-rule <RULE_NAME>

Then register the rule in crates/oxc_linter/src/rules.rs and also declare_all_lint_rules at the bottom.

Recommended rules

✅: 14, 🚫: 0, ⏳: 1 / total: 17
Status Name Rationale
vitest/expect-expect
vitest/no-commented-out-tests
vitest/no-conditional-expect
vitest/no-disabled-tests
vitest/no-focused-tests
vitest/no-identical-title
vitest/no-import-node-test
vitest/no-interpolation-in-snapshots
vitest/no-mocks-import
vitest/no-standalone-expect
vitest/no-unneeded-async-expect-function
vitest/prefer-called-exactly-once-with
✅⏳ vitest/require-local-test-context-for-concurrent-snapshots
vitest/valid-describe-callback
vitest/valid-expect
vitest/valid-expect-in-promise
vitest/valid-title

✅ = Implemented, 🚫 = Not intending to implement, ⏳ = Fix pending

Not recommended rules

✅: 41, 🚫: 1, ⏳: 0 / total: 62
Status Name Rationale
vitest/consistent-each-for
vitest/consistent-test-filename
vitest/consistent-test-it
vitest/consistent-vitest-vi
vitest/hoisted-apis-on-top
vitest/max-expects
vitest/max-nested-describe
vitest/no-alias-methods
vitest/no-conditional-in-test
vitest/no-conditional-tests
vitest/no-duplicate-hooks
vitest/no-hooks
vitest/no-importing-vitest-globals
vitest/no-large-snapshots
vitest/no-restricted-matchers
vitest/no-restricted-vi-methods
vitest/no-test-prefixes
vitest/no-test-return-statement
vitest/padding-around-after-all-blocks
vitest/padding-around-after-each-blocks
vitest/padding-around-all
vitest/padding-around-before-all-blocks
vitest/padding-around-before-each-blocks
vitest/padding-around-describe-blocks
vitest/padding-around-expect-groups
vitest/padding-around-test-blocks
vitest/prefer-called-once
vitest/prefer-called-times
vitest/prefer-called-with
vitest/prefer-comparison-matcher
vitest/prefer-describe-function-title
vitest/prefer-each
vitest/prefer-equality-matcher
vitest/prefer-expect-assertions
vitest/prefer-expect-resolves
vitest/prefer-expect-type-of
vitest/prefer-hooks-in-order
vitest/prefer-hooks-on-top
vitest/prefer-import-in-mock
vitest/prefer-importing-vitest-globals
vitest/prefer-lowercase-title
vitest/prefer-mock-promise-shorthand
vitest/prefer-mock-return-shorthand
vitest/prefer-snapshot-hint
vitest/prefer-spy-on
vitest/prefer-strict-boolean-matchers
vitest/prefer-strict-equal
vitest/prefer-to-be
vitest/prefer-to-be-falsy
vitest/prefer-to-be-object
vitest/prefer-to-be-truthy
vitest/prefer-to-contain
vitest/prefer-to-have-been-called-times
vitest/prefer-to-have-length
vitest/prefer-todo
🚫 vitest/prefer-vi-mocked Requires type information. Not currently possible to implement in oxlint.
vitest/require-awaited-expect-poll
vitest/require-hook
vitest/require-mock-type-parameters
vitest/require-to-throw-message
vitest/require-top-level-describe
vitest/warn-todo

✅ = Implemented, 🚫 = Not intending to implement, ⏳ = Fix pending

Deprecated rules

✅: 0, 🚫: 1, ⏳: 0 / total: 1
Status Name Rationale
🚫 vitest/no-done-callback Deprecated in eslint-plugin-vitest.

✅ = Implemented, 🚫 = Not intending to implement, ⏳ = Fix pending

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linterArea - LinterC-enhancementCategory - New feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions