-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Closed
Copy link
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
What rule do you want to change?
accessor-pairs and grouped-accessor-pairs
What change do you want to make?
Generate more warnings
How do you think the change should be implemented?
A new option
Example code
// accessor-pairs
interface I {
get prop(): any
}
// grouped-accessor-pairs
interface I {
get prop(): any
propInBetween: true
set prop(value: any): any
}
What does the rule currently do for this code?
Nothing as only object properties and class members are linted.
What will the rule do after it's changed?
Also check accessors in types (TSTypeLiteral
and TSInterfaceDeclaration
) if enabled by an option (similar to enforceForClassMembers
).
Participation
- I am willing to submit a pull request to implement this change.
Additional comments
As more core rules are now TypeScript-aware, I hope these changes are welcome as typescript-eslint
does not offer extension rules for the accessor rules.
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Type
Projects
Status
Complete