From 4da08dc2ef439d3eced7199afb9a104cfd7b54cc Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Tue, 10 Oct 2023 09:58:57 -0700 Subject: [PATCH] fix(core): remove unnecessary migration (#52141) PR #49672 added a g3-flavored migration for compiler option removal, but g3 doesn't use those options at all. So this migration is unnecessary and we can remove it. PR Close #52141 --- .../migrations/google3/compilerOptionsRule.ts | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 packages/core/schematics/migrations/google3/compilerOptionsRule.ts diff --git a/packages/core/schematics/migrations/google3/compilerOptionsRule.ts b/packages/core/schematics/migrations/google3/compilerOptionsRule.ts deleted file mode 100644 index 41d69900c6f..00000000000 --- a/packages/core/schematics/migrations/google3/compilerOptionsRule.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {Replacement, RuleFailure, Rules} from 'tslint'; -import ts from 'typescript'; - -import {migrateFile} from '../compiler-options/util'; - -/** TSLint rule for the CompilerOptions migration. */ -export class Rule extends Rules.TypedRule { - override applyWithProgram(sourceFile: ts.SourceFile, program: ts.Program): RuleFailure[] { - const failures: RuleFailure[] = []; - - const rewriter = (startPos: number, origLength: number, text: string) => { - const failure = new RuleFailure( - sourceFile, startPos, startPos + origLength, - 'CompilerOptions.useJit and CompilerOptions.missingTranslation are being removed.', - this.ruleName, new Replacement(startPos, origLength, text)); - failures.push(failure); - }; - - migrateFile(sourceFile, rewriter); - - return failures; - } -}