Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

☂️ eslint-plugin-vitest #4656

Open
Boshen opened this issue Aug 5, 2024 · 4 comments
Open

☂️ eslint-plugin-vitest #4656

Boshen opened this issue Aug 5, 2024 · 4 comments
Labels
A-linter Area - Linter C-enhancement Category - New feature or request

Comments

@Boshen
Copy link
Member

Boshen commented Aug 5, 2024

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 tracking issue for eslint-plugin-vitest.

There are 51(+ 1 deprecated) rules.

  • 6/8 recommended rules are remaining as TODO
  • 38/43 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

✨: 2, 🚫: 0 / total: 8
Status Name Docs
vitest/no-identical-title https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md
vitest/expect-expect https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
vitest/no-commented-out-tests https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md
vitest/no-import-node-test https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
vitest/valid-title https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
vitest/valid-expect https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md
vitest/require-local-test-context-for-concurrent-snapshots https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
vitest/valid-describe-callback https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md

✨ = Implemented, 🚫 = Not supported

Not recommended rules

✨: 5, 🚫: 0 / total: 43
Status Name Docs
vitest/prefer-lowercase-title https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md
vitest/max-nested-describe https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md
vitest/no-focused-tests https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md
vitest/no-conditional-tests https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md
vitest/consistent-test-it https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md
vitest/prefer-to-be https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md
vitest/no-hooks https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md
vitest/no-restricted-vi-methods https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md
vitest/consistent-test-filename https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
vitest/max-expects https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
vitest/no-alias-methods https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md
vitest/no-conditional-expect https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md
vitest/no-conditional-in-test https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md
vitest/no-disabled-tests https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md
vitest/no-duplicate-hooks https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md
vitest/no-large-snapshots https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md
vitest/no-interpolation-in-snapshots https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md
vitest/no-mocks-import https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md
vitest/no-restricted-matchers https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md
vitest/no-standalone-expect https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md
vitest/no-test-prefixes https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md
vitest/no-test-return-statement https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
vitest/prefer-called-with https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
vitest/prefer-to-be-falsy https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md
vitest/prefer-to-be-object https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md
vitest/prefer-to-be-truthy https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md
vitest/prefer-to-have-length https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
vitest/prefer-equality-matcher https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
vitest/prefer-strict-equal https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md
vitest/prefer-expect-resolves https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
vitest/prefer-each https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md
vitest/prefer-hooks-on-top https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
vitest/prefer-hooks-in-order https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
vitest/prefer-mock-promise-shorthand https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
vitest/prefer-snapshot-hint https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
vitest/require-top-level-describe https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md
vitest/require-to-throw-message https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
vitest/require-hook https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
vitest/prefer-todo https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md
vitest/prefer-spy-on https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md
vitest/prefer-comparison-matcher https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md
vitest/prefer-to-contain https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
vitest/prefer-expect-assertions https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-assertions.md

✨ = Implemented, 🚫 = Not supported

Deprecated rules

✨: 0, 🚫: 0 / total: 1
Status Name Docs
vitest/no-done-callback https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md

✨ = Implemented, 🚫 = Not supported

@Boshen Boshen added the C-enhancement Category - New feature or request label Aug 5, 2024
@DonIsaac DonIsaac added the A-linter Area - Linter label Aug 5, 2024
@shulaoda
Copy link
Contributor

shulaoda commented Aug 8, 2024

Does vitest/no-commented-out-tests seem to be duplicated with jest/no-commented-out-tests?

@Boshen
Copy link
Member Author

Boshen commented Aug 8, 2024

We need to map jest to vitest rules in tasks/lint_rules, they have the same implementation.

@shulaoda
Copy link
Contributor

shulaoda commented Aug 8, 2024

Justfile seems to not have the command just new-vitest-rule. Should we add it or use just new-jest-rule? @Boshen

@mysteryven
Copy link
Member

mysteryven commented Aug 8, 2024

Justfile seems to not have the command just new-vitest-rule. Should we add it or use just new-jest-rule?

Add this is welcome.

mysteryven pushed a commit that referenced this issue Aug 8, 2024
mysteryven added a commit that referenced this issue Aug 20, 2024
…xt-for-concurrent-snapshots (#4951)

Related to #4656

---------

Co-authored-by: Wang Wenzhe <mysteryven@gmail.com>
DonIsaac added a commit that referenced this issue Aug 26, 2024
Related to #4656

---------

Co-authored-by: Don Isaac <donald.isaac@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants