Skip to content

Commit f15ccb9

Browse files
JeanMechealxhub
authored andcommitted
docs(docs-infra): enable tslint (angular#58961)
PR Close angular#58961
1 parent fe40143 commit f15ccb9

File tree

93 files changed

+620
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+620
-92
lines changed

adev/karma.conf.js

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
// Karma configuration file, see link for more information
210
// https://karma-runner.github.io/1.0/config/configuration-file.html
311

adev/scripts/update-cli-help/index.mjs

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
9+
//tslint:disable:no-console
110
import {execSync} from 'node:child_process';
211
import {readFile, writeFile, readdir, mkdtemp, realpath, copyFile, unlink} from 'node:fs/promises';
312
import {tmpdir} from 'node:os';

adev/shared-docs/components/top-level-banner/top-level-banner.component.spec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {ComponentFixture, TestBed} from '@angular/core/testing';
210

311
import {STORAGE_KEY_PREFIX, TopLevelBannerComponent} from './top-level-banner.component';

adev/shared-docs/components/top-level-banner/top-level-banner.component.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {ChangeDetectionStrategy, Component, inject, input, OnInit, signal} from '@angular/core';
210
import {ExternalLink} from '../../directives';
311
import {LOCAL_STORAGE} from '../../providers';

adev/shared-docs/pipeline/api-gen/extraction/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {readFileSync, writeFileSync} from 'fs';
210
import path from 'path';
311
// @ts-ignore This compiles fine, but Webstorm doesn't like the ESM import in a CJS context.

adev/shared-docs/pipeline/api-gen/extraction/test/dummy-entry-point/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
export class Version {
210
constructor(public sha: string = '') {}
311
}

adev/shared-docs/pipeline/api-gen/extraction/test/fake-source.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
// @ts-ignore Intentionally nonexistent path for testing purposes.
210
import {Version} from '@angular/dummy-package';
311

adev/shared-docs/pipeline/api-gen/manifest/generate_manifest.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
// @ts-ignore This compiles fine, but Webstorm doesn't like the ESM import in a CJS context.
210
import type {DocEntry, EntryCollection, JsDocTagEntry, FunctionEntry} from '@angular/compiler-cli';
311

adev/shared-docs/pipeline/api-gen/manifest/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {readFileSync, writeFileSync} from 'fs';
210
import {generateManifest} from './generate_manifest';
311
import type {EntryCollection} from '@angular/compiler-cli';
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
export function superNavigate() {}

adev/shared-docs/pipeline/api-gen/manifest/test/manifest.spec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
// @ts-ignore This compiles fine, but Webstorm doesn't like the ESM import in a CJS context.
210
import {DocEntry, EntryType, FunctionEntry, JsDocTagEntry} from '@angular/compiler-cli';
311
import {generateManifest, Manifest} from '../generate_manifest';

adev/shared-docs/pipeline/api-gen/rendering/cli-entities.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
/** The JSON data file format for CLI reference info. */
210
export interface CliCommand {
311
name: string;

adev/shared-docs/pipeline/api-gen/rendering/entities/categorization.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {
210
ClassEntry,
311
ConstantEntry,

adev/shared-docs/pipeline/api-gen/rendering/entities/traits.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {JsDocTagEntry, MemberEntry, ParameterEntry} from '../entities';
210

311
import {

adev/shared-docs/pipeline/api-gen/rendering/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {existsSync, mkdirSync, readFileSync, writeFileSync} from 'fs';
210
import path from 'path';
311
import {CliCommand} from './cli-entities';

adev/shared-docs/pipeline/api-gen/rendering/marked/configuration.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {marked} from 'marked';
210
import {renderer} from './renderer';
311

adev/shared-docs/pipeline/api-gen/rendering/shiki/shiki.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
let highlighter: any;
210

311
export async function initHighlighter() {

adev/shared-docs/pipeline/api-gen/rendering/symbol-context.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
/**
210
* API pages are generated each package at a time.
311
* This allows to use a global context to store the symbols and their corresponding module names.

adev/shared-docs/pipeline/api-gen/rendering/templates/cli-reference.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ function commandName(entry: CliCommandRenderable, command: string) {
6161
} else {
6262
return command;
6363
}
64-
}
64+
}

adev/shared-docs/pipeline/api-gen/rendering/templates/code-symbols.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {h} from 'preact';
210
import {getModuleName} from '../symbol-context';
311
import {getLinkToModule} from '../transforms/url-transforms';

adev/shared-docs/pipeline/api-gen/rendering/test/cli.spec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {runfiles} from '@bazel/runfiles';
210
import {readFile} from 'fs/promises';
311
import {JSDOM} from 'jsdom';

adev/shared-docs/pipeline/api-gen/rendering/test/marked.spec.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {runfiles} from '@bazel/runfiles';
210
import {readFile} from 'fs/promises';
311
import {JSDOM} from 'jsdom';
@@ -42,7 +50,6 @@ describe('markdown to html', () => {
4250
expect(header).toBeDefined();
4351
expect(header.outerHTML).not.toContain('```');
4452

45-
console.log(entries2.get('afterNextRender'));
4653
const list = afterNextRenderEntry.querySelector('ul')!;
4754
expect(list).toBeDefined();
4855

adev/shared-docs/pipeline/api-gen/rendering/test/renderable.spec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {runfiles} from '@bazel/runfiles';
210
import {readFile} from 'fs/promises';
311
import {getRenderable} from '../processing';

adev/shared-docs/pipeline/api-gen/rendering/test/transforms/code-transforms.spec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {makeGenericsText} from '../../transforms/code-transforms';
210

311
describe('makeGenericsText', () => {

adev/shared-docs/pipeline/api-gen/rendering/test/transforms/jsdoc-transforms.spec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {setCurrentSymbol, setSymbols} from '../../symbol-context';
210
import {addHtmlAdditionalLinks} from '../../transforms/jsdoc-transforms';
311

adev/shared-docs/pipeline/api-gen/rendering/transforms/initializer-api-functions-transform.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {InitializerApiFunctionEntry} from '../entities';
210

311
import {InitializerApiFunctionRenderable} from '../entities/renderables';

adev/shared-docs/pipeline/examples/template/karma.conf.js

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
// Karma configuration file, see link for more information
210
// https://karma-runner.github.io/1.0/config/configuration-file.html
311

adev/shared-docs/pipeline/guides/extensions/docs-code/format/diff.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {diffLines, Change as DiffChange} from 'diff';
210
import {CodeToken} from './index';
311
import {loadWorkspaceRelativeFile} from '../../../utils';

adev/shared-docs/pipeline/guides/extensions/docs-code/format/highlight.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {decode} from 'html-entities';
210
import {CodeToken} from './index';
311
import {expandRangeStringValues} from './range';

adev/shared-docs/pipeline/guides/extensions/docs-code/format/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {Tokens} from 'marked';
210
import {DiffMetadata, calculateDiff} from './diff';
311
import {highlightCode} from './highlight';

adev/shared-docs/pipeline/guides/extensions/docs-code/format/range.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
/**
210
* Expand a provided set of range values into a singel array of all values in the range.
311
*

adev/shared-docs/pipeline/guides/extensions/docs-code/format/region.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {CodeToken} from './index';
210
import {regionParser} from '../regions/region-parser';
311
import {FileType} from '../sanitizers/eslint';

adev/shared-docs/pipeline/guides/mermaid/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
19
import {DocsCodeToken} from '../extensions/docs-code/docs-code';
210
import {chromium} from 'playwright-core';
311
import {Mermaid, MermaidConfig} from 'mermaid';

0 commit comments

Comments
 (0)