mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
rename allowTrailingsCommas -> allowTrailingCommas
This commit is contained in:
parent
ff570b5881
commit
cb70fd5ef0
|
@ -14,7 +14,7 @@
|
|||
"dependencies": {
|
||||
"jsonc-parser": "^2.1.1",
|
||||
"request-light": "^0.2.4",
|
||||
"vscode-json-languageservice": "^3.3.3",
|
||||
"vscode-json-languageservice": "^3.3.4",
|
||||
"vscode-languageserver": "^5.3.0-next.8",
|
||||
"vscode-nls": "^4.1.1",
|
||||
"vscode-uri": "^2.0.3"
|
||||
|
|
|
@ -73,10 +73,10 @@ request-light@^0.2.4:
|
|||
https-proxy-agent "^2.2.1"
|
||||
vscode-nls "^4.0.0"
|
||||
|
||||
vscode-json-languageservice@^3.3.3:
|
||||
version "3.3.3"
|
||||
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.3.3.tgz#f7e512a2cd5e82fecbebf507d6fceaea47661297"
|
||||
integrity sha512-5vL3OXTUuQpn6+tGd47dopio+7WwbtIZ07zfYMzAUX8eVWPZjfEsLeSWmQk5Xw+vwgu+j5zC4koz5UofLDGGRA==
|
||||
vscode-json-languageservice@^3.3.4:
|
||||
version "3.3.4"
|
||||
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.3.4.tgz#4ff67580491d3a5dc469f4a78643f20adff0278d"
|
||||
integrity sha512-/nuI4uDBfxyVyeGtBdYwP/tIaXYKOoymUOSozYKLzsmrDmu555gZpzc11LrARa96z92wSaa5hfjTtNMAoM2mxw==
|
||||
dependencies:
|
||||
jsonc-parser "^2.1.1"
|
||||
vscode-languageserver-types "^3.15.0-next.2"
|
||||
|
|
|
@ -61,7 +61,7 @@ export interface IJSONSchema {
|
|||
markdownDescription?: string; // VSCode extension
|
||||
doNotSuggest?: boolean; // VSCode extension
|
||||
allowComments?: boolean; // VSCode extension
|
||||
allowsTrailingCommas?: boolean; // VSCode extension
|
||||
allowTrailingCommas?: boolean; // VSCode extension
|
||||
}
|
||||
|
||||
export interface IJSONSchemaMap {
|
||||
|
|
|
@ -170,7 +170,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
|||
properties: {}
|
||||
};
|
||||
this.configurationContributors = [this.defaultOverridesConfigurationNode];
|
||||
this.editorConfigurationSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting', allowsTrailingCommas: true, allowComments: true };
|
||||
this.editorConfigurationSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting', allowTrailingCommas: true, allowComments: true };
|
||||
this.configurationProperties = {};
|
||||
this.excludedConfigurationProperties = {};
|
||||
this.computeOverridePropertyPattern();
|
||||
|
|
|
@ -238,7 +238,7 @@ function validateProperties(configuration: IConfigurationNode, extension: IExten
|
|||
const jsonRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);
|
||||
jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
default: {
|
||||
folders: [
|
||||
{
|
||||
|
|
|
@ -359,7 +359,7 @@ export class LanguageConfigurationFileHandler {
|
|||
const schemaId = 'vscode://schemas/language-configuration';
|
||||
const schema: IJSONSchema = {
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
default: {
|
||||
comments: {
|
||||
blockComment: ['/*', '*/'],
|
||||
|
|
|
@ -137,7 +137,7 @@ export const launchSchema: IJSONSchema = {
|
|||
id: launchSchemaId,
|
||||
type: 'object',
|
||||
title: nls.localize('app.launch.json.title', "Launch"),
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
allowComments: true,
|
||||
required: [],
|
||||
default: { version: '0.2.0', configurations: [], compounds: [] },
|
||||
|
|
|
@ -11,7 +11,7 @@ export const ExtensionsConfigurationSchemaId = 'vscode://schemas/extensions';
|
|||
export const ExtensionsConfigurationSchema: IJSONSchema = {
|
||||
id: ExtensionsConfigurationSchemaId,
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
type: 'object',
|
||||
title: localize('app.extensions.json.title', "Extensions"),
|
||||
additionalProperties: false,
|
||||
|
|
|
@ -232,7 +232,7 @@ function registerLocaleDefinitionSchema(languages: string[]): void {
|
|||
jsonRegistry.registerSchema(localeDefinitionFileSchemaId, {
|
||||
id: localeDefinitionFileSchemaId,
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
description: 'Locale Definition file',
|
||||
type: 'object',
|
||||
default: {
|
||||
|
|
|
@ -28,7 +28,7 @@ const languageScopeSchemaId = 'vscode://schemas/snippets';
|
|||
const languageScopeSchema: IJSONSchema = {
|
||||
id: languageScopeSchemaId,
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
defaultSnippets: [{
|
||||
label: nls.localize('snippetSchema.json.default', "Empty snippet"),
|
||||
body: { '${1:snippetName}': { 'prefix': '${2:prefix}', 'body': '${3:snippet}', 'description': '${4:description}' } }
|
||||
|
@ -64,7 +64,7 @@ const globalSchemaId = 'vscode://schemas/global-snippets';
|
|||
const globalSchema: IJSONSchema = {
|
||||
id: globalSchemaId,
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
defaultSnippets: [{
|
||||
label: nls.localize('snippetSchema.json.default', "Empty snippet"),
|
||||
body: { '${1:snippetName}': { 'scope': '${2:scope}', 'prefix': '${3:prefix}', 'body': '${4:snippet}', 'description': '${5:description}' } }
|
||||
|
|
|
@ -260,7 +260,7 @@ let schema: IJSONSchema = {
|
|||
id: schemaId,
|
||||
description: 'Task definition file',
|
||||
type: 'object',
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
allowComments: true,
|
||||
default: {
|
||||
version: '2.0.0',
|
||||
|
|
|
@ -507,17 +507,17 @@ export class WorkspaceService extends Disposable implements IConfigurationServic
|
|||
private registerConfigurationSchemas(): void {
|
||||
if (this.workspace) {
|
||||
const jsonRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);
|
||||
const allSettingsSchema: IJSONSchema = { properties: allSettings.properties, patternProperties: allSettings.patternProperties, additionalProperties: true, allowsTrailingCommas: true, allowComments: true };
|
||||
const userSettingsSchema: IJSONSchema = this.remoteUserConfiguration ? { properties: { ...applicationSettings.properties, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowsTrailingCommas: true, allowComments: true } : allSettingsSchema;
|
||||
const machineSettingsSchema: IJSONSchema = { properties: { ...machineSettings.properties, ...machineOverridableSettings.properties, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowsTrailingCommas: true, allowComments: true };
|
||||
const workspaceSettingsSchema: IJSONSchema = { properties: { ...machineOverridableSettings.properties, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowsTrailingCommas: true, allowComments: true };
|
||||
const allSettingsSchema: IJSONSchema = { properties: allSettings.properties, patternProperties: allSettings.patternProperties, additionalProperties: true, allowTrailingCommas: true, allowComments: true };
|
||||
const userSettingsSchema: IJSONSchema = this.remoteUserConfiguration ? { properties: { ...applicationSettings.properties, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowTrailingCommas: true, allowComments: true } : allSettingsSchema;
|
||||
const machineSettingsSchema: IJSONSchema = { properties: { ...machineSettings.properties, ...machineOverridableSettings.properties, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowTrailingCommas: true, allowComments: true };
|
||||
const workspaceSettingsSchema: IJSONSchema = { properties: { ...machineOverridableSettings.properties, ...windowSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowTrailingCommas: true, allowComments: true };
|
||||
|
||||
jsonRegistry.registerSchema(defaultSettingsSchemaId, allSettingsSchema);
|
||||
jsonRegistry.registerSchema(userSettingsSchemaId, userSettingsSchema);
|
||||
jsonRegistry.registerSchema(machineSettingsSchemaId, machineSettingsSchema);
|
||||
|
||||
if (WorkbenchState.WORKSPACE === this.getWorkbenchState()) {
|
||||
const folderSettingsSchema: IJSONSchema = { properties: { ...machineOverridableSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowsTrailingCommas: true, allowComments: true };
|
||||
const folderSettingsSchema: IJSONSchema = { properties: { ...machineOverridableSettings.properties, ...resourceSettings.properties }, patternProperties: allSettings.patternProperties, additionalProperties: true, allowTrailingCommas: true, allowComments: true };
|
||||
jsonRegistry.registerSchema(workspaceSettingsSchemaId, workspaceSettingsSchema);
|
||||
jsonRegistry.registerSchema(folderSettingsSchemaId, folderSettingsSchema);
|
||||
} else {
|
||||
|
|
|
@ -603,7 +603,7 @@ let schema: IJSONSchema = {
|
|||
id: schemaId,
|
||||
type: 'array',
|
||||
title: nls.localize('keybindings.json.title', "Keybindings configuration"),
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
allowComments: true,
|
||||
definitions: {
|
||||
'editorGroupsSchema': {
|
||||
|
|
|
@ -192,7 +192,7 @@ export const colorThemeSchemaId = 'vscode://schemas/color-theme';
|
|||
const colorThemeSchema: IJSONSchema = {
|
||||
type: 'object',
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
properties: {
|
||||
colors: {
|
||||
description: nls.localize('schema.workbenchColors', 'Colors in the workbench'),
|
||||
|
|
|
@ -12,7 +12,7 @@ const schemaId = 'vscode://schemas/icon-theme';
|
|||
const schema: IJSONSchema = {
|
||||
type: 'object',
|
||||
allowComments: true,
|
||||
allowsTrailingCommas: true,
|
||||
allowTrailingCommas: true,
|
||||
definitions: {
|
||||
folderExpanded: {
|
||||
type: 'string',
|
||||
|
|
Loading…
Reference in a new issue