-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
TSlint member-access supports following config:
- "no-public" forbids public accessibility to be specified, because this is the default.
- "check-accessor" enforces explicit visibility on get/set accessors
- "check-constructor" enforces explicit visibility on constructors
- "check-parameter-property" enforces explicit visibility on parameter properties
Currently this rule follows only all or nothing rule. It would be nice to implement at least no-public
config to prevent devs to use public
which is a default in TS.
Repro
{
"rules": {
"@typescript-eslint/explicit-member-accessibility": ["error", "no-public"]
}
}
class Test {
// Expect lint error
public render(){
return `<div>Hello</div>`
}
private handleClick = () => { /*...*/ }
}
gavinbarron, spalger, jack-sf, standy, kachkaev and 2 more
Metadata
Metadata
Assignees
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin