8000 Repo: Lint rule to ban dynamic syntax in generating tests · Issue #11052 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

Repo: Lint rule to ban dynamic syntax in generating tests #11052

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

Open
JoshuaKGoldberg opened this issue Apr 9, 2025 · 0 comments
Open

Repo: Lint rule to ban dynamic syntax in generating tests #11052

JoshuaKGoldberg opened this issue Apr 9, 2025 · 0 comments
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@JoshuaKGoldberg
Copy link
Member

Suggestion

Following #9691 and its ~dozen linked test cleanup issues, we'd like to statically enforce that folks don't add more auto-generated / dynamic tests. I bet this could be done with a lint rule to ban:

  • Putting function calls or other dynamic syntax inside RuleTester tests
  • Placing RuleTester tests anywhere other than the root of a file (except maybe ifs, for environment/version checks)

Additional Info

I could see this eventually being upstreamed into eslint-plugin-eslint-plugin...

💖

@JoshuaKGoldberg JoshuaKGoldberg added repo maintenance things to do with maintenance of the repo, and not with code/docs triage Waiting for team members to take a look labels Apr 9, 2025
@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

No branches or pull requests

1 participant
0