Skip to content

Commit 4b75b73

Browse files
committed
style(jscs): fix jscs errors
1 parent df6c356 commit 4b75b73

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

Diff for: .jscs.json

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"beforeOpeningRoundBrace": true
1919
},
2020
"disallowSpacesInsideArrayBrackets": true,
21-
"disallowSpacesInsideParentheses": true,
2221
"disallowTrailingComma": true,
2322
"disallowTrailingWhitespace": true,
2423
"requireCommaBeforeLineBreak": true,

Diff for: gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if (argv.dist) {
6161

6262
gulp.task('default', ['build']);
6363
gulp.task('build', ['bundle', 'sass']);
64-
gulp.task('validate', ['eslint', 'ddescribe-iit', 'karma']);
64+
gulp.task('validate', ['jscs', 'eslint', 'ddescribe-iit', 'karma']);
6565

6666
var IS_WATCH = false;
6767
gulp.task('watch', ['build'], function() {

Diff for: js/angular/controller/listController.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ IonicModule.service('$ionicListDelegate', ionic.DelegateService([
5959
* @name $ionicListDelegate#closeOptionButtons
6060
* @description Closes any option buttons on the list that are swiped open.
6161
*/
62-
'closeOptionButtons',
62+
'closeOptionButtons'
6363
/**
6464
* @ngdoc method
6565
* @name $ionicListDelegate#$getByHandle
@@ -91,7 +91,7 @@ function($scope, $attrs, $ionicListDelegate, $ionicHistory) {
9191
$scope.$on('$destroy', deregisterInstance);
9292

9393
self.showReorder = function(show) {
94-
if (arguments.length) {
94+
if(arguments.length) {
9595
isReorderShown = !!show;
9696
}
9797
return isReorderShown;

Diff for: js/angular/directive/collectionRepeat.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$r
323323
// Try to just parse the plain attr value
324324
try {
325325
parsedValue = $parse(attrValue);
326-
} catch(e) {
326+
} catch (e) {
327327
// If the parse fails and the value has `px` or `%` in it, surround the attr in
328328
// quotes, to attempt to let the user provide a simple `attr="100%"` or `attr="100px"`
329329
if (attrValue.trim().match(/\d+(px|%)$/)) {
@@ -520,7 +520,7 @@ function RepeatManagerFactory($rootScope, $window, $$rAF) {
520520
var current = containerNode;
521521
do {
522522
repeaterBeforeSize += current[isVertical ? 'offsetTop' : 'offsetLeft'];
523-
} while( ionic.DomUtil.contains(scrollView.__content, current = current.offsetParent) );
523+
} while ( ionic.DomUtil.contains(scrollView.__content, current = current.offsetParent) );
524524

525525
var containerPrevNode = containerNode.previousElementSibling;
526526
var beforeStyle = containerPrevNode ? $window.getComputedStyle(containerPrevNode) : {};

Diff for: js/angular/directive/exposeAsideWhen.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ IonicModule.directive('exposeAsideWhen', ['$window', function($window) {
6464

6565
ionic.on('resize', onResize, $window);
6666

67-
$scope.$on('$destroy', function(){
67+
$scope.$on('$destroy', function() {
6868
ionic.off('resize', onResize, $window);
6969
});
7070

Diff for: js/angular/directive/itemReorderButton.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ IonicModule
6868
};
6969

7070
// prevent clicks from bubbling up to the item
71-
if(!$attr.ngClick && !$attr.onClick && !$attr.onclick){
72-
$element[0].onclick = function(e){
71+
if (!$attr.ngClick && !$attr.onClick && !$attr.onclick) {
72+
$element[0].onclick = function(e) {
7373
e.stopPropagation();
7474
return false;
7575
};

Diff for: js/angular/directive/popover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ IonicModule
88
restrict: 'E',
99
transclude: true,
1010
replace: true,
11-
controller: [function(){}],
11+
controller: [function() {}],
1212
template: '<div class="popover-backdrop">' +
1313
'<div class="popover-wrapper" ng-transclude></div>' +
1414
'</div>'

Diff for: js/angular/directive/scroll.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ function($timeout, $controller, $ionicBind) {
7777
innerElement.toggleClass('padding', !!newVal);
7878
});
7979
}
80-
if($scope.$eval($scope.paging) === true) {
80+
if ($scope.$eval($scope.paging) === true) {
8181
innerElement.addClass('scroll-paging');
8282
}
8383

84-
if(!$scope.direction) { $scope.direction = 'y'; }
84+
if (!$scope.direction) { $scope.direction = 'y'; }
8585
var isPaging = $scope.$eval($scope.paging) === true;
8686

8787
var scrollViewOptions = {

Diff for: js/angular/service/bind.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ IonicModule
55
.factory('$ionicBind', ['$parse', '$interpolate', function($parse, $interpolate) {
66
var LOCAL_REGEXP = /^\s*([@=&])(\??)\s*(\w*)\s*$/;
77
return function(scope, attrs, bindDefinition) {
8-
forEach(bindDefinition || {}, function (definition, scopeName) {
8+
forEach(bindDefinition || {}, function(definition, scopeName) {
99
//Adapted from angular.js $compile
1010
var match = definition.match(LOCAL_REGEXP) || [],
1111
attrName = match[3] || scopeName,

0 commit comments

Comments
 (0)