Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make add missing new auto fixable #175720

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 }],
]);

Expand Down
19 changes: 10 additions & 9 deletions extensions/typescript-language-features/src/utils/fixNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 constructorForDerivedNeedSuperCall = 'constructorForDerivedNeedSuperCall';
export const extendsInterfaceBecomesImplements = 'extendsInterfaceBecomesImplements';
export const awaitInSyncFunction = 'fixAwaitInSyncFunction';
export const classIncorrectlyImplementsInterface = 'fixClassIncorrectlyImplementsInterface';
export const classDoesntImplementInheritedAbstractMember = 'fixClassDoesntImplementInheritedAbstractMember';
export const unreachableCode = 'fixUnreachableCode';
export const unusedIdentifier = 'unusedIdentifier';
export const forgottenThisPropertyAccess = 'forgottenThisPropertyAccess';
export const spelling = 'spelling';
export const classIncorrectlyImplementsInterface = 'fixClassIncorrectlyImplementsInterface';
export const constructorForDerivedNeedSuperCall = 'constructorForDerivedNeedSuperCall';
export const extendsInterfaceBecomesImplements = 'extendsInterfaceBecomesImplements';
export const fixImport = 'import';
export const addMissingAwait = 'addMissingAwait';
export const addMissingOverride = 'fixOverrideModifier';
export const forgottenThisPropertyAccess = 'forgottenThisPropertyAccess';
export const removeUnnecessaryAwait = 'removeUnnecessaryAwait';
export const spelling = 'spelling';
export const unreachableCode = 'fixUnreachableCode';
export const unusedIdentifier = 'unusedIdentifier';