Make add missing new auto fixable (#175720)

Fixes #175719
This commit is contained in:
Matt Bierner
2023-02-28 21:50:11 -08:00
committed by GitHub
parent 7e0666fbe3
commit 1270982c75
2 changed files with 11 additions and 9 deletions

View File

@@ -395,6 +395,7 @@ const preferredFixes = new Map<string, { readonly priority: number; readonly the
[fixNames.spelling, { priority: 0 }],
[fixNames.addMissingAwait, { priority: 2 }],
[fixNames.addMissingOverride, { priority: 2 }],
[fixNames.addMissingNewOperator, { priority: 2 }],
[fixNames.fixImport, { priority: 1, thereCanOnlyBeOne: true }],
]);

View File

@@ -3,17 +3,18 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export const addMissingAwait = 'addMissingAwait';
export const addMissingNewOperator = 'addMissingNewOperator';
export const addMissingOverride = 'fixOverrideModifier';
export const annotateWithTypeFromJSDoc = 'annotateWithTypeFromJSDoc';
export const awaitInSyncFunction = 'fixAwaitInSyncFunction';
export const classDoesntImplementInheritedAbstractMember = 'fixClassDoesntImplementInheritedAbstractMember';
export const classIncorrectlyImplementsInterface = 'fixClassIncorrectlyImplementsInterface';
export const constructorForDerivedNeedSuperCall = 'constructorForDerivedNeedSuperCall';
export const extendsInterfaceBecomesImplements = 'extendsInterfaceBecomesImplements';
export const awaitInSyncFunction = 'fixAwaitInSyncFunction';
export const classIncorrectlyImplementsInterface = 'fixClassIncorrectlyImplementsInterface';
export const classDoesntImplementInheritedAbstractMember = 'fixClassDoesntImplementInheritedAbstractMember';
export const fixImport = 'import';
export const forgottenThisPropertyAccess = 'forgottenThisPropertyAccess';
export const removeUnnecessaryAwait = 'removeUnnecessaryAwait';
export const spelling = 'spelling';
export const unreachableCode = 'fixUnreachableCode';
export const unusedIdentifier = 'unusedIdentifier';
export const forgottenThisPropertyAccess = 'forgottenThisPropertyAccess';
export const spelling = 'spelling';
export const fixImport = 'import';
export const addMissingAwait = 'addMissingAwait';
export const addMissingOverride = 'fixOverrideModifier';
export const removeUnnecessaryAwait = 'removeUnnecessaryAwait';