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

Commit 9335378

Browse files
TimotheeJeannintbosch
authored andcommitted
style: enable jscs requireLeftStickedOperators rule
Closed #6544.
1 parent de2ecb8 commit 9335378

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

.jscs.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"disallowKeywords": ["with"],
33
"disallowTrailingWhitespace": true,
4-
"requireRightStickedOperators": ["!"]
4+
"requireRightStickedOperators": ["!"],
5+
"requireLeftStickedOperators": [","]
56
}

.jscs.json.todo

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
99
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
1010
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
11-
"requireLeftStickedOperators": [","],
1211
"disallowImplicitTypeConversion": ["string"],
1312
"disallowMultipleLineBreaks": true,
1413
"disallowKeywordsOnNewLine": ["else"],

src/jqLite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ forEach({
457457
return jqLite(element).data('$isolateScope') || jqLite(element).data('$isolateScopeNoTemplate');
458458
},
459459

460-
controller: jqLiteController ,
460+
controller: jqLiteController,
461461

462462
injector: function(element) {
463463
return jqLiteInheritedData(element, '$injector');

src/ngSanitize/sanitize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ function htmlParser( html, handler ) {
254254
match = html.match( DOCTYPE_REGEXP );
255255

256256
if ( match ) {
257-
html = html.replace( match[0] , '');
257+
html = html.replace( match[0], '');
258258
chars = false;
259259
}
260260
// end tag

test/auto/injectorSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ describe('injector', function() {
163163
function $f_n0 /*
164164
*/(
165165
$a, // x, <-- looks like an arg but it is a comment
166-
b_ , /* z, <-- looks like an arg but it is a
166+
b_, /* z, <-- looks like an arg but it is a
167167
multi-line comment
168168
function (a, b) {}
169169
*/

test/ng/sceSpecs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('SCE', function() {
109109
}));
110110

111111
it('should NOT wrap unknown contexts', inject(function($sce) {
112-
expect(function() { $sce.trustAs('unknown1' , '123'); }).toThrowMinErr(
112+
expect(function() { $sce.trustAs('unknown1', '123'); }).toThrowMinErr(
113113
'$sce', 'icontext', 'Attempted to trust a value in invalid context. Context: unknown1; Value: 123');
114114
}));
115115

test/ngTouch/directive/ngSwipeSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,6 @@ var swipeTests = function(description, restrictBrowsers, startEvent, moveEvent,
222222
});
223223
}
224224

225-
swipeTests('touch', true /* restrictBrowers */, 'touchstart', 'touchmove', 'touchend');
226-
swipeTests('mouse', false /* restrictBrowers */, 'mousedown', 'mousemove', 'mouseup');
225+
swipeTests('touch', /* restrictBrowers */ true, 'touchstart', 'touchmove', 'touchend');
226+
swipeTests('mouse', /* restrictBrowers */ false, 'mousedown', 'mousemove', 'mouseup');
227227

test/ngTouch/swipeSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,6 @@ var swipeTests = function(description, restrictBrowsers, startEvent, moveEvent,
387387
});
388388
}
389389

390-
swipeTests('touch', true /* restrictBrowers */, 'touchstart', 'touchmove', 'touchend');
391-
swipeTests('mouse', false /* restrictBrowers */, 'mousedown', 'mousemove', 'mouseup');
390+
swipeTests('touch', /* restrictBrowers */ true, 'touchstart', 'touchmove', 'touchend');
391+
swipeTests('mouse', /* restrictBrowers */ false, 'mousedown', 'mousemove', 'mouseup');
392392

0 commit comments

Comments
 (0)