Skip to content

feat(eslint-plugin-jest): add no-focused-tests rule#577

Open
eryue0220 wants to merge 17 commits intoweb-infra-dev:mainfrom
eryue0220:feat/eslint-plugin-jest-no-focused-tests
Open

feat(eslint-plugin-jest): add no-focused-tests rule#577
eryue0220 wants to merge 17 commits intoweb-infra-dev:mainfrom
eryue0220:feat/eslint-plugin-jest-no-focused-tests

Conversation

@eryue0220
Copy link
Copy Markdown
Contributor

Summary

Port no-focused-tests from eslint-plugin-jest to rslint.

Related Links

Tracking issue: #476
eslint-plugin-jest/no-focused-tests doc code

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Others

This pr is based on #572 as well

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a Jest plugin for the linter, implementing rules such as no-disabled-tests, no-focused-tests, no-hooks, and valid-describe-callback. The implementation includes AST utilities for parsing Jest function calls and a TypeScript-based testing framework. Feedback indicates that the endColumn in no-focused-tests test cases is incorrect for aliased functions, as it should only target the specific character being modified. Additionally, the settings field in the test runner is currently not passed to the linting function, which limits the ability to test configurations like global aliases.

@eryue0220 eryue0220 marked this pull request as draft March 31, 2026 03:41
@eryue0220 eryue0220 marked this pull request as ready for review April 1, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant