Local naming convention with JS Lint

The industry standard for most locally restricted variables is "_", but JS Lint complains about it.

Does anyone else have a naming convention for locally restricted variables in a JavaScript file

+3
source share
2 answers

We are developing in .NET here and have made the simple decision to standardize on a simple convention. C # and JavaScript code should be as close to each other as possible.

Therefore, camelCase for local variables, TitleCase for types, etc.

This really worked well, since there is no abrupt transition between the two languages, and it does an excellent job of distinguishing our code from our own JS code and from third-party libraries.

My 2 cents.

P.S. StyleCop, FWIW. , , JSLint .

+2

All Articles