refactor(docs-infra): update docs examples tslint.json to match CLI and fix failures (#38143)

This commit updates the `tslint.json` configuration file, that is used
to lint the docs examples, to match the one generated for new Angular
CLI apps. There are some minimal differences (marked with `TODO`
comments) for things, such as component selector prefix, that would
require extensive and/or difficult to validate changes in guides.

This commit also includes the final adjustments to make the docs
examples code compatible with the new tslint rules. (The bulk of the
work has been done in previous commits.)

PR Close #38143
This commit is contained in:
George Kalpakas
2020-07-30 13:03:23 +03:00
committed by Alex Rickabaugh
parent 42f5770b7b
commit 9c5fc1693a
12 changed files with 323 additions and 155 deletions

View File

@ -51,7 +51,7 @@ import { isPlatformBrowser } from '@angular/common';
export class AppModule {
// #docregion platform-detection
constructor(
@Inject(PLATFORM_ID) private platformId: Object,
@Inject(PLATFORM_ID) private platformId: object,
@Inject(APP_ID) private appId: string) {
const platform = isPlatformBrowser(platformId) ?
'in the browser' : 'on the server';