Re: [jslint] Re: Enhancement Request: Identifier length restriction
> For me personally it is exceedingly annoying to encounter code thatBeautify the code using a JSLint white space compatible algorithm. Then
> has nothing but 1 to 2 char identifiers and no or poor documentation.
perform the following replacements:
- Manually change the name of the function where it is declared
- Find and replace on the following after ensure that each of the
following is not in quotes:
+ space + variable name + left paren
ex: " a("
+ space + variable name + comma
ex: " a,"
+ space + variable name + right paren
ex: " a)"
+ space + variable name + right square brace
ex: " a]"
+ space + variable name + right curly brace
ex: " a}"
- Same as above except find and replace on a left square brace
instead of opening paren
For object literals
- Same as above except find and replace on a left curly brace instead
of opening paren
For value literals (strings and numbers)
- Same as above except find and replace on a space, instead of an
You could write a JS application to do all of this for you. This would
be the best bet because you are not going to influence how other people
write code their own code. The only code that you can effectively
influence is the code under your own responsibility.