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

start to deprecate boolean for codeActionsOnSave #201808

Merged
merged 2 commits into from
Jan 5, 2024
Merged
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 @@ -19,7 +19,7 @@ import { IExtensionPoint } from 'vs/workbench/services/extensions/common/extensi

const createCodeActionsAutoSave = (description: string): IJSONSchema => {
return {
type: ['string', 'boolean'],
type: 'string',
enum: ['always', 'explicit', 'never', true, false],
enumDescriptions: [
nls.localize('alwaysSave', 'Triggers Code Actions on explicit saves and auto saves triggered by window or focus changes.'),
Expand All @@ -28,7 +28,7 @@ const createCodeActionsAutoSave = (description: string): IJSONSchema => {
nls.localize('explicitSaveBoolean', 'Triggers Code Actions only when explicitly saved. This value will be deprecated in favor of "explicit".'),
nls.localize('neverSaveBoolean', 'Never triggers Code Actions on save. This value will be deprecated in favor of "never".')
],
default: true,
default: 'explicit',
description: description
};
};
Expand All @@ -43,7 +43,7 @@ const codeActionsOnSaveSchema: IConfigurationPropertySchema = {
type: 'object',
properties: codeActionsOnSaveDefaultProperties,
additionalProperties: {
type: ['string', 'boolean']
type: 'string'
},
},
{
Expand All @@ -54,7 +54,7 @@ const codeActionsOnSaveSchema: IConfigurationPropertySchema = {
markdownDescription: nls.localize('editor.codeActionsOnSave', 'Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. Example: `"source.organizeImports": "explicit" `'),
type: ['object', 'array'],
additionalProperties: {
type: ['string', 'boolean'],
type: 'string',
enum: ['always', 'explicit', 'never', true, false],
},
default: {},
Expand Down