diff --git a/.jscs.json b/.jscs.json index 0fc84a6639e5..440737e1f2a9 100644 --- a/.jscs.json +++ b/.jscs.json @@ -1,5 +1,6 @@ { "disallowKeywords": ["with"], "disallowTrailingWhitespace": true, - "requireRightStickedOperators": ["!"] + "requireRightStickedOperators": ["!"], + "requireLeftStickedOperators": [","] } diff --git a/.jscs.json.todo b/.jscs.json.todo index 96326dce1082..1fb8c28d9018 100644 --- a/.jscs.json.todo +++ b/.jscs.json.todo @@ -8,7 +8,6 @@ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], "disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], - "requireLeftStickedOperators": [","], "disallowImplicitTypeConversion": ["string"], "disallowMultipleLineBreaks": true, "disallowKeywordsOnNewLine": ["else"], diff --git a/src/jqLite.js b/src/jqLite.js index 809ede034a00..ba613f218f9e 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -457,7 +457,7 @@ forEach({ return jqLite(element).data('$isolateScope') || jqLite(element).data('$isolateScopeNoTemplate'); }, - controller: jqLiteController , + controller: jqLiteController, injector: function(element) { return jqLiteInheritedData(element, '$injector'); diff --git a/src/ngSanitize/sanitize.js b/src/ngSanitize/sanitize.js index 35dc8f100bec..38d088bbe407 100644 --- a/src/ngSanitize/sanitize.js +++ b/src/ngSanitize/sanitize.js @@ -254,7 +254,7 @@ function htmlParser( html, handler ) { match = html.match( DOCTYPE_REGEXP ); if ( match ) { - html = html.replace( match[0] , ''); + html = html.replace( match[0], ''); chars = false; } // end tag diff --git a/test/auto/injectorSpec.js b/test/auto/injectorSpec.js index a70cd763793e..4b9679784c0e 100644 --- a/test/auto/injectorSpec.js +++ b/test/auto/injectorSpec.js @@ -163,7 +163,7 @@ describe('injector', function() { function $f_n0 /* */( $a, // x, <-- looks like an arg but it is a comment - b_ , /* z, <-- looks like an arg but it is a + b_, /* z, <-- looks like an arg but it is a multi-line comment function (a, b) {} */ diff --git a/test/ng/sceSpecs.js b/test/ng/sceSpecs.js index e2a16c1cbc0f..40e79c5737ff 100644 --- a/test/ng/sceSpecs.js +++ b/test/ng/sceSpecs.js @@ -109,7 +109,7 @@ describe('SCE', function() { })); it('should NOT wrap unknown contexts', inject(function($sce) { - expect(function() { $sce.trustAs('unknown1' , '123'); }).toThrowMinErr( + expect(function() { $sce.trustAs('unknown1', '123'); }).toThrowMinErr( '$sce', 'icontext', 'Attempted to trust a value in invalid context. Context: unknown1; Value: 123'); })); diff --git a/test/ngTouch/directive/ngSwipeSpec.js b/test/ngTouch/directive/ngSwipeSpec.js index 2aa1a8fe338d..b46a9384e5f9 100644 --- a/test/ngTouch/directive/ngSwipeSpec.js +++ b/test/ngTouch/directive/ngSwipeSpec.js @@ -222,6 +222,6 @@ var swipeTests = function(description, restrictBrowsers, startEvent, moveEvent, }); } -swipeTests('touch', true /* restrictBrowers */, 'touchstart', 'touchmove', 'touchend'); -swipeTests('mouse', false /* restrictBrowers */, 'mousedown', 'mousemove', 'mouseup'); +swipeTests('touch', /* restrictBrowers */ true, 'touchstart', 'touchmove', 'touchend'); +swipeTests('mouse', /* restrictBrowers */ false, 'mousedown', 'mousemove', 'mouseup'); diff --git a/test/ngTouch/swipeSpec.js b/test/ngTouch/swipeSpec.js index 435dda8c0109..1eb53e45d619 100644 --- a/test/ngTouch/swipeSpec.js +++ b/test/ngTouch/swipeSpec.js @@ -387,6 +387,6 @@ var swipeTests = function(description, restrictBrowsers, startEvent, moveEvent, }); } -swipeTests('touch', true /* restrictBrowers */, 'touchstart', 'touchmove', 'touchend'); -swipeTests('mouse', false /* restrictBrowers */, 'mousedown', 'mousemove', 'mouseup'); +swipeTests('touch', /* restrictBrowers */ true, 'touchstart', 'touchmove', 'touchend'); +swipeTests('mouse', /* restrictBrowers */ false, 'mousedown', 'mousemove', 'mouseup');