-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor to a consistent syntax #5
Comments
Haha - can you tell I'm just starting to learn Javascript development? 😉. Lets go with ES2015 (as long as that won't have too many compatibility issues??). Happy to hear your thoughts on what would be more appropriate though. I must of been thinking |
Personally I've had more experience with standard JavaScript. But I think ES2015 has a nicer(?) syntax and more functionality. As far as I know though, ES2015/16 has to be transpiled to ES5 for browser compatibility. (I'm not sure what the support is in Chrome). As this uses the new web extension format, it depends if you want to also support Firefox too as they can use most of the same content for extensions. I guess to be honest it's what you're comfortable, as the primary contributor. 👍 |
This change alters some ES2015 syntax: - Use backticks for string concatenation containing variables - Move uses of `let` onto one line per definition - Change to use arrow function See: GitHub issue hill#5 See: https://goo.gl/8ZeEdS
I've had a go over here in a feature branch: feature/es2015-refactor It looks like it doesn't need transpiling so far. sigh Interestingly, although it doesn't need semicolons, it still seems to be recommended by linters, just not by Google standards. |
@hill, also, this is unrelated to the issue, will you be adding tags for each release? i.e. git tag v0.1.0 5f2eb00d4ee415e243efdd8a9df6c364d03fd1e2
git tag v0.2.0 676ae08986a66cbde9c32807ac4b6ecc940e3585 |
@pxgamer yep that branch looks much cleaner! If it doesn't need transpiling then let's go with that. I haven't used tags before - I'll certainly look into it. Is there a particular benefit it provides? |
@hill, if you're happy with it, I'll create a pull request 👍 And regarding tags, the only reason was that if there is a stable version, it allows you to see what changes were made per version, and also download a |
A couple of things for this, but mainly picking which type of JavaScript syntax to use.
I noticed that there is a use of
let
at the top, which is ES2015 and thenvar
throughout the script, which is standard JavaScript.Which syntax would you prefer to use?
The text was updated successfully, but these errors were encountered: