TSLINT - Private variable rule

Asked

Viewed 41 times

1

Is there any rule in tslint to define what a private variable needs to have _ (underline) before the name?

Example: private _router: Router,

  • This might help you: http://crockford.com/javascript/, has a topic Private Members in Javascript

  • Oops, I don’t understand how this can help me. It might be clearer?

  • It may be that I have misunderstood, despite being very simple the question, pardon...

  • No problem. I need some lint rule, to validate and inform that a private variable has to have_beforethe name.

1 answer

0

I believe that this rule has not yet been implemented in tslint. From what I’ve researched, there’s an open site for the repository on Github. So I suggest you track it:

https://github.com/palantir/tslint/issues/1489

I hope I’ve helped!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.