Permalink
Browse files

๐Ÿ”ฅ pesky semicolons that have crept in over time

1 parent 8d52130 commit 5420985f9ecc10a4c36c220349bf04716711fd16 @mislav mislav committed Jul 13, 2016
Showing with 30 additions and 30 deletions.
  1. +1 โˆ’1 examples/snow/index.html
  2. +2 โˆ’2 make
  3. +1 โˆ’1 src/callbacks.js
  4. +1 โˆ’1 src/ie.js
  5. +2 โˆ’2 src/touch.js
  6. +1 โˆ’1 test/callbacks.html
  7. +2 โˆ’2 test/deferred.html
  8. +4 โˆ’4 test/detect.html
  9. +2 โˆ’2 test/event.html
  10. +1 โˆ’1 test/fixtures/ajax_load_javascript.js
  11. +1 โˆ’1 test/fixtures/ajax_load_selector_javascript.html
  12. +2 โˆ’2 test/functional/touch.html
  13. +10 โˆ’10 test/zepto.html
@@ -36,7 +36,7 @@
addFlake()
el.remove() // garbage collect
}
- );
+ )
}
while(i--) addFlake()
View
@@ -92,7 +92,7 @@ minify = (source_code) ->
compressor = uglify.Compressor()
ast = uglify.parse(source_code)
ast.figure_out_scope()
- ast.compute_char_frequency();
- ast.mangle_names();
+ ast.compute_char_frequency()
+ ast.mangle_names()
ast = ast.transform(compressor)
return ast.print_to_string()
View
@@ -93,7 +93,7 @@
return !list
},
lock: function() {
- stack = undefined;
+ stack = undefined
if (!memory) Callbacks.disable()
return this
},
View
@@ -8,7 +8,7 @@
try {
getComputedStyle(undefined)
} catch(e) {
- var nativeGetComputedStyle = getComputedStyle;
+ var nativeGetComputedStyle = getComputedStyle
window.getComputedStyle = function(element, pseudoElement){
try {
return nativeGetComputedStyle(element, pseudoElement)
View
@@ -57,7 +57,7 @@
$(document)
.bind('MSGestureEnd', function(e){
var swipeDirectionFromVelocity =
- e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null;
+ e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null
if (swipeDirectionFromVelocity) {
touch.el.trigger('swipe')
touch.el.trigger('swipe'+ swipeDirectionFromVelocity)
@@ -84,7 +84,7 @@
touch.last = now
longTapTimeout = setTimeout(longTap, longTapDelay)
// adds the current touch contact for IE gesture recognition
- if (gesture && _isPointerType) gesture.addPointer(e.pointerId);
+ if (gesture && _isPointerType) gesture.addPointer(e.pointerId)
})
.on('touchmove MSPointerMove pointermove', function(e){
if((_isPointerType = isPointerEventType(e, 'move')) &&
View
@@ -213,7 +213,7 @@
},
testLocking: function(t) {
- output = "X";
+ output = "X"
$.Callbacks(config).add(str).lock().add(str).fire("A").add(str)
t.assertEqual("X", output, "Lock early")
},
View
@@ -274,7 +274,7 @@
return createDeferred().resolveWith(context)
}).done(function() {
t.assertEqual(context, this, "custom context of returned deferred correctly propagated")
- });
+ })
defer = createDeferred()
piped = defer.then(function(value) {
@@ -285,7 +285,7 @@
piped.done(function(value) {
t.assertEqual(piped, this, "default context gets updated to latest promise in the chain")
t.assertEqual(6, value, "proper value received")
- });
+ })
defer2 = createDeferred()
piped2 = defer2.then()
View
@@ -111,21 +111,21 @@
t.assertTrue(browser.safari)
t.assertFalse(!!browser.chrome)
t.assertEqual("7.0.1",browser.version)
- });
+ })
detect(UA.Safari_OSX_7_0, function(os, browser){
t.assert(!os.ipad)
t.assertTrue(browser.webkit)
t.assertTrue(browser.safari)
t.assertFalse(!!browser.chrome)
t.assertEqual("7.0",browser.version)
- });
+ })
detect(UA.Safari_OSX_6_0, function(os, browser){
t.assert(!os.ipad)
t.assertTrue(browser.webkit)
t.assertTrue(browser.safari)
t.assertFalse(!!browser.chrome)
t.assertEqual("6.0",browser.version)
- });
+ })
},
testSafariWindows: function(t){
@@ -137,7 +137,7 @@
t.assertTrue(browser.safari)
t.assertFalse(!!browser.chrome)
t.assertEqual("5.0.4", browser.version)
- });
+ })
},
testWebOS: function(t){
View
@@ -245,8 +245,8 @@
t.assertEqual('d', log.join(' '))
log = []
- $(obj).trigger('event2');
- t.assertEqual('event2', log.join(' '));
+ $(obj).trigger('event2')
+ t.assertEqual('event2', log.join(' '))
},
testHandlerWithoutData: function(t){
@@ -1 +1 @@
-window.testValue = 1;
+window.testValue = 1
@@ -10,7 +10,7 @@
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<script>
- window.testValue = 1;
+ window.testValue = 1
</script>
</body>
</html>
@@ -67,9 +67,9 @@
* Captures tap
*/
$('#touch_test_single').bind('tap', function(e) {
- e.cancelTouch();
+ e.cancelTouch()
})
- listen_to('#touch_test_single');
+ listen_to('#touch_test_single')
View
@@ -295,12 +295,12 @@
t.assertLength(1, $fragment)
t.assertEqual(Node.DOCUMENT_FRAGMENT_NODE, $fragment.get(0).nodeType)
- var fragment = $fragment[0];
+ var fragment = $fragment[0]
var $div = $('<div id="child"><div class="inner"></div></div>')
t.assertLength(0, $('#child', fragment))
- fragment.appendChild($div[0]);
+ fragment.appendChild($div[0])
var expectedElement = fragment.querySelector('#child')
@@ -313,7 +313,7 @@
t.assertLength(1, $('.inner', fragment))
t.assertEqual(expectedElement, $('.inner', fragment).get(0))
- var expectedElements = fragment.querySelectorAll('div');
+ var expectedElements = fragment.querySelectorAll('div')
t.assertLength(2, $('div', fragment))
t.assertEqual(expectedElements[0], $('div', fragment).get(0))
@@ -651,11 +651,11 @@
t.assertLength(4, $('span.findme', domElement))
// Selector with DOM Element Context
- var domElement = document.getElementById('find1');
- t.assertLength(4, $('span.findme', domElement));
+ var domElement = document.getElementById('find1')
+ t.assertLength(4, $('span.findme', domElement))
// DOM Element with DOM Element Context
- t.assertLength(1, $(domElement, domElement));
+ t.assertLength(1, $(domElement, domElement))
},
testDollarWithDocument: function(t){
@@ -1489,7 +1489,7 @@
},
testFindWithFalsyValue: function(t){
- var element = '<div><a>1</a></div>';
+ var element = '<div><a>1</a></div>'
t.assertZeptoCollection(0, $(element).find(undefined))
t.assertZeptoCollection(0, $(element).find(false))
t.assertZeptoCollection(0, $(element).find(0))
@@ -1692,10 +1692,10 @@
},
testHtml: function(t){
- var div = $('div.htmltest');
+ var div = $('div.htmltest')
- div.text(undefined);
- t.assertEqual('', div.html());
+ div.text(undefined)
+ t.assertEqual('', div.html())
t.assertIdentical(div, div.html('yowza'))
t.assertEqual('yowza', document.getElementById('htmltest1').innerHTML)

4 comments on commit 5420985

@WoeOm
WoeOm commented on 5420985 Aug 8, 2016

Take the liberty to ask, why remove the colon

@mislav
Collaborator
mislav commented on 5420985 Aug 8, 2016 edited

@WoeOm It's explained in our contribution docs.

@WoeOm
WoeOm commented on 5420985 Aug 8, 2016

@mislav learned a lot ,thank you~

@XtremePlayzCODE

Not a big fan of semicolons, I see. I always go through look for missing semicolons while you're here looking for semicolons and removing them

Please sign in to comment.