Comments (2)
Well. Knowing to use ;
before (
and [
if they come after a \n
, and not to do return\nvalue
is not necessarily something to be proud of. I'd rather have code be consistent (just using ;
everywhere), than having to bother following those rules.
Not really FUD, the rules are obtuse. The solution proposed by standard
, where the linter watches for these corner cases and tells you to patch them is pretty elegant, though. You're welcome to create a pull request citing this alternative
from js.
That's a rather over-complicated way of saying "never start a line with ( or [ "... The specifics aren't overly important in that regard as the simple and easy to remember rule would prevent the specific "gotchas!" although the specifics are still good to know to better your understanding of the Javascript parser.
Code would be consistent with or without ;
as long as it picked one style and stuck with it. ;)
Again, I don't care which people decide to use. So long as the code base is consistent. I actually prefer using ;
, however my reasoning to do so is aesthetic in purpose rather than being based on FUD (we're going to have to agree to disagree on the information surrounding ASI being FUD or not it seems)
I'll submit a PR as suggested sometime tomorrow that proposes using a linter to watch for the "gotcha!" as an easy-fix to any possible ASI issues of not using semi-colons.
from js.
Related Issues (20)
- Question HOT 1
- [discussing] can ternary operators be used instead of if/else? HOT 4
- sdlkjsflksj HOT 1
- Comparison operators HOT 1
- Adding New Feature in Doc HOT 2
- Hello
- .
- ζΆι.js
- Js
- link[29] james.padolsey.com in README.md 404
- 001
- 8
- 1
- Hello
- Can I mix colors by using js? HOT 1
- Let count =0;
- My Portfolio
- https://t.me/zeldychecker
- ok
- my yiwen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js.