Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd JSHint configuration file and apply many suggestions #346
Conversation
evancz
reviewed
Aug 13, 2015
View changes
src/Native/Graphics/Element.js
| @@ -334,6 +334,7 @@ Elm.Native.Graphics.Element.make = function(localRuntime) { | ||
| case 'Z': | ||
| transform = 'translateX(' + ((-w/2)|0) + 'px) '; | ||
| break; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Aug 13, 2015
Member
These actually are supposed to fall through. Only excuse I can make is that this was written by a younger me ;P
evancz
Aug 13, 2015
Member
These actually are supposed to fall through. Only excuse I can make is that this was written by a younger me ;P
evancz
reviewed
Aug 14, 2015
| var elmValue = decoder(value[key]); | ||
| var pair = Utils.Tuple2(key, elmValue); | ||
| keyValuePairs = List.Cons(pair, keyValuePairs); | ||
| if (value.hasOwnProperty(key)) { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Aug 14, 2015
Member
Why does this make this code better? Seems like it'll take some extra time and either (a) not protect us from anything because of how the Elm API is designed or (b) lead to weird results where we aren't allowed to grab fields that we want. Can you explain more about this?
evancz
Aug 14, 2015
Member
Why does this make this code better? Seems like it'll take some extra time and either (a) not protect us from anything because of how the Elm API is designed or (b) lead to weird results where we aren't allowed to grab fields that we want. Can you explain more about this?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Raynos
Aug 14, 2015
function Foo() {
this.myField = null;
}
Foo.prototype.doAThing = function doAThing() {}
var f = new Foo();
for (var k in f) console.log(k); // myField, doAThingUsing a for var in loop on an object with methods is unsafe.
Raynos
Aug 14, 2015
function Foo() {
this.myField = null;
}
Foo.prototype.doAThing = function doAThing() {}
var f = new Foo();
for (var k in f) console.log(k); // myField, doAThingUsing a for var in loop on an object with methods is unsafe.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Aug 14, 2015
Member
Sure, but decoders won't let functions through, so that case never happens. So that's covered by (a)
evancz
Aug 14, 2015
Member
Sure, but decoders won't let functions through, so that case never happens. So that's covered by (a)
evancz
merged commit 400aba0
into
elm:master
Aug 14, 2015
1 check passed
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Aug 14, 2015
Member
If the hasOwnProperty stuff is better, can you do a separate PR to add it back in? I removed it because I wasn't sure how it changed the existing behavior and I have not heard of folks with problems there.
|
If the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Otherwise, nice work, thank you! :D |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Aug 14, 2015
Member
Also, is it possible to ask for tab indentation only? Right now it says 2, does that mean it wants spaces?
|
Also, is it possible to ask for tab indentation only? Right now it says 2, does that mean it wants spaces? |
Dandandan commentedAug 13, 2015
No description provided.