Skip to content

Change Request: Add the option to define assertionOptions globally #20613

Description

@StyleShit

ESLint version

latest

What problem do you want to solve?

I want all my invalid tests to have requireLocation, but currently, I need to set it manually in every RuleTester.run

What do you think is the correct solution?

Add an API to define it globally by default, similar to RuleTester.setDefaultConfig(...)

Participation

  • I am willing to submit a pull request for this change.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

Related: #19921

Curious question - Why is it part of the RuleTester and not an eslint rule under eslint-plugin-eslint-plugin?

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusiondocumentationRelates to ESLint's documentation

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions