* Issue #93589: Rename 'renameShorthandProperties' setting to 'useAliasesForRenames' * Issue 93589: Added deprecation message to 'renameShorthandProperties' preference * Issue 93589: Old and new setting value added for mitigtion Co-authored-by: joshuahs <joshuahs@umich.edu>
This commit is contained in:
parent
1d10fe1deb
commit
3f9e68436b
3 changed files with 17 additions and 2 deletions
|
@ -678,12 +678,26 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": true,
|
||||||
"description": "%typescript.preferences.renameShorthandProperties%",
|
"description": "%typescript.preferences.renameShorthandProperties%",
|
||||||
|
"deprecationMessage": "%typescript.preferences.renameShorthandProperties.deprecationMessage%",
|
||||||
"scope": "resource"
|
"scope": "resource"
|
||||||
},
|
},
|
||||||
"typescript.preferences.renameShorthandProperties": {
|
"typescript.preferences.renameShorthandProperties": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": true,
|
||||||
"description": "%typescript.preferences.renameShorthandProperties%",
|
"description": "%typescript.preferences.renameShorthandProperties%",
|
||||||
|
"deprecationMessage": "%typescript.preferences.renameShorthandProperties.deprecationMessage%",
|
||||||
|
"scope": "resource"
|
||||||
|
},
|
||||||
|
"javascript.preferences.useAliasesForRenames": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "%typescript.preferences.useAliasesForRenames%",
|
||||||
|
"scope": "resource"
|
||||||
|
},
|
||||||
|
"typescript.preferences.useAliasesForRenames": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "%typescript.preferences.useAliasesForRenames%",
|
||||||
"scope": "resource"
|
"scope": "resource"
|
||||||
},
|
},
|
||||||
"typescript.updateImportsOnFileMove.enabled": {
|
"typescript.updateImportsOnFileMove.enabled": {
|
||||||
|
|
|
@ -99,7 +99,8 @@
|
||||||
"configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval": "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.",
|
"configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval": "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.",
|
||||||
"configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling ": "Use a dynamic queue where less-frequently modified files will be checked less often.",
|
"configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling ": "Use a dynamic queue where less-frequently modified files will be checked less often.",
|
||||||
"configuration.tsserver.watchOptions.synchronousWatchDirectory": "Disable deferred watching on directories. Deferred watching is useful when lots of file changes might occur at once (e.g. a change in node_modules from running npm install), but you might want to disable it with this flag for some less-common setups.",
|
"configuration.tsserver.watchOptions.synchronousWatchDirectory": "Disable deferred watching on directories. Deferred watching is useful when lots of file changes might occur at once (e.g. a change in node_modules from running npm install), but you might want to disable it with this flag for some less-common setups.",
|
||||||
"typescript.preferences.renameShorthandProperties": "Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace.",
|
"typescript.preferences.renameShorthandProperties.deprecationMessage": "The setting 'typescript.preferences.renameShorthandProperties' has been deprecated in favor of 'typescript.preferences.useAliasesForRenames'",
|
||||||
|
"typescript.preferences.useAliasesForRenames": "Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace.",
|
||||||
"codeActions.refactor.extract.constant.title": "Extract constant",
|
"codeActions.refactor.extract.constant.title": "Extract constant",
|
||||||
"codeActions.refactor.extract.constant.description": "Extract expression to constant.",
|
"codeActions.refactor.extract.constant.description": "Extract expression to constant.",
|
||||||
"codeActions.refactor.extract.function.title": "Extract function",
|
"codeActions.refactor.extract.function.title": "Extract function",
|
||||||
|
|
|
@ -186,7 +186,7 @@ export default class FileConfigurationManager extends Disposable {
|
||||||
importModuleSpecifierPreference: getImportModuleSpecifierPreference(config),
|
importModuleSpecifierPreference: getImportModuleSpecifierPreference(config),
|
||||||
importModuleSpecifierEnding: getImportModuleSpecifierEndingPreference(config),
|
importModuleSpecifierEnding: getImportModuleSpecifierEndingPreference(config),
|
||||||
allowTextChangesInNewFiles: document.uri.scheme === fileSchemes.file,
|
allowTextChangesInNewFiles: document.uri.scheme === fileSchemes.file,
|
||||||
providePrefixAndSuffixTextForRename: config.get<boolean>('renameShorthandProperties', true),
|
providePrefixAndSuffixTextForRename: config.get<boolean>('renameShorthandProperties', true) === false ? false : config.get<boolean>('useAliasesForRenames', true),
|
||||||
allowRenameOfImportPath: true,
|
allowRenameOfImportPath: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue