Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 23b7baa

Browse files
committed
style(all): enforce no trailing white space
1 parent bb85213 commit 23b7baa

File tree

21 files changed

+79
-78
lines changed

21 files changed

+79
-78
lines changed

.jshintrc

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"boss": true,
88
"eqnull": true,
99
"quotmark": "single",
10+
"trailing": true,
1011
"globals": {
1112
"angular": true
1213
}

Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = function(grunt) {
2727
modules: 'angular.module("ui.bootstrap", [<%= srcModules %>]);',
2828
tplmodules: 'angular.module("ui.bootstrap.tpls", [<%= tplModules %>]);',
2929
all: 'angular.module("ui.bootstrap", ["ui.bootstrap.tpls", <%= srcModules %>]);',
30-
banner: ['/*',
30+
banner: ['/*',
3131
' * <%= pkg.name %>',
3232
' * <%= pkg.homepage %>\n',
3333
' * Version: <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>',

src/accordion/accordion.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
2020
});
2121
}
2222
};
23-
23+
2424
// This is called from the accordion-group directive to add itself to the accordion
2525
this.addGroup = function(groupScope) {
2626
var that = this;
@@ -61,7 +61,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
6161
transclude:true, // It transcludes the contents of the directive into the template
6262
replace: true, // The element containing the directive will be replaced with the template
6363
templateUrl:'template/accordion/accordion-group.html',
64-
scope: {
64+
scope: {
6565
heading: '@', // Interpolate the heading attribute onto this scope
6666
isOpen: '=?',
6767
isDisabled: '=?'

src/accordion/docs/demo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function AccordionDemoCtrl($scope) {
1818
var newItemNo = $scope.items.length + 1;
1919
$scope.items.push('Item ' + newItemNo);
2020
};
21-
21+
2222
$scope.status = {
2323
isFirstOpen: true,
2424
isFirstDisabled: false

src/accordion/test/accordion.spec.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ describe('accordion', function () {
305305
expect(scope.groups[0].open).toBe(false);
306306
});
307307
});
308-
308+
309309
describe('`is-disabled` attribute', function() {
310310
var groupBody;
311311
beforeEach(function () {
@@ -324,18 +324,18 @@ describe('accordion', function () {
324324
it('should open the panel with isOpen set to true', function () {
325325
expect(groupBody.scope().isOpen).toBeFalsy();
326326
});
327-
327+
328328
it('should not toggle if disabled', function() {
329329
findGroupLink(0).click();
330330
scope.$digest();
331331
expect(groupBody.scope().isOpen).toBeFalsy();
332332
});
333-
333+
334334
it('should toggle after enabling', function() {
335335
scope.disabled = false;
336336
scope.$digest();
337337
expect(groupBody.scope().isOpen).toBeFalsy();
338-
338+
339339
findGroupLink(0).click();
340340
scope.$digest();
341341
expect(groupBody.scope().isOpen).toBeTruthy();
@@ -344,7 +344,7 @@ describe('accordion', function () {
344344

345345
describe('accordion-heading element', function() {
346346
beforeEach(function() {
347-
var tpl =
347+
var tpl =
348348
'<accordion ng-init="a = [1,2,3]">' +
349349
'<accordion-group heading="I get overridden">' +
350350
'<accordion-heading>Heading Element <span ng-repeat="x in a">{{x}}</span> </accordion-heading>' +
@@ -366,7 +366,7 @@ describe('accordion', function () {
366366

367367
describe('accordion-heading attribute', function() {
368368
beforeEach(function() {
369-
var tpl =
369+
var tpl =
370370
'<accordion ng-init="a = [1,2,3]">' +
371371
'<accordion-group heading="I get overridden">' +
372372
'<div accordion-heading>Heading Element <span ng-repeat="x in a">{{x}}</span> </div>' +

src/alert/test/alert.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ describe('alert', function () {
44
var element;
55

66
beforeEach(module('ui.bootstrap.alert'));
7-
beforeEach(module('template/alert/alert.html'));
7+
beforeEach(module('template/alert/alert.html'));
88

99
beforeEach(inject(function ($rootScope, _$compile_, $controller) {
1010

1111
scope = $rootScope;
1212
$compile = _$compile_;
1313

1414
element = angular.element(
15-
'<div>' +
15+
'<div>' +
1616
'<alert ng-repeat="alert in alerts" type="alert.type"' +
1717
'close="removeAlert($index)">{{alert.msg}}' +
1818
'</alert>' +

src/buttons/buttons.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ angular.module('ui.bootstrap.buttons', [])
4949
function getFalseValue() {
5050
return getCheckboxValue(attrs.btnCheckboxFalse, false);
5151
}
52-
52+
5353
function getCheckboxValue(attributeValue, defaultValue) {
5454
var val = scope.$eval(attributeValue);
5555
return angular.isDefined(val) ? val : defaultValue;

src/carousel/test/carousel.spec.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('carousel', function() {
22
beforeEach(module('ui.bootstrap.carousel'));
33
beforeEach(module('template/carousel/carousel.html', 'template/carousel/slide.html'));
4-
4+
55
var $rootScope, $compile, $controller, $timeout;
66
beforeEach(inject(function(_$rootScope_, _$compile_, _$controller_, _$timeout_) {
77
$rootScope = _$rootScope_;
@@ -24,7 +24,7 @@ describe('carousel', function() {
2424
'<slide ng-repeat="slide in slides" active="slide.active">' +
2525
'{{slide.content}}' +
2626
'</slide>' +
27-
'</carousel>'
27+
'</carousel>'
2828
)(scope);
2929
scope.interval = 5000;
3030
scope.nopause = undefined;
@@ -60,7 +60,7 @@ describe('carousel', function() {
6060
var indicators = elm.find('ol.carousel-indicators > li');
6161
expect(indicators.length).toBe(3);
6262
});
63-
63+
6464
it('should hide navigation when only one slide', function () {
6565
scope.slides=[{active:false,content:'one'}];
6666
scope.$apply();
@@ -69,25 +69,25 @@ describe('carousel', function() {
6969
'<slide ng-repeat="slide in slides" active="slide.active">' +
7070
'{{slide.content}}' +
7171
'</slide>' +
72-
'</carousel>'
72+
'</carousel>'
7373
)(scope);
7474
var indicators = elm.find('ol.carousel-indicators > li');
7575
expect(indicators.length).toBe(0);
76-
76+
7777
var navNext = elm.find('a.right');
7878
expect(navNext.length).toBe(0);
79-
79+
8080
var navPrev = elm.find('a.left');
8181
expect(navPrev.length).toBe(0);
8282
});
83-
84-
it('should show navigation when there are 3 slides', function () {
83+
84+
it('should show navigation when there are 3 slides', function () {
8585
var indicators = elm.find('ol.carousel-indicators > li');
8686
expect(indicators.length).not.toBe(0);
87-
87+
8888
var navNext = elm.find('a.right');
8989
expect(navNext.length).not.toBe(0);
90-
90+
9191
var navPrev = elm.find('a.left');
9292
expect(navPrev.length).not.toBe(0);
9393
});
@@ -175,7 +175,7 @@ describe('carousel', function() {
175175
$timeout.flush();
176176
testSlideActive(2);
177177
});
178-
178+
179179
it('should not pause on mouseover if noPause', function() {
180180
scope.$apply('nopause = true');
181181
testSlideActive(0);
@@ -185,7 +185,7 @@ describe('carousel', function() {
185185
elm.trigger('mouseleave');
186186
$timeout.flush();
187187
testSlideActive(2);
188-
});
188+
});
189189

190190
it('should remove slide from dom and change active slide', function() {
191191
scope.$apply('slides[2].active = true');
@@ -255,15 +255,15 @@ describe('carousel', function() {
255255
describe('addSlide', function() {
256256
it('should set first slide to active = true and the rest to false', function() {
257257
angular.forEach(ctrl.slides, function(slide, i) {
258-
if (i !== 0) {
259-
expect(slide.active).not.toBe(true);
258+
if (i !== 0) {
259+
expect(slide.active).not.toBe(true);
260260
} else {
261261
expect(slide.active).toBe(true);
262262
}
263263
});
264264
});
265265

266-
it('should add new slide and change active to true if active is true on the added slide', function() {
266+
it('should add new slide and change active to true if active is true on the added slide', function() {
267267
var newSlide = {active: true};
268268
expect(ctrl.slides.length).toBe(4);
269269
ctrl.addSlide(newSlide);
@@ -272,7 +272,7 @@ describe('carousel', function() {
272272
expect(ctrl.slides[0].active).toBe(false);
273273
});
274274

275-
it('should add a new slide and not change the active slide', function() {
275+
it('should add a new slide and not change the active slide', function() {
276276
var newSlide = {active: false};
277277
expect(ctrl.slides.length).toBe(4);
278278
ctrl.addSlide(newSlide);

src/datepicker/test/datepicker.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1346,13 +1346,13 @@ describe('datepicker directive', function () {
13461346
expect($body.children().length).toEqual(bodyLength);
13471347
});
13481348
});
1349-
1349+
13501350
describe('with setting datepickerConfig.showWeeks to false', function() {
13511351
var originalConfig = {};
13521352
beforeEach(inject(function(datepickerConfig) {
13531353
angular.extend(originalConfig, datepickerConfig);
13541354
datepickerConfig.showWeeks = false;
1355-
1355+
13561356
var wrapElement = $compile('<div><input ng-model="date" datepicker-popup><div>')($rootScope);
13571357
$rootScope.$digest();
13581358
assignElements(wrapElement);
@@ -1361,7 +1361,7 @@ describe('datepicker directive', function () {
13611361
// return it to the original state
13621362
angular.extend(datepickerConfig, originalConfig);
13631363
}));
1364-
1364+
13651365
it('changes initial visibility for weeks', function() {
13661366
expect(getLabelsRow().find('th').eq(0)).toBeHidden();
13671367
var tr = element.find('tbody').find('tr');

src/dropdownToggle/test/dropdownToggle.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('dropdownToggle', function() {
1414
function dropdown() {
1515
return $compile('<li class="dropdown"><a dropdown-toggle></a><ul dropdown-toggle><li>Hello</li></ul></li>')($rootScope);
1616
}
17-
17+
1818
it('should toggle on `a` click', function() {
1919
var elm = dropdown();
2020
expect(elm.hasClass('open')).toBe(false);
@@ -65,4 +65,4 @@ describe('dropdownToggle', function() {
6565
expect(elm2.hasClass('open')).toBe(true);
6666
});
6767
});
68-
68+

src/modal/modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
221221
backdropDomEl = $compile('<div modal-backdrop></div>')(backdropScope);
222222
body.append(backdropDomEl);
223223
}
224-
224+
225225
var angularDomEl = angular.element('<div modal-window></div>');
226226
angularDomEl.attr('window-class', modal.windowClass);
227227
angularDomEl.attr('index', openedWindows.length() - 1);

src/pagination/test/pagination.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe('pagination directive', function () {
186186
updateCurrentPage('04');
187187
expect(getPaginationEl(4)).toHaveClass('active');
188188
});
189-
189+
190190
it('defaults to 1 if non-numeric', function() {
191191
updateCurrentPage('pizza');
192192
expect(getPaginationEl(1)).toHaveClass('active');

src/popover/test/popover.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ describe('popover', function() {
6868
}));
6969
});
7070

71-
71+

src/progressbar/docs/demo.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var ProgressDemoCtrl = function ($scope) {
2-
2+
33
$scope.max = 200;
44

55
$scope.random = function() {
@@ -22,11 +22,11 @@ var ProgressDemoCtrl = function ($scope) {
2222
$scope.type = type;
2323
};
2424
$scope.random();
25-
25+
2626
$scope.randomStacked = function() {
2727
$scope.stacked = [];
2828
var types = ['success', 'info', 'warning', 'danger'];
29-
29+
3030
for (var i = 0, n = Math.floor((Math.random() * 4) + 1); i < n; i++) {
3131
var index = Math.floor((Math.random() * 4));
3232
$scope.stacked.push({

src/progressbar/test/progressbar.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('progressbar directive', function () {
9090
$rootScope.value += 1;
9191
$rootScope.$digest();
9292

93-
var barEl = getBar(0);
93+
var barEl = getBar(0);
9494
expect(barEl).toHaveClass(BAR_CLASS);
9595
expect(barEl).not.toHaveClass(BAR_CLASS + '-success');
9696
expect(barEl).toHaveClass(BAR_CLASS + '-warning');

src/rating/rating.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ angular.module('ui.bootstrap.rating', [])
1212
this.maxRange = angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max;
1313
this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
1414
this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
15-
15+
1616
this.init = function(ngModelCtrl_) {
1717
ngModelCtrl = ngModelCtrl_;
1818
ngModelCtrl.$render = this.render;
19-
19+
2020
$scope.range = this.buildTemplateObjects(
2121
angular.isDefined($attrs.ratingStates) ? $scope.$parent.$eval($attrs.ratingStates) : new Array(this.maxRange)
2222
);
@@ -52,7 +52,7 @@ angular.module('ui.bootstrap.rating', [])
5252
$scope.val = ngModelCtrl.$viewValue;
5353
$scope.onLeave();
5454
};
55-
55+
5656
this.render = function() {
5757
$scope.val = ngModelCtrl.$viewValue;
5858
};

src/tabs/test/tabs.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ describe('tabs', function() {
387387

388388
describe('tabset controller', function() {
389389
function mockTab(isActive) {
390-
return {
391-
active: !!isActive,
390+
return {
391+
active: !!isActive,
392392
onSelect : angular.noop,
393393
onDeselect : angular.noop
394394
};

src/timepicker/test/timepicker.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('timepicker directive', function () {
6464
e.wheelDelta = delta;
6565
return e;
6666
}
67-
67+
6868
function wheelThatOtherMouse(delta) {
6969
var e = $.Event('wheel');
7070
e.deltaY = delta;
@@ -136,7 +136,7 @@ describe('timepicker directive', function () {
136136
expect(getTimeState()).toEqual(['02', '39', 'PM']);
137137
expect(getModelState()).toEqual([14, 39]);
138138
});
139-
139+
140140
it('meridian button has correct type', function() {
141141
var button = getMeridianButton();
142142
expect(button.attr('type')).toBe('button');
@@ -485,7 +485,7 @@ describe('timepicker directive', function () {
485485
expect(getTimeState()).toEqual(['02', '00', 'PM']);
486486
expect(getModelState()).toEqual([14, 0]);
487487
});
488-
488+
489489
it('responds properly on "wheel" events with configurable steps', function() {
490490
var inputs = element.find('input');
491491
var hoursEl = inputs.eq(0), minutesEl = inputs.eq(1);

0 commit comments

Comments
 (0)