Closed as not planned
Closed as not planned
Copy link
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
Relevant Package
utils
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
Right now, RuleContext
doesn't provide defaults for its type parameters:
typescript-eslint/packages/utils/src/ts-eslint/Rule.ts
Lines 175 to 178 in 99a026f
That means if you want to describe any arbitrary rule context the way e.g. #8146 does, you have to explicitly type out RuleContext<string, unknown[]>
. It's a little inconvenient.
Proposal: let's add defaults to make referring to an "unknown" rule context a little easier?
interface RuleContext<
TMessageIds extends string = string,
TOptions extends readonly unknown[] = unknown[],
> {
Additional Info
#8148 is a draft PR showing the changes internally.
Metadata
Metadata
Assignees
Labels
New feature or requestNew feature or requestWaiting for team members to take a lookWaiting for team members to take a look