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

Commit 481508d

Browse files
committed
style: remove ws and enfore no-trailing-ws jscs rule
1 parent 12e4d3a commit 481508d

29 files changed

+67
-67
lines changed

.jscs.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"disallowKeywords": ["with"]
2+
"disallowKeywords": ["with"],
3+
"disallowTrailingWhitespace": true
34
}

.jscs.json.todo

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"disallowImplicitTypeConversion": ["string"],
1414
"disallowMultipleLineBreaks": true,
1515
"disallowKeywordsOnNewLine": ["else"],
16-
"disallowTrailingWhitespace": true,
1716
"requireLineFeedAtFileEnd": true,
1817
"validateJSDoc": {
1918
"checkParamNames": true,

src/Angular.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@
9292
* @name ng
9393
* @module ng
9494
* @description
95-
*
95+
*
9696
* # ng (core module)
9797
* The ng module is loaded by default when an AngularJS application is started. The module itself
9898
* contains the essential components for an AngularJS application to function. The table below
9999
* lists a high level breakdown of each of the services/factories, filters, directives and testing
100100
* components available within this core module.
101-
*
101+
*
102102
* <div doc-module-components="ng"></div>
103103
*/
104104

src/AngularPublic.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
/* global
44
angularModule: true,
55
version: true,
6-
6+
77
$LocaleProvider,
88
$CompileProvider,
9-
9+
1010
htmlAnchorDirective,
1111
inputDirective,
1212
inputDirective,

src/auto/injector.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ function annotate(fn) {
350350
*
351351
* - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
352352
* {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.
353-
* - `Constructor`: a new instance of the provider will be created using
353+
* - `Constructor`: a new instance of the provider will be created using
354354
* {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.
355355
*
356356
* @returns {Object} registered provider instance
@@ -478,9 +478,9 @@ function annotate(fn) {
478478
* var Ping = function($http) {
479479
* this.$http = $http;
480480
* };
481-
*
481+
*
482482
* Ping.$inject = ['$http'];
483-
*
483+
*
484484
* Ping.prototype.send = function() {
485485
* return this.$http.get('/ping');
486486
* };

src/ng/anchorScroll.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.
1717
* This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.
18-
*
18+
*
1919
* @example
2020
<example>
2121
<file name="index.html">
@@ -30,7 +30,7 @@
3030
// set the location.hash to the id of
3131
// the element you wish to scroll to.
3232
$location.hash('bottom');
33-
33+
3434
// call $anchorScroll()
3535
$anchorScroll();
3636
};

src/ng/animate.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var $animateMinErr = minErr('$animate');
1717
*/
1818
var $AnimateProvider = ['$provide', function($provide) {
1919

20-
20+
2121
this.$$selectors = {};
2222

2323

@@ -153,7 +153,7 @@ var $AnimateProvider = ['$provide', function($provide) {
153153
* @description Moves the position of the provided element within the DOM to be placed
154154
* either after the `after` element or inside of the `parent` element. Once complete, the
155155
* done() callback will be fired (if provided).
156-
*
156+
*
157157
* @param {jQuery/jqLite element} element the element which will be moved around within the
158158
* DOM
159159
* @param {jQuery/jqLite element} parent the parent element where the element will be

src/ng/cacheFactory.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*
77
* @description
88
* Factory that constructs cache objects and gives access to them.
9-
*
9+
*
1010
* ```js
11-
*
11+
*
1212
* var cache = $cacheFactory('cacheId');
1313
* expect($cacheFactory.get('cacheId')).toBe(cache);
1414
* expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
@@ -17,8 +17,8 @@
1717
* cache.put("another key", "another value");
1818
*
1919
* // We've specified no options on creation
20-
* expect(cache.info()).toEqual({id: 'cacheId', size: 2});
21-
*
20+
* expect(cache.info()).toEqual({id: 'cacheId', size: 2});
21+
*
2222
* ```
2323
*
2424
*
@@ -199,7 +199,7 @@ function $CacheFactoryProvider() {
199199
* The first time a template is used, it is loaded in the template cache for quick retrieval. You
200200
* can load templates directly into the cache in a `script` tag, or by consuming the
201201
* `$templateCache` service directly.
202-
*
202+
*
203203
* Adding via the `script` tag:
204204
* ```html
205205
* <html ng-app>
@@ -211,29 +211,29 @@ function $CacheFactoryProvider() {
211211
* ...
212212
* </html>
213213
* ```
214-
*
214+
*
215215
* **Note:** the `script` tag containing the template does not need to be included in the `head` of
216216
* the document, but it must be below the `ng-app` definition.
217-
*
217+
*
218218
* Adding via the $templateCache service:
219-
*
219+
*
220220
* ```js
221221
* var myApp = angular.module('myApp', []);
222222
* myApp.run(function($templateCache) {
223223
* $templateCache.put('templateId.html', 'This is the content of the template');
224224
* });
225225
* ```
226-
*
226+
*
227227
* To retrieve the template later, simply use it in your HTML:
228228
* ```html
229229
* <div ng-include=" 'templateId.html' "></div>
230230
* ```
231-
*
231+
*
232232
* or get it via Javascript:
233233
* ```js
234234
* $templateCache.get('templateId.html')
235235
* ```
236-
*
236+
*
237237
* See {@link ng.$cacheFactory $cacheFactory}.
238238
*
239239
*/

src/ng/directive/booleanAttrs.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
</example>
192192
*
193193
* @element INPUT
194-
* @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
194+
* @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
195195
* then special attribute "disabled" will be set on the element
196196
*/
197197

@@ -226,7 +226,7 @@
226226
</example>
227227
*
228228
* @element INPUT
229-
* @param {expression} ngChecked If the {@link guide/expression expression} is truthy,
229+
* @param {expression} ngChecked If the {@link guide/expression expression} is truthy,
230230
* then special attribute "checked" will be set on the element
231231
*/
232232

@@ -261,7 +261,7 @@
261261
</example>
262262
*
263263
* @element INPUT
264-
* @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,
264+
* @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,
265265
* then special attribute "readonly" will be set on the element
266266
*/
267267

@@ -280,7 +280,7 @@
280280
* The `ngSelected` directive solves this problem for the `selected` atttribute.
281281
* This complementary directive is not removed by the browser and so provides
282282
* a permanent reliable place to store the binding information.
283-
*
283+
*
284284
* @example
285285
<example>
286286
<file name="index.html">
@@ -300,7 +300,7 @@
300300
</example>
301301
*
302302
* @element OPTION
303-
* @param {expression} ngSelected If the {@link guide/expression expression} is truthy,
303+
* @param {expression} ngSelected If the {@link guide/expression expression} is truthy,
304304
* then special attribute "selected" will be set on the element
305305
*/
306306

@@ -336,7 +336,7 @@
336336
</example>
337337
*
338338
* @element DETAILS
339-
* @param {expression} ngOpen If the {@link guide/expression expression} is truthy,
339+
* @param {expression} ngOpen If the {@link guide/expression expression} is truthy,
340340
* then special attribute "open" will be set on the element
341341
*/
342342

src/ng/directive/form.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var nullFormCtrl = {
3636
* - `pattern`
3737
* - `required`
3838
* - `url`
39-
*
39+
*
4040
* @description
4141
* `FormController` keeps track of all its controls and nested forms as well as state of them,
4242
* such as being valid/invalid or dirty/pristine.

src/ng/directive/input.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ var inputType = {
295295
var text = element(by.binding('text'));
296296
var valid = element(by.binding('myForm.input.$valid'));
297297
var input = element(by.model('text'));
298-
298+
299299
it('should initialize to model', function() {
300300
expect(text.getText()).toContain('me@example.com');
301301
expect(valid.getText()).toContain('true');
@@ -409,7 +409,7 @@ var inputType = {
409409
410410
expect(value1.getText()).toContain('true');
411411
expect(value2.getText()).toContain('YES');
412-
412+
413413
element(by.model('value1')).click();
414414
element(by.model('value2')).click();
415415
@@ -1021,7 +1021,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
10211021
* You can override this for input directives whose concept of being empty is different to the
10221022
* default. The `checkboxInputType` directive does this because in its case a value of `false`
10231023
* implies empty.
1024-
*
1024+
*
10251025
* @param {*} value Reference to check.
10261026
* @returns {boolean} True if `value` is empty.
10271027
*/

src/ng/directive/ngBind.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {
144144
*
145145
* @example
146146
Try it here: enter text in text box and watch the greeting change.
147-
147+
148148
<example module="ngBindHtmlExample" deps="angular-sanitize.js">
149149
<file name="index.html">
150150
<div ng-controller="ngBindHtmlCtrl">
151151
<p ng-bind-html="myHTML"></p>
152152
</div>
153153
</file>
154-
154+
155155
<file name="script.js">
156156
angular.module('ngBindHtmlExample', ['ngSanitize'])
157157

src/ng/directive/ngShowHide.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br />
5757
* "f" / "0" / "false" / "no" / "n" / "[]"
5858
* </div>
59-
*
59+
*
6060
* ## A note about animations with ngShow
6161
*
6262
* Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
@@ -211,7 +211,7 @@ var ngShowDirective = ['$animate', function($animate) {
211211
* ```
212212
*
213213
* Just remember to include the important flag so the CSS override will function.
214-
*
214+
*
215215
* <div class="alert alert-warning">
216216
* **Note:** Here is a list of values that ngHide will consider as a falsy value (case insensitive):<br />
217217
* "f" / "0" / "false" / "no" / "n" / "[]"

src/ng/directive/ngTransclude.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var ngTranscludeDirective = ngDirective({
6464
'Element: {0}',
6565
startingTag($element));
6666
}
67-
67+
6868
$transclude(function(clone) {
6969
$element.empty();
7070
$element.append(clone);

src/ng/exceptionHandler.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
* Any uncaught exception in angular expressions is delegated to this service.
1010
* The default implementation simply delegates to `$log.error` which logs it into
1111
* the browser console.
12-
*
12+
*
1313
* In unit tests, if `angular-mocks.js` is loaded, this service is overridden by
1414
* {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.
1515
*
1616
* ## Example:
17-
*
17+
*
1818
* ```js
1919
* angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {
2020
* return function (exception, cause) {
@@ -23,7 +23,7 @@
2323
* };
2424
* });
2525
* ```
26-
*
26+
*
2727
* This example will override the normal action of `$exceptionHandler`, to make angular
2828
* exceptions fail hard when they happen, instead of just logging to the console.
2929
*

src/ng/filter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* The filter function is registered with the `$injector` under the filter name suffix with
3434
* `Filter`.
35-
*
35+
*
3636
* ```js
3737
* it('should be the same instance', inject(
3838
* function($filterProvider) {
@@ -106,7 +106,7 @@ function $FilterProvider($provide) {
106106
}];
107107

108108
////////////////////////////////////////
109-
109+
110110
/* global
111111
currencyFilter: false,
112112
dateFilter: false,

src/ng/filter/limitTo.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* the value and sign (positive or negative) of `limit`.
1212
*
1313
* @param {Array|string} input Source array or string to be limited.
14-
* @param {string|number} limit The length of the returned array or string. If the `limit` number
14+
* @param {string|number} limit The length of the returned array or string. If the `limit` number
1515
* is positive, `limit` number of items from the beginning of the source array/string are copied.
16-
* If the number is negative, `limit` number of items from the end of the source array/string
16+
* If the number is negative, `limit` number of items from the end of the source array/string
1717
* are copied. The `limit` will be trimmed if it exceeds `array.length`
1818
* @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
1919
* had less than `limit` elements.
@@ -72,7 +72,7 @@
7272
function limitToFilter(){
7373
return function(input, limit) {
7474
if (!isArray(input) && !isString(input)) return input;
75-
75+
7676
limit = int(limit);
7777

7878
if (isString(input)) {

src/ng/http.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ function $HttpProvider() {
556556
* - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the
557557
* XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5
558558
* for more information.
559-
* - **responseType** - `{string}` - see
559+
* - **responseType** - `{string}` - see
560560
* [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
561561
*
562562
* @returns {HttpPromise} Returns a {@link ng.$q promise} object with the

src/ng/httpBackend.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
112112
// WebKit added support for the json responseType value on 09/03/2013
113113
// https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are
114114
// known to throw when setting the value "json" as the response type. Other older
115-
// browsers implementing the responseType
115+
// browsers implementing the responseType
116116
//
117117
// The json response type can be ignored if not supported, because JSON payloads are
118118
// parsed on the client-side regardless.

0 commit comments

Comments
 (0)