We should make it mandatory to always add an explicit member access declaration.
I see a lot of developers leave out the access declaration, which makes something public by default. I think you should only set something to public when it has to be public. Otherwise it should be private (or protected when needed). By enabling this rule we force developers to think about the member accessibility.
We should make it mandatory to always add an explicit member access declaration.
I see a lot of developers leave out the access declaration, which makes something
public
by default. I think you should only set something to public when it has to be public. Otherwise it should beprivate
(orprotected
when needed). By enabling this rule we force developers to think about the member accessibility.See https://palantir.github.io/tslint/rules/member-access/