diff --git a/src/languageservice/jsonLanguageTypes.ts b/src/languageservice/jsonLanguageTypes.ts index 91c3a3999..a117bfcb3 100644 --- a/src/languageservice/jsonLanguageTypes.ts +++ b/src/languageservice/jsonLanguageTypes.ts @@ -247,7 +247,7 @@ export interface SchemaConfiguration { */ schema?: JSONSchema; /** - * A parent folder for folder specifc associations. An association that has a folder URI set is only used + * A parent folder for folder specific associations. An association that has a folder URI set is only used * if the document that is validated has the folderUri as parent */ folderUri?: string; @@ -392,7 +392,7 @@ export interface DocumentSymbolsContext { } export interface ColorInformationContext { /** - * The maximal number of color informations returned. + * The maximal number of color information entries returned. */ resultLimit?: number; /** diff --git a/src/languageservice/services/yamlCompletion.ts b/src/languageservice/services/yamlCompletion.ts index b258cbe2d..978a2387f 100644 --- a/src/languageservice/services/yamlCompletion.ts +++ b/src/languageservice/services/yamlCompletion.ts @@ -600,7 +600,7 @@ export class YamlCompletion { return index > 0 && value.substring(index, value.length).trim().length === 0; }; if (containsNewLineAfterColon(existingText) || containsNewLineAfterColon(addingText)) { - //if the exisiting object null one then replace with the non-null object + //if the existing object null one then replace with the non-null object if (oneOfSchema && isNullObject(existingText) && !isNullObject(addingText) && !startWithNewLine(addingText)) { return addingText; } diff --git a/src/languageservice/services/yamlSchemaService.ts b/src/languageservice/services/yamlSchemaService.ts index b5bfd68e7..a28b0246d 100644 --- a/src/languageservice/services/yamlSchemaService.ts +++ b/src/languageservice/services/yamlSchemaService.ts @@ -724,7 +724,7 @@ export class YAMLSchemaService implements IJSONSchemaService { let toValidate = node; if (hasNestedSchema) { - // clone for meta-validation: stop at dialect boundaries abd replace with {} + // clone for meta-validation: stop at dialect boundaries and replace with {} const stopAtDialectBoundary = (val: JSONSchema, seenSize: number): JSONSchema | undefined => { if (seenSize !== 0 && val && typeof val === 'object' && val.$schema) return {}; return undefined; diff --git a/src/languageservice/services/yamlValidation.ts b/src/languageservice/services/yamlValidation.ts index 7592f96d5..b6ecd8adb 100644 --- a/src/languageservice/services/yamlValidation.ts +++ b/src/languageservice/services/yamlValidation.ts @@ -111,7 +111,7 @@ export class YAMLValidation { const duplicateMessagesRemoved: Diagnostic[] = []; for (let err of validationResult) { /** - * A patch ontop of the validation that removes the + * A patch on top of the validation that removes the * 'Matches many schemas' error for kubernetes * for a better user experience. */ diff --git a/src/languageservice/utils/block-string-rewriter.ts b/src/languageservice/utils/block-string-rewriter.ts index 4b999d5b5..2064884d3 100644 --- a/src/languageservice/utils/block-string-rewriter.ts +++ b/src/languageservice/utils/block-string-rewriter.ts @@ -68,13 +68,13 @@ export class BlockStringRewriter { // so do not increment i continue; } else { - // It's unconvertable, give up + // It's unconvertible, give up // Explanation: // If the line of text is only whitespace and it's more whitespace than the expected indentation, // then it's joined with the previous line with a real newline instead of a space. // This means an extra newline gets inserted if we change nothing. - // We can avoid this if the preceeding text is a newline, - // because we can just remove the preceeding newline to compensate, + // We can avoid this if the preceding text is a newline, + // because we can just remove the preceding newline to compensate, // but if it's not we are SOL return null; } diff --git a/src/languageservice/utils/textBuffer.ts b/src/languageservice/utils/textBuffer.ts index f7f363a2e..a7d5a206c 100644 --- a/src/languageservice/utils/textBuffer.ts +++ b/src/languageservice/utils/textBuffer.ts @@ -49,7 +49,7 @@ export class TextBuffer { return this.doc.getText(range); } - getPosition(offest: number): Position { - return this.doc.positionAt(offest); + getPosition(offset: number): Position { + return this.doc.positionAt(offset); } } diff --git a/test/autoCompletion.test.ts b/test/autoCompletion.test.ts index f8ab0b2c4..66851fb49 100644 --- a/test/autoCompletion.test.ts +++ b/test/autoCompletion.test.ts @@ -2756,7 +2756,7 @@ describe('Auto Completion Tests', () => { assert.equal(result.items[0].insertText, ' obj1:\n '); }); - it('Simple array object completion without "-" befor array empty item', async () => { + it('Simple array object completion without "-" before array empty item', async () => { // eslint-disable-next-line @typescript-eslint/no-require-imports const schema = require(path.join(__dirname, './fixtures/testArrayCompletionSchema.json')); schemaProvider.addSchema(SCHEMA_ID, schema); @@ -3012,7 +3012,7 @@ describe('Auto Completion Tests', () => { createExpectedCompletion('options', 'options:\n description: ', 0, 2, 0, 2, 10, 2, { documentation: '' }) ); }); - it('Should not agregate suggested text from different schemas', async () => { + it('Should not aggregate suggested text from different schemas', async () => { const schema = { definitions: { obj1, obj2 }, anyOf: [ diff --git a/test/hover.test.ts b/test/hover.test.ts index 8fa16f855..e0e765764 100644 --- a/test/hover.test.ts +++ b/test/hover.test.ts @@ -197,7 +197,7 @@ describe('Hover Tests', () => { ); }); - it('Hover does not show results when there isnt description field', async () => { + it('Hover does not show results when there is no description field', async () => { schemaProvider.addSchema(SCHEMA_ID, { type: 'object', properties: { diff --git a/test/integration.test.ts b/test/integration.test.ts index ab8f52d1c..5622e1d30 100644 --- a/test/integration.test.ts +++ b/test/integration.test.ts @@ -116,7 +116,7 @@ describe('Kubernetes Integration Tests', () => { * No longer has those types of validation */ // describe('Test that validation DOES throw errors', function () { - // it('Error when theres no value for a node', async () => { + // it('Error when there is no value for a node', async () => { // const content = 'apiVersion:'; // const result = await parseSetup(content); // assert.notEqual(result.length, 0); diff --git a/test/schema.test.ts b/test/schema.test.ts index 746a9f815..40d03bd85 100644 --- a/test/schema.test.ts +++ b/test/schema.test.ts @@ -896,7 +896,7 @@ address: }); } - it('Modeline Schema takes precendence over all other schema APIs', async () => { + it('Modeline Schema takes precedence over all other schema APIs', async () => { languageSettingsSetup .withSchemaFileMatch({ fileMatch: ['test.yaml'], @@ -960,7 +960,7 @@ address: assert.strictEqual(result.items[0].label, 'dollar-schema'); }); - it('Manually setting schema takes precendence over all other lower priority schemas', async () => { + it('Manually setting schema takes precedence over all other lower priority schemas', async () => { languageSettingsSetup .withSchemaFileMatch({ fileMatch: ['test.yaml'], @@ -1007,7 +1007,7 @@ address: assert.strictEqual(result.items.length, 0); }); - it('SchemaAssociation takes precendence over SchemaStore', async () => { + it('SchemaAssociation takes precedence over SchemaStore', async () => { languageSettingsSetup .withSchemaFileMatch({ fileMatch: ['test.yaml'], diff --git a/test/schema2019Validation.test.ts b/test/schema2019Validation.test.ts index 3ef1105a5..a2ecbc26d 100644 --- a/test/schema2019Validation.test.ts +++ b/test/schema2019Validation.test.ts @@ -1492,7 +1492,7 @@ describe('Validation Tests', () => { }); }); - describe('dynamic evalation inside nested refs', () => { + describe('dynamic evaluation inside nested refs', () => { const schema: JSONSchema = { $schema: 'https://json-schema.org/draft/2019-09/schema', $defs: { diff --git a/test/schemaValidation.test.ts b/test/schemaValidation.test.ts index d38e367e0..6ba86e6a2 100644 --- a/test/schemaValidation.test.ts +++ b/test/schemaValidation.test.ts @@ -1170,7 +1170,7 @@ obj: }); describe('Multiple type tests', function () { - it('Do not error when there are multiple types in schema and theyre valid', async () => { + it('Do not error when there are multiple types in schema and they are valid', async () => { schemaProvider.addSchema(SCHEMA_ID, { type: 'object', properties: { @@ -1186,7 +1186,7 @@ obj: }); describe('Invalid YAML errors', function () { - it('Error when theres a finished untyped item', async () => { + it('Error when there is a finished untyped item', async () => { schemaProvider.addSchema(SCHEMA_ID, { type: 'object', properties: { @@ -1204,7 +1204,7 @@ obj: assert.deepEqual(result[0], createExpectedError(BlockMappingEntryError, 1, 0, 1, 2)); }); - it('Error when theres no value for a node', async () => { + it('Error when there is no value for a node', async () => { schemaProvider.addSchema(SCHEMA_ID, { type: 'object', properties: { diff --git a/test/yamlParser.test.ts b/test/yamlParser.test.ts index 940820fc6..5dd3a40ce 100644 --- a/test/yamlParser.test.ts +++ b/test/yamlParser.test.ts @@ -11,7 +11,7 @@ import { aliasDepth } from '../src/languageservice/parser/ast-converter'; describe('YAML parser', () => { describe('YAML parser', function () { - it('parse emtpy text', () => { + it('parse empty text', () => { const parsedDocument = parse(''); assert(parsedDocument.documents.length === 1, 'A document has been created for an empty text'); });