refactor(docs-infra): fix docs examples for Angular-specific tslint rules (#38143)

This commit updates the docs examples to be compatible with the
following Angular-specific tslint rules:
- `component-selector`
- `directive-selector`
- `no-conflicting-lifecycle`
- `no-host-metadata-property`
- `no-input-rename`
- `no-output-native`
- `no-output-rename`

This is in preparation of updating the docs examples `tslint.json` to
match the one generated for new Angular CLI apps in a future commit.

PR Close #38143
This commit is contained in:
George Kalpakas
2020-07-30 13:03:21 +03:00
committed by Alex Rickabaugh
parent 5303773daf
commit bfd13c06e1
27 changed files with 40 additions and 36 deletions

View File

@ -1,5 +1,4 @@
/* tslint:disable: no-unused-variable component-selector-name one-line space-before-function-paren */
/* tslint:disable:*/
/* tslint:disable: no-unused-variable component-selector one-line space-before-function-paren */
// #docplaster
// #docregion
import { Component, forwardRef, Optional, SkipSelf } from '@angular/core';
@ -20,8 +19,7 @@ const DifferentParent = Parent;
// The `parentType` defaults to `Parent` when omitting the second parameter.
// #docregion provide-the-parent
export function provideParent
// #enddocregion provide-parent, provide-the-parent
// #docregion provide-parent
// #enddocregion provide-the-parent
(component: any, parentType?: any) {
return { provide: parentType || Parent, useExisting: forwardRef(() => component) };
}