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
This commit is contained in:
Alex Rickabaugh 2023-10-10 09:58:57 -07:00 committed by Andrew Scott
parent d5dad3eb4c
commit 4da08dc2ef

View file

@ -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;
}
}