build: enable noImplicitOverride in project (#42512)

Enables the `noImplicitOverride` option to improve
overall codehealth in the repository.

PR Close #42512
This commit is contained in:
Paul Gschwendtner 2021-06-07 17:09:00 +02:00 committed by Andrew Kushnir
parent e8be045cbd
commit c7d20639c6
8 changed files with 20 additions and 2 deletions

View File

@ -678,7 +678,7 @@ jobs:
background: true
# add module umd tsc compile option so the test can work
# properly in the legacy browsers
- run: yarn tsc -p packages --module UMD
- run: yarn tsc -p packages/tsconfig-legacy-saucelabs.json --module UMD
- run: yarn tsc -p modules --module UMD
- run: yarn bazel build //packages/zone.js:npm_package
# Build test fixtures for a test that rely on Bazel-generated fixtures. Note that disabling

View File

@ -1,6 +1,8 @@
{
"compilerOptions": {
"strict": true,
"downlevelIteration": true
"downlevelIteration": true,
"noImplicitAny": true,
"noImplicitOverride": true
}
}

View File

@ -1,6 +1,7 @@
{
"compilerOptions": {
"noImplicitReturns": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"strict": true,
"moduleResolution": "node",

View File

@ -9,6 +9,7 @@
"strictPropertyInitialization": true,
"outDir": "../../../dist/all/@angular/service-worker/cli-custom",
"noImplicitAny": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"rootDir": ".",
"paths": {

View File

@ -8,6 +8,7 @@
"declaration": true,
"stripInternal": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"strictNullChecks": true,
"strict": true,
"strictPropertyInitialization": true,

View File

@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
// The project uses Bazel for TypeScript compilation. Unlike with Bazel, we build all
// sources as part of a single TypeScript compilation. This results in `@internal`
// declarations not being omitted between the logical as defined per the Bazel targets.
// This can cause issues where the `override` keyword is needed for the legacy TS
// compilation, but not within Bazel where the overridden member has `@internal`.
"noImplicitOverride": false,
}
}

View File

@ -14,6 +14,7 @@
"strictPropertyInitialization": true,
"outDir": "../dist/all/@angular",
"noImplicitAny": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"selenium-webdriver": ["./node_modules/@types/selenium-webdriver/index.d.ts"],

View File

@ -9,6 +9,7 @@
"noEmitOnError": false,
"stripInternal": false,
"strict": true,
"noImplicitOverride": true,
"lib": [
"es5",
"dom",