Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

style: enable jscs requireLeftStickedOperators rule #6544

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .jscs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"disallowKeywords": ["with"],
"disallowTrailingWhitespace": true,
"requireRightStickedOperators": ["!"]
"requireRightStickedOperators": ["!"],
"requireLeftStickedOperators": [","]
}
1 change: 0 additions & 1 deletion .jscs.json.todo
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireLeftStickedOperators": [","],
"disallowImplicitTypeConversion": ["string"],
"disallowMultipleLineBreaks": true,
"disallowKeywordsOnNewLine": ["else"],
Expand Down
2 changes: 1 addition & 1 deletion src/jqLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/ngSanitize/sanitize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/auto/injectorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
*/
Expand Down
2 changes: 1 addition & 1 deletion test/ng/sceSpecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}));

Expand Down
4 changes: 2 additions & 2 deletions test/ngTouch/directive/ngSwipeSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

4 changes: 2 additions & 2 deletions test/ngTouch/swipeSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');