Relying on "standard JS style" is as reliable as relying on ASI without knowing how it works.
If what you are saying is with "standard JS style" you will never add a newline after return, then I can also assume with "standard JS style" you will not:
- start a line with ++ or --
- start a line with a regex literal
- split a for statement into separate lines
So, the only issue you need to be aware of when writing semicolon-less javascript is when you start a new line with ( or [. Easy enough to remember, no?
I've personally been writing semicolon-less JS for almost two years now, and this one simple rule has been more than enough.
If what you are saying is with "standard JS style" you will never add a newline after return, then I can also assume with "standard JS style" you will not:
- start a line with ++ or --
- start a line with a regex literal
- split a for statement into separate lines
So, the only issue you need to be aware of when writing semicolon-less javascript is when you start a new line with ( or [. Easy enough to remember, no?
I've personally been writing semicolon-less JS for almost two years now, and this one simple rule has been more than enough.