build(docs-infra): enable the no-redundant-jsdoc
tslint rule to align with CLI (#39018)
This commit enables the `no-redundant-jsdoc` tslint rule to more closely align `tslint.json` with the one generated by the latest Angular CLI for new apps. PR Close #39018
This commit is contained in:
parent
cb80f46c64
commit
4a446878fa
@ -67,7 +67,7 @@ export class ApiService implements OnDestroy {
|
|||||||
* API sections is an array of Angular top modules and metadata about their API documents (items).
|
* API sections is an array of Angular top modules and metadata about their API documents (items).
|
||||||
* Updates `sections` observable
|
* Updates `sections` observable
|
||||||
*
|
*
|
||||||
* @param {string} [src] - Name of the api list JSON file
|
* @param [src] - Name of the api list JSON file
|
||||||
*/
|
*/
|
||||||
fetchSections(src?: string) {
|
fetchSections(src?: string) {
|
||||||
// TODO: get URL by configuration?
|
// TODO: get URL by configuration?
|
||||||
|
@ -37,9 +37,9 @@ export class PrettyPrinter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Format code snippet as HTML
|
* Format code snippet as HTML
|
||||||
* @param {string} code - the code snippet to format; should already be HTML encoded
|
* @param code - the code snippet to format; should already be HTML encoded
|
||||||
* @param {string} [language] - The language of the code to render (could be javascript, html, typescript, etc)
|
* @param [language] - The language of the code to render (could be javascript, html, typescript, etc)
|
||||||
* @param {string|number} [linenums] - Whether to display line numbers:
|
* @param [linenums] - Whether to display line numbers:
|
||||||
* - false: don't display
|
* - false: don't display
|
||||||
* - true: do display
|
* - true: do display
|
||||||
* - number: do display but start at the given number
|
* - number: do display but start at the given number
|
||||||
|
@ -26,7 +26,7 @@ function createIndex(loadIndexFn: IndexLoader): lunr.Index {
|
|||||||
// The lunr typings are missing QueryLexer so we have to add them here manually.
|
// The lunr typings are missing QueryLexer so we have to add them here manually.
|
||||||
const queryLexer = (lunr as any as { QueryLexer: { termSeparator: RegExp } }).QueryLexer;
|
const queryLexer = (lunr as any as { QueryLexer: { termSeparator: RegExp } }).QueryLexer;
|
||||||
queryLexer.termSeparator = lunr.tokenizer.separator = /\s+/;
|
queryLexer.termSeparator = lunr.tokenizer.separator = /\s+/;
|
||||||
return lunr(/** @this */function() {
|
return lunr(function() {
|
||||||
this.ref('path');
|
this.ref('path');
|
||||||
this.field('topics', { boost: 15 });
|
this.field('topics', { boost: 15 });
|
||||||
this.field('titleWords', { boost: 10 });
|
this.field('titleWords', { boost: 10 });
|
||||||
|
@ -100,7 +100,7 @@ export class LocationService {
|
|||||||
/**
|
/**
|
||||||
* Handle user's anchor click
|
* Handle user's anchor click
|
||||||
*
|
*
|
||||||
* @param anchor {HTMLAnchorElement} - the anchor element clicked
|
* @param anchor The anchor element clicked
|
||||||
* @param button Number of the mouse button held down. 0 means left or none
|
* @param button Number of the mouse button held down. 0 means left or none
|
||||||
* @param ctrlKey True if control key held down
|
* @param ctrlKey True if control key held down
|
||||||
* @param metaKey True if command or window key held down
|
* @param metaKey True if command or window key held down
|
||||||
|
@ -13,14 +13,13 @@ import { Logger } from 'app/shared/logger.service';
|
|||||||
* 1. Checks for available ServiceWorker updates once instantiated.
|
* 1. Checks for available ServiceWorker updates once instantiated.
|
||||||
* 2. Re-checks every 6 hours.
|
* 2. Re-checks every 6 hours.
|
||||||
* 3. Whenever an update is available, it activates the update.
|
* 3. Whenever an update is available, it activates the update.
|
||||||
*
|
|
||||||
* @property
|
|
||||||
* `updateActivated` {Observable<string>} - Emit the version hash whenever an update is activated.
|
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SwUpdatesService implements OnDestroy {
|
export class SwUpdatesService implements OnDestroy {
|
||||||
private checkInterval = 1000 * 60 * 60 * 6; // 6 hours
|
private checkInterval = 1000 * 60 * 60 * 6; // 6 hours
|
||||||
private onDestroy = new Subject<void>();
|
private onDestroy = new Subject<void>();
|
||||||
|
|
||||||
|
/** Emit the version hash whenever an update is activated. */
|
||||||
updateActivated: Observable<string>;
|
updateActivated: Observable<string>;
|
||||||
|
|
||||||
constructor(appRef: ApplicationRef, private logger: Logger, private swu: SwUpdate) {
|
constructor(appRef: ApplicationRef, private logger: Logger, private swu: SwUpdate) {
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
true,
|
true,
|
||||||
"ignore-params"
|
"ignore-params"
|
||||||
],
|
],
|
||||||
|
"no-redundant-jsdoc": true,
|
||||||
"no-string-literal": false,
|
"no-string-literal": false,
|
||||||
"no-switch-case-fall-through": true,
|
"no-switch-case-fall-through": true,
|
||||||
"no-var-requires": false,
|
"no-var-requires": false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user