From 43a191c5df4e7b7e6bb28dc32bfedc2168b6df6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Sun, 3 May 2015 11:27:50 +0200 Subject: [PATCH] chore(jscs): active disallowMultipleLineBreaks rule --- .jscs.json | 1 + .jscs.json.todo | 1 - src/Angular.js | 45 ---- src/AngularPublic.js | 2 - src/apis.js | 1 - src/auto/injector.js | 10 - src/jqLite.js | 8 - src/loader.js | 1 - src/ng/browser.js | 1 - src/ng/cacheFactory.js | 10 - src/ng/compile.js | 25 -- src/ng/controller.js | 3 - src/ng/directive/attrs.js | 3 - src/ng/directive/form.js | 1 - src/ng/directive/input.js | 11 - src/ng/directive/ngBind.js | 2 - src/ng/directive/ngClass.js | 2 - src/ng/directive/ngEventDirs.js | 9 - src/ng/directive/ngInclude.js | 3 - src/ng/directive/ngList.js | 1 - src/ng/directive/ngModel.js | 7 - src/ng/directive/ngOptions.js | 18 -- src/ng/directive/ngRepeat.js | 1 - src/ng/directive/ngShowHide.js | 1 - src/ng/directive/select.js | 4 - src/ng/directive/validators.js | 2 - src/ng/filter/filters.js | 7 - src/ng/http.js | 13 - src/ng/httpBackend.js | 1 - src/ng/interpolate.js | 6 - src/ng/interval.js | 3 - src/ng/location.js | 15 -- src/ng/parse.js | 6 - src/ng/q.js | 1 - src/ng/rootElement.js | 1 - src/ng/rootScope.js | 9 - src/ng/sanitizeUri.js | 1 - src/ng/sce.js | 5 - src/ng/sniffer.js | 1 - src/ng/testability.js | 1 - src/ng/timeout.js | 3 - src/ng/urlUtils.js | 1 - src/ngAria/aria.js | 1 - src/ngCookies/cookies.js | 1 - .../messageFormatInterpolationParts.js | 1 - src/ngMessageFormat/messageFormatParser.js | 3 - src/ngMessageFormat/messageFormatService.js | 1 - src/ngMessages/messages.js | 1 - src/ngMock/angular-mocks.js | 31 --- src/ngResource/resource.js | 4 - src/ngRoute/directive/ngView.js | 2 - src/ngRoute/route.js | 2 - src/ngRoute/routeParams.js | 1 - src/ngSanitize/sanitize.js | 5 - src/ngScenario/Scenario.js | 2 - src/ngScenario/dsl.js | 1 - src/ngTouch/directive/ngClick.js | 3 - src/ngTouch/directive/ngSwipe.js | 1 - src/ngTouch/swipe.js | 2 - test/AngularSpec.js | 70 ------ test/ApiSpecs.js | 1 - test/BinderSpec.js | 1 - test/auto/injectorSpec.js | 80 ------ test/helpers/matchers.js | 4 - test/helpers/privateMocksSpec.js | 14 -- test/helpers/testabilityPatch.js | 6 - test/jqLiteSpec.js | 95 -------- test/loaderSpec.js | 5 - test/minErrSpec.js | 3 - test/ng/anchorScrollSpec.js | 44 ---- test/ng/animateSpec.js | 7 - test/ng/browserSpecs.js | 9 - test/ng/cacheFactorySpec.js | 24 -- test/ng/compileSpec.js | 227 ------------------ test/ng/controllerSpec.js | 15 -- test/ng/cookieReaderSpec.js | 8 - test/ng/directive/aSpec.js | 8 - test/ng/directive/booleanAttrsSpec.js | 21 -- test/ng/directive/formSpec.js | 20 -- test/ng/directive/inputSpec.js | 144 ----------- test/ng/directive/ngBindSpec.js | 10 - test/ng/directive/ngChangeSpec.js | 4 - test/ng/directive/ngClassSpec.js | 20 -- test/ng/directive/ngCloakSpec.js | 4 - test/ng/directive/ngControllerSpec.js | 7 - test/ng/directive/ngEventDirsSpec.js | 2 - test/ng/directive/ngIfSpec.js | 1 - test/ng/directive/ngIncludeSpec.js | 24 -- test/ng/directive/ngInitSpec.js | 4 - test/ng/directive/ngKeySpec.js | 1 - test/ng/directive/ngListSpec.js | 6 - test/ng/directive/ngModelSpec.js | 121 ---------- test/ng/directive/ngNonBindableSpec.js | 3 - test/ng/directive/ngOptionsSpec.js | 90 ------- test/ng/directive/ngPluralizeSpec.js | 8 - test/ng/directive/ngRepeatSpec.js | 51 ---- test/ng/directive/ngSrcsetSpec.js | 1 - test/ng/directive/ngStyleSpec.js | 9 - test/ng/directive/ngSwitchSpec.js | 14 -- test/ng/directive/scriptSpec.js | 3 - test/ng/directive/selectSpec.js | 43 ---- test/ng/directive/styleSpec.js | 6 - test/ng/directive/validatorsSpec.js | 36 --- test/ng/documentSpec.js | 3 - test/ng/exceptionHandlerSpec.js | 1 - test/ng/filter/filterSpec.js | 37 --- test/ng/filter/filtersSpec.js | 4 - test/ng/filter/limitToSpec.js | 2 - test/ng/filter/orderBySpec.js | 23 -- test/ng/httpBackendSpec.js | 20 -- test/ng/httpSpec.js | 109 --------- test/ng/interpolateSpec.js | 20 -- test/ng/intervalSpec.js | 15 -- test/ng/localeSpec.js | 3 - test/ng/locationSpec.js | 114 --------- test/ng/logSpec.js | 7 - test/ng/parseSpec.js | 56 ----- test/ng/qSpec.js | 132 ---------- test/ng/rootScopeSpec.js | 110 --------- test/ng/sanitizeUriSpec.js | 6 - test/ng/sceSpecs.js | 3 - test/ng/snifferSpec.js | 8 - test/ng/timeoutSpec.js | 18 -- test/ng/urlUtilsSpec.js | 1 - test/ngAnimate/animateCssDriverSpec.js | 1 - test/ngAnimate/animateCssSpec.js | 36 --- test/ngAnimate/animateJsDriverSpec.js | 1 - test/ngAnimate/animateSpec.js | 1 - test/ngAria/ariaSpec.js | 1 - test/ngCookies/cookieStoreSpec.js | 3 - test/ngCookies/cookieWriterSpec.js | 5 - test/ngCookies/cookiesSpec.js | 14 -- test/ngMessageFormat/messageFormatSpec.js | 17 -- test/ngMessages/messagesSpec.js | 2 - test/ngMock/angular-mocksSpec.js | 98 -------- test/ngResource/resourceSpec.js | 63 ----- test/ngRoute/directive/ngViewSpec.js | 25 -- test/ngRoute/routeParamsSpec.js | 2 - test/ngRoute/routeSpec.js | 32 --- test/ngSanitize/directive/ngBindHtmlSpec.js | 2 - test/ngScenario/ApplicationSpec.js | 2 - test/ngScenario/ScenarioSpec.js | 1 - test/ngScenario/dslSpec.js | 3 - test/ngTouch/directive/ngClickSpec.js | 21 -- test/ngTouch/directive/ngSwipeSpec.js | 1 - 145 files changed, 1 insertion(+), 2605 deletions(-) diff --git a/.jscs.json b/.jscs.json index 4d2b16f30bc..622cb720adb 100644 --- a/.jscs.json +++ b/.jscs.json @@ -4,6 +4,7 @@ "disallowKeywordsOnNewLine": ["else"], "disallowMixedSpacesAndTabs": true, "disallowMultipleLineStrings": true, + "disallowMultipleLineBreaks": true, "disallowNewlineBeforeBlockStatements": true, "disallowSpaceAfterObjectKeys": true, "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], diff --git a/.jscs.json.todo b/.jscs.json.todo index 5e52d23ed7a..3a2685d4f5c 100644 --- a/.jscs.json.todo +++ b/.jscs.json.todo @@ -7,7 +7,6 @@ "validateParameterSeparator": ", ", // Re-assert this rule when JSCS allows multiple spaces "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], "disallowImplicitTypeConversion": ["string"], - "disallowMultipleLineBreaks": true, "validateJSDoc": { "checkParamNames": true, "requireParamTypes": true diff --git a/src/Angular.js b/src/Angular.js index 0d07cc7f0f5..73a566f0adf 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -143,7 +143,6 @@ var hasOwnProperty = Object.prototype.hasOwnProperty; */ var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;}; - var manualLowercase = function(s) { /* jshint bitwise: false */ return isString(s) @@ -157,7 +156,6 @@ var manualUppercase = function(s) { : s; }; - // String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish // locale, for this reason we need to detect this case and redefine lowercase/uppercase methods // with correct but slower alternatives. @@ -166,7 +164,6 @@ if ('i' !== 'I'.toLowerCase()) { uppercase = manualUppercase; } - var msie, // holds major version number for IE, or NaN if UA is not IE. jqLite, // delay binding since jQuery could be loaded after us. @@ -188,7 +185,6 @@ var */ msie = document.documentMode; - /** * @private * @param {*} obj @@ -284,7 +280,6 @@ function forEachSorted(obj, iterator, context) { return keys; } - /** * when using forEach the params are value, key, but it is often useful to have key, value. * @param {function(string, *)} iteratorFn @@ -308,7 +303,6 @@ function nextUid() { return ++uid; } - /** * Set or clear the hashkey for an object. * @param obj object @@ -322,7 +316,6 @@ function setHashKey(obj, h) { } } - function baseExtend(dst, objs, deep) { var h = dst.$$hashKey; @@ -369,7 +362,6 @@ function extend(dst) { return baseExtend(dst, slice.call(arguments, 1), false); } - /** * @ngdoc function * @name angular.merge @@ -392,13 +384,10 @@ function merge(dst) { return baseExtend(dst, slice.call(arguments, 1), true); } - - function toInt(str) { return parseInt(str, 10); } - function inherit(parent, extra) { return extend(Object.create(parent), extra); } @@ -422,7 +411,6 @@ function inherit(parent, extra) { function noop() {} noop.$inject = []; - /** * @ngdoc function * @name angular.identity @@ -444,7 +432,6 @@ noop.$inject = []; function identity($) {return $;} identity.$inject = []; - function valueFn(value) {return function() {return value;};} /** @@ -461,7 +448,6 @@ function valueFn(value) {return function() {return value;};} */ function isUndefined(value) {return typeof value === 'undefined';} - /** * @ngdoc function * @name angular.isDefined @@ -476,7 +462,6 @@ function isUndefined(value) {return typeof value === 'undefined';} */ function isDefined(value) {return typeof value !== 'undefined';} - /** * @ngdoc function * @name angular.isObject @@ -495,7 +480,6 @@ function isObject(value) { return value !== null && typeof value === 'object'; } - /** * @ngdoc function * @name angular.isString @@ -510,7 +494,6 @@ function isObject(value) { */ function isString(value) {return typeof value === 'string';} - /** * @ngdoc function * @name angular.isNumber @@ -531,7 +514,6 @@ function isString(value) {return typeof value === 'string';} */ function isNumber(value) {return typeof value === 'number';} - /** * @ngdoc function * @name angular.isDate @@ -548,7 +530,6 @@ function isDate(value) { return toString.call(value) === '[object Date]'; } - /** * @ngdoc function * @name angular.isArray @@ -577,7 +558,6 @@ var isArray = Array.isArray; */ function isFunction(value) {return typeof value === 'function';} - /** * Determines if a value is a regular expression object. * @@ -589,7 +569,6 @@ function isRegExp(value) { return toString.call(value) === '[object RegExp]'; } - /** * Checks if `obj` is a window object. * @@ -601,43 +580,35 @@ function isWindow(obj) { return obj && obj.window === obj; } - function isScope(obj) { return obj && obj.$evalAsync && obj.$watch; } - function isFile(obj) { return toString.call(obj) === '[object File]'; } - function isFormData(obj) { return toString.call(obj) === '[object FormData]'; } - function isBlob(obj) { return toString.call(obj) === '[object Blob]'; } - function isBoolean(value) { return typeof value === 'boolean'; } - function isPromiseLike(obj) { return obj && isFunction(obj.then); } - var TYPED_ARRAY_REGEXP = /^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/; function isTypedArray(value) { return TYPED_ARRAY_REGEXP.test(toString.call(value)); } - var trim = function(value) { return isString(value) ? value.trim() : value; }; @@ -650,7 +621,6 @@ var escapeForRegexp = function(s) { replace(/\x08/g, '\\x08'); }; - /** * @ngdoc function * @name angular.isElement @@ -681,7 +651,6 @@ function makeMap(str) { return obj; } - function nodeName_(element) { return lowercase(element.nodeName || (element[0] && element[0].nodeName)); } @@ -860,7 +829,6 @@ function shallowCopy(src, dst) { return dst || src; } - /** * @ngdoc function * @name angular.equals @@ -1012,7 +980,6 @@ function sliceArgs(args, startIndex) { return slice.call(args, startIndex || 0); } - /* jshint -W101 */ /** * @ngdoc function @@ -1052,7 +1019,6 @@ function bind(self, fn) { } } - function toJsonReplacer(key, value) { var val = value; @@ -1069,7 +1035,6 @@ function toJsonReplacer(key, value) { return val; } - /** * @ngdoc function * @name angular.toJson @@ -1093,7 +1058,6 @@ function toJson(obj, pretty) { return JSON.stringify(obj, toJsonReplacer, pretty); } - /** * @ngdoc function * @name angular.fromJson @@ -1112,27 +1076,23 @@ function fromJson(json) { : json; } - function timezoneToOffset(timezone, fallback) { var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; } - function addDateMinutes(date, minutes) { date = new Date(date.getTime()); date.setMinutes(date.getMinutes() + minutes); return date; } - function convertTimezoneToLocal(date, timezone, reverse) { reverse = reverse ? -1 : 1; var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset()); return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset())); } - /** * @returns {string} Returns the string representation of the element. */ @@ -1155,7 +1115,6 @@ function startingTag(element) { } - ///////////////////////////////////////////////// /** @@ -1174,7 +1133,6 @@ function tryDecodeURIComponent(value) { } } - /** * Parses an escaped url query string into key-value pairs. * @returns {Object.} @@ -1216,7 +1174,6 @@ function toKeyValue(obj) { return parts.length ? parts.join('&') : ''; } - /** * We need our custom method because encodeURIComponent is too aggressive and doesn't follow * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path @@ -1235,7 +1192,6 @@ function encodeUriSegment(val) { replace(/%2B/gi, '+'); } - /** * This method is intended for encoding *key* or *value* parts of query component. We need a custom * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be @@ -1721,7 +1677,6 @@ function getBlockNodes(nodes) { return jqLite(blockNodes); } - /** * Creates a new object without a prototype. This object is useful for lookup without having to * guard against prototypically inherited properties via hasOwnProperty. diff --git a/src/AngularPublic.js b/src/AngularPublic.js index 3f530626d3e..8fa28e17d73 100644 --- a/src/AngularPublic.js +++ b/src/AngularPublic.js @@ -93,7 +93,6 @@ $$CookieReaderProvider */ - /** * @ngdoc object * @name angular.version @@ -116,7 +115,6 @@ var version = { codeName: '"NG_VERSION_CODENAME"' }; - function publishExternalAPI(angular) { extend(angular, { 'bootstrap': bootstrap, diff --git a/src/apis.js b/src/apis.js index 0549730be60..d053680073f 100644 --- a/src/apis.js +++ b/src/apis.js @@ -1,6 +1,5 @@ 'use strict'; - /** * Computes a hash of an 'obj'. * Hash of a: diff --git a/src/auto/injector.js b/src/auto/injector.js index 80db9ee68e5..9d2e3deb71d 100644 --- a/src/auto/injector.js +++ b/src/auto/injector.js @@ -53,7 +53,6 @@ * ``` */ - /** * @ngdoc module * @name auto @@ -307,9 +306,6 @@ function annotate(fn, strictDi, name) { * @returns {Array.} The names of the services which the function requires. */ - - - /** * @ngdoc service * @name $provide @@ -479,7 +475,6 @@ function annotate(fn, strictDi, name) { * ``` */ - /** * @ngdoc method * @name $provide#service @@ -520,7 +515,6 @@ function annotate(fn, strictDi, name) { * ``` */ - /** * @ngdoc method * @name $provide#value @@ -553,7 +547,6 @@ function annotate(fn, strictDi, name) { * ``` */ - /** * @ngdoc method * @name $provide#constant @@ -581,7 +574,6 @@ function annotate(fn, strictDi, name) { * ``` */ - /** * @ngdoc method * @name $provide#decorator @@ -612,7 +604,6 @@ function annotate(fn, strictDi, name) { * ``` */ - function createInjector(modulesToLoad, strictDi) { strictDi = (strictDi === true); var INSTANTIATING = {}, @@ -643,7 +634,6 @@ function createInjector(modulesToLoad, strictDi) { return instanceInjector.invoke(provider.$get, provider, undefined, serviceName); })); - forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); }); return instanceInjector; diff --git a/src/jqLite.js b/src/jqLite.js index 9c82469260f..750715ad501 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -132,7 +132,6 @@ JQLite._data = function(node) { function jqNextId() { return ++jqId; } - var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g; var MOZ_HACK_REGEXP = /^moz([A-Z])/; var MOUSE_EVENT_MAP= { mouseleave: "mouseout", mouseenter: "mouseover"}; @@ -170,7 +169,6 @@ wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; - function jqLiteIsTextNode(html) { return !HTML_REGEXP.test(html); } @@ -328,7 +326,6 @@ function jqLiteRemoveData(element, name) { } } - function jqLiteExpandoStore(element, createIfNecessary) { var expandoId = element.ng339, expandoStore = expandoId && jqCache[expandoId]; @@ -341,7 +338,6 @@ function jqLiteExpandoStore(element, createIfNecessary) { return expandoStore; } - function jqLiteData(element, key, value) { if (jqLiteAcceptsData(element)) { @@ -402,7 +398,6 @@ function jqLiteAddClass(element, cssClasses) { } } - function jqLiteAddNodes(root, elements) { // THIS CODE IS VERY HOT. Don't make changes without benchmarking. @@ -428,7 +423,6 @@ function jqLiteAddNodes(root, elements) { } } - function jqLiteController(element, name) { return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller'); } @@ -466,7 +460,6 @@ function jqLiteRemove(element, keepData) { if (parent) parent.removeChild(element); } - function jqLiteDocumentLoaded(action, win) { win = win || window; if (win.document.readyState === 'complete') { @@ -1020,7 +1013,6 @@ forEach({ JQLite.prototype.unbind = JQLite.prototype.off; }); - // Provider for private $$jqLite service function $$jqLiteProvider() { this.$get = function $$jqLite() { diff --git a/src/loader.js b/src/loader.js index 02a2e2d66c4..f557452293b 100644 --- a/src/loader.js +++ b/src/loader.js @@ -135,7 +135,6 @@ function setupModuleLoader(window) { */ name: name, - /** * @ngdoc method * @name angular.Module#provider diff --git a/src/ng/browser.js b/src/ng/browser.js index a698302edce..8aec5721b6c 100644 --- a/src/ng/browser.js +++ b/src/ng/browser.js @@ -324,7 +324,6 @@ function Browser(window, document, $log, $sniffer) { return timeoutId; }; - /** * @name $browser#defer.cancel * diff --git a/src/ng/cacheFactory.js b/src/ng/cacheFactory.js index 377c0c820d5..9b5dc390e12 100644 --- a/src/ng/cacheFactory.js +++ b/src/ng/cacheFactory.js @@ -199,7 +199,6 @@ function $CacheFactoryProvider() { return data[key]; }, - /** * @ngdoc method * @name $cacheFactory.Cache#remove @@ -227,7 +226,6 @@ function $CacheFactoryProvider() { size--; }, - /** * @ngdoc method * @name $cacheFactory.Cache#removeAll @@ -243,7 +241,6 @@ function $CacheFactoryProvider() { freshEnd = staleEnd = null; }, - /** * @ngdoc method * @name $cacheFactory.Cache#destroy @@ -260,7 +257,6 @@ function $CacheFactoryProvider() { delete caches[cacheId]; }, - /** * @ngdoc method * @name $cacheFactory.Cache#info @@ -282,7 +278,6 @@ function $CacheFactoryProvider() { } }; - /** * makes the `entry` the freshEnd of the LRU linked list */ @@ -301,7 +296,6 @@ function $CacheFactoryProvider() { } } - /** * bidirectionally links two entries of the LRU linked list */ @@ -313,7 +307,6 @@ function $CacheFactoryProvider() { } } - /** * @ngdoc method * @name $cacheFactory#info @@ -331,7 +324,6 @@ function $CacheFactoryProvider() { return info; }; - /** * @ngdoc method * @name $cacheFactory#get @@ -346,7 +338,6 @@ function $CacheFactoryProvider() { return caches[cacheId]; }; - return cacheFactory; }; } @@ -399,4 +390,3 @@ function $TemplateCacheProvider() { return $cacheFactory('templates'); }]; } - diff --git a/src/ng/compile.js b/src/ng/compile.js index 0aba65aec10..d2ba500b3e1 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -28,7 +28,6 @@ * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList) */ - /** * @ngdoc service * @name $compile @@ -862,7 +861,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { return this; }; - /** * @ngdoc method * @name $compileProvider#aHrefSanitizationWhitelist @@ -892,7 +890,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } }; - /** * @ngdoc method * @name $compileProvider#imgSrcSanitizationWhitelist @@ -993,7 +990,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { */ $normalize: directiveNormalize, - /** * @ngdoc method * @name $compile.directive.Attributes#$addClass @@ -1153,7 +1149,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }); }, - /** * @ngdoc method * @name $compile.directive.Attributes#$observe @@ -1191,7 +1186,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } }; - function safeAddClass($element, className) { try { $element.addClass(className); @@ -1201,7 +1195,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } } - var startSymbol = $interpolate.startSymbol(), endSymbol = $interpolate.endSymbol(), denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}') @@ -1382,7 +1375,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn; var stableNodeList; - if (nodeLinkFnFound) { // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our // offsets don't get screwed up @@ -1864,7 +1856,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } } - function getControllers(directiveName, require, $element, elementControllers) { var value; @@ -2106,7 +2097,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { return match; } - /** * looks up the directive and returns true if it is a multi-element directive, * and therefore requires DOM nodes between -start and -end markers to be grouped @@ -2169,7 +2159,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }); } - function compileTemplateUrl(directives, $compileNode, tAttrs, $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) { var linkQueue = [], @@ -2284,7 +2273,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }; } - /** * Sorting function for bound directives. */ @@ -2295,7 +2283,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { return a.index - b.index; } - function assertNoDuplicate(what, previousDirective, directive, element) { if (previousDirective) { throw $compileMinErr('multidir', 'Multiple directives [{0}, {1}] asking for {2} on: {3}', @@ -2303,7 +2290,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } } - function addTextInterpolateDirective(directives, text) { var interpolateFn = $interpolate(text, true); if (interpolateFn) { @@ -2330,7 +2316,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } } - function wrapTemplate(type, template) { type = lowercase(type || 'html'); switch (type) { @@ -2344,7 +2329,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } } - function getTrustedContext(node, attrNormalizedName) { if (attrNormalizedName == "srcdoc") { return $sce.HTML; @@ -2359,7 +2343,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } } - function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) { var trustedContext = getTrustedContext(node, name); allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing; @@ -2369,7 +2352,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { // no interpolation found -> ignore if (!interpolateFn) return; - if (name === "multiple" && nodeName_(node) === "select") { throw $compileMinErr("selmulti", "Binding to the 'multiple' attribute is not supported. Element: {0}", @@ -2429,7 +2411,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }); } - /** * This is a special jqLite.replaceWith, which can replace items which * have no parents, provided that the containing jqLite collection is provided. @@ -2513,12 +2494,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { elementsToRemove.length = 1; } - function cloneAndAnnotateFn(fn, annotation) { return extend(function() { return fn.apply(null, arguments); }, fn, annotation); } - function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) { try { linkFn(scope, $element, attrs, controllers, transcludeFn); @@ -2527,7 +2506,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } } - // Set up $watches for isolate scope and controller bindings. This process // only occurs for isolate scopes and new scopes with controllerAs. function initializeDirectiveBindings(scope, attrs, destination, bindings, @@ -2657,7 +2635,6 @@ function directiveNormalize(name) { * needed to do reverse lookup from normalized name back to actual name. */ - /** * @ngdoc method * @name $compile.directive.Attributes#$set @@ -2673,8 +2650,6 @@ function directiveNormalize(name) { * @param {string} value Value to set the attribute to. The value can be an interpolated string. */ - - /** * Closure compiler type information */ diff --git a/src/ng/controller.js b/src/ng/controller.js index 4e64f3417a8..a207fdaa829 100644 --- a/src/ng/controller.js +++ b/src/ng/controller.js @@ -2,7 +2,6 @@ var $controllerMinErr = minErr('$controller'); - var CNTRL_REG = /^(\S+)(\s+as\s+(\w+))?$/; function identifierForController(controller, ident) { if (ident && isString(ident)) return ident; @@ -12,7 +11,6 @@ function identifierForController(controller, ident) { } } - /** * @ngdoc provider * @name $controllerProvider @@ -53,7 +51,6 @@ function $ControllerProvider() { globals = true; }; - this.$get = ['$injector', '$window', function($injector, $window) { /** diff --git a/src/ng/directive/attrs.js b/src/ng/directive/attrs.js index 6854df03aaf..0d1b2b34cbe 100644 --- a/src/ng/directive/attrs.js +++ b/src/ng/directive/attrs.js @@ -198,7 +198,6 @@ * then the `disabled` attribute will be set on the element */ - /** * @ngdoc directive * @name ngChecked @@ -233,7 +232,6 @@ * then special attribute "checked" will be set on the element */ - /** * @ngdoc directive * @name ngReadonly @@ -268,7 +266,6 @@ * then special attribute "readonly" will be set on the element */ - /** * @ngdoc directive * @name ngSelected diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index 9c7f52564c9..1039a73a403 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -170,7 +170,6 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { arrayRemove(controls, control); }; - /** * @ngdoc method * @name form.FormController#$setValidity diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index a4d87a0adf7..b2eb4da3878 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -689,7 +689,6 @@ var inputType = { */ 'number': numberInputType, - /** * @ngdoc input * @name input[url] @@ -784,7 +783,6 @@ var inputType = { */ 'url': urlInputType, - /** * @ngdoc input * @name input[email] @@ -878,7 +876,6 @@ var inputType = { */ 'email': emailInputType, - /** * @ngdoc input * @name input[radio] @@ -941,7 +938,6 @@ var inputType = { */ 'radio': radioInputType, - /** * @ngdoc input * @name input[checkbox] @@ -1417,7 +1413,6 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt }); } - /** * @ngdoc directive * @name textarea @@ -1447,7 +1442,6 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. */ - /** * @ngdoc directive * @name input @@ -1595,8 +1589,6 @@ var inputDirective = ['$browser', '$sniffer', '$filter', '$parse', }; }]; - - var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/; /** * @ngdoc directive @@ -1674,6 +1666,3 @@ var ngValueDirective = function() { } }; }; - - - diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 37660a75ba5..6fc2253f800 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -67,7 +67,6 @@ var ngBindDirective = ['$compile', function($compile) { }; }]; - /** * @ngdoc directive * @name ngBindTemplate @@ -135,7 +134,6 @@ var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate }; }]; - /** * @ngdoc directive * @name ngBindHtml diff --git a/src/ng/directive/ngClass.js b/src/ng/directive/ngClass.js index cd1f6241efd..2dba06e4a89 100644 --- a/src/ng/directive/ngClass.js +++ b/src/ng/directive/ngClass.js @@ -14,7 +14,6 @@ function classDirective(name, selector) { ngClassWatchAction(scope.$eval(attr[name])); }); - if (name !== 'ngClass') { scope.$watch('$index', function($index, old$index) { // jshint bitwise: false @@ -283,7 +282,6 @@ function classDirective(name, selector) { - ## ngClass and pre-existing CSS3 Transitions/Animations The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure. Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index c14b173a2b4..86bd04b2b8c 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -99,7 +99,6 @@ forEach( */ - /** * @ngdoc directive * @name ngMousedown @@ -123,7 +122,6 @@ forEach( */ - /** * @ngdoc directive * @name ngMouseup @@ -170,7 +168,6 @@ forEach( */ - /** * @ngdoc directive * @name ngMouseenter @@ -194,7 +191,6 @@ forEach( */ - /** * @ngdoc directive * @name ngMouseleave @@ -218,7 +214,6 @@ forEach( */ - /** * @ngdoc directive * @name ngMousemove @@ -242,7 +237,6 @@ forEach( */ - /** * @ngdoc directive * @name ngKeydown @@ -264,7 +258,6 @@ forEach( */ - /** * @ngdoc directive * @name ngKeyup @@ -291,7 +284,6 @@ forEach( */ - /** * @ngdoc directive * @name ngKeypress @@ -313,7 +305,6 @@ forEach( */ - /** * @ngdoc directive * @name ngSubmit diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js index c4540c7c107..a02d29fc6be 100644 --- a/src/ng/directive/ngInclude.js +++ b/src/ng/directive/ngInclude.js @@ -143,7 +143,6 @@ */ - /** * @ngdoc event * @name ngInclude#$includeContentRequested @@ -155,7 +154,6 @@ * @param {String} src URL of content to load. */ - /** * @ngdoc event * @name ngInclude#$includeContentLoaded @@ -167,7 +165,6 @@ * @param {String} src URL of content to load. */ - /** * @ngdoc event * @name ngInclude#$includeContentError diff --git a/src/ng/directive/ngList.js b/src/ng/directive/ngList.js index 0b48853eb07..7ba2a6bb5b7 100644 --- a/src/ng/directive/ngList.js +++ b/src/ng/directive/ngList.js @@ -1,6 +1,5 @@ 'use strict'; - /** * @ngdoc directive * @name ngList diff --git a/src/ng/directive/ngModel.js b/src/ng/directive/ngModel.js index b3d23a93d87..1a2490e4509 100644 --- a/src/ng/directive/ngModel.js +++ b/src/ng/directive/ngModel.js @@ -16,7 +16,6 @@ var VALID_CLASS = 'ng-valid', TOUCHED_CLASS = 'ng-touched', PENDING_CLASS = 'ng-pending'; - var $ngModelMinErr = new minErr('ngModel'); /** @@ -238,7 +237,6 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$ this.$pending = undefined; // keep pending keys here this.$name = $interpolate($attr.name || '', false)($scope); - var parsedNgModel = $parse($attr.ngModel), parsedNgModelAssign = parsedNgModel.assign, ngModelGet = parsedNgModel, @@ -838,7 +836,6 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$ }); }]; - /** * @ngdoc directive * @name ngModel @@ -1063,8 +1060,6 @@ var ngModelDirective = ['$rootScope', function($rootScope) { }; }]; - - 'use strict'; var DEFAULT_REGEXP = /(\s+|^)default(\s+|$)/; @@ -1250,8 +1245,6 @@ var ngModelOptionsDirective = function() { }; }; - - // helper methods function addSetValidityMethod(context) { var ctrl = context.ctrl, diff --git a/src/ng/directive/ngOptions.js b/src/ng/directive/ngOptions.js index 3642e729098..1326d9e357c 100644 --- a/src/ng/directive/ngOptions.js +++ b/src/ng/directive/ngOptions.js @@ -188,8 +188,6 @@ var ngOptionsMinErr = minErr('ngOptions');
- - Select .

@@ -227,7 +225,6 @@ var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s // 9: track by expression // jshint maxlen: 100 - var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) { function parseOptionsExpression(optionsExp, selectElement, scope) { @@ -279,7 +276,6 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) { return locals; }; - function Option(selectValue, viewValue, label, group, disabled) { this.selectValue = selectValue; this.viewValue = viewValue; @@ -327,7 +323,6 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) { var optionValues = valuesFn(scope) || []; var optionValuesKeys; - if (!keyName && isArrayLike(optionValues)) { optionValuesKeys = optionValues; } else { @@ -373,7 +368,6 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) { }; } - // we can't just jqLite('