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

Commit 6ed4c61

Browse files
committed
chore(package): fix some warnings/errors
Related to #14952. Fixed the following warnings/errors: 1. **Warning**: Closure Compiler complained about `/* @this */` (annotations in non-JSDoc comments). Fixed by changing `/* @this */` to `/** @this */`. 2. **Warning**: Dgeni complained about `/** @this */` (invalid tags found). Fixed by adding an empty `this` tag definition in `docs/config/tag-defs/`. 3. **Error**: ESLint complained about CRLF linebreaks in `build/docs/examples/`. These are generated by dgeni and (apparently) use the system's default linebreak (e.g. CRLF on Windows). Fixed by disabling the `linebreak-style` rule for `build/docs/examples/`. Closes #14997
1 parent f83c3de commit 6ed4c61

40 files changed

+69
-61
lines changed

docs/app/src/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ angular.module('search', [])
9595
}
9696

9797
// Create the lunr index
98-
var index = lunr(/* @this */ function() {
98+
var index = lunr(/** @this */ function() {
9999
this.ref('path');
100100
this.field('titleWords', {boost: 50});
101101
this.field('members', { boost: 40});

docs/config/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module.exports = new Package('angularjs', [
5555
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/tutorial-step'));
5656
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/sortOrder'));
5757
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/installation'));
58+
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/this'));
5859
})
5960

6061

docs/config/tag-defs/this.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
name: 'this'
5+
};

docs/gulpfile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ var getMergedEslintConfig = function(filepath) {
3434
strict: 'off',
3535
// Generated examples may miss the final EOL; ignore that.
3636
'eol-last': 'off',
37+
// Generated files use the system's default linebreak style (e.g. CRLF on Windows)
38+
'linebreak-style': 'off',
3739
// While alerts would be bad to have in the library or test code,
3840
// they're perfectly fine in examples.
3941
'no-alert': 'off',

src/apis.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ HashMap.prototype = {
7474
}
7575
};
7676

77-
var $$HashMapProvider = [/* @this */function() {
77+
var $$HashMapProvider = [/** @this */function() {
7878
this.$get = [function() {
7979
return HashMap;
8080
}];

src/auto/injector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ function createInjector(modulesToLoad, strictDi) {
710710
}
711711

712712
function enforceReturnValue(name, factory) {
713-
return /* @this */ function enforcedReturnValue() {
713+
return /** @this */ function enforcedReturnValue() {
714714
var result = instanceInjector.invoke(factory, this);
715715
if (isUndefined(result)) {
716716
throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);

src/jqLite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function jqLiteWrapNode(node, wrapper) {
269269

270270

271271
// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
272-
var jqLiteContains = window.Node.prototype.contains || /* @this */ function(arg) {
272+
var jqLiteContains = window.Node.prototype.contains || /** @this */ function(arg) {
273273
// eslint-disable-next-line no-bitwise
274274
return !!(this.compareDocumentPosition(arg) & 16);
275275
};
@@ -1075,7 +1075,7 @@ forEach({
10751075

10761076

10771077
// Provider for private $$jqLite service
1078-
/* @this */
1078+
/** @this */
10791079
function $$jqLiteProvider() {
10801080
this.$get = function $$jqLite() {
10811081
return extend(JQLite, {

src/ng/animate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ function prepareAnimateOptions(options) {
5353
: {};
5454
}
5555

56-
var $$CoreAnimateJsProvider = /* @this */ function() {
56+
var $$CoreAnimateJsProvider = /** @this */ function() {
5757
this.$get = noop;
5858
};
5959

6060
// this is prefixed with Core since it conflicts with
6161
// the animateQueueProvider defined in ngAnimate/animateQueue.js
62-
var $$CoreAnimateQueueProvider = /* @this */ function() {
62+
var $$CoreAnimateQueueProvider = /** @this */ function() {
6363
var postDigestQueue = new HashMap();
6464
var postDigestElements = [];
6565

@@ -177,7 +177,7 @@ var $$CoreAnimateQueueProvider = /* @this */ function() {
177177
*
178178
* To see the functional implementation check out `src/ngAnimate/animate.js`.
179179
*/
180-
var $AnimateProvider = ['$provide', /* @this */ function($provide) {
180+
var $AnimateProvider = ['$provide', /** @this */ function($provide) {
181181
var provider = this;
182182

183183
this.$$registeredAnimations = Object.create(null);

src/ng/animateRunner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var $$AnimateAsyncRunFactoryProvider = /* @this */ function() {
3+
var $$AnimateAsyncRunFactoryProvider = /** @this */ function() {
44
this.$get = ['$$rAF', function($$rAF) {
55
var waitQueue = [];
66

@@ -31,7 +31,7 @@ var $$AnimateAsyncRunFactoryProvider = /* @this */ function() {
3131
}];
3232
};
3333

34-
var $$AnimateRunnerFactoryProvider = /* @this */ function() {
34+
var $$AnimateRunnerFactoryProvider = /** @this */ function() {
3535
this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$document', '$timeout',
3636
function($q, $sniffer, $$animateAsyncRun, $document, $timeout) {
3737

src/ng/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ function Browser(window, document, $log, $sniffer) {
353353

354354
}
355355

356-
/* @this */
356+
/** @this */
357357
function $BrowserProvider() {
358358
this.$get = ['$window', '$log', '$sniffer', '$document',
359359
function($window, $log, $sniffer, $document) {

0 commit comments

Comments
 (0)