diff --git a/internal/checker/checker.go b/internal/checker/checker.go index e5d55a929d..ff0060a7a6 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -27691,7 +27691,7 @@ func (c *Checker) markJsxAliasReferenced(node *ast.Node /*JsxOpeningLikeElement // Mark local symbol as referenced here because it might not have been marked // if jsx emit was not jsxFactory as there wont be error being emitted c.symbolReferenced(jsxFactorySym, ast.SymbolFlagsAll) - // If react/jsxFactory symbol is alias, mark it as refereced + // If react/jsxFactory symbol is alias, mark it as referenced if c.canCollectSymbolAliasAccessibilityData && jsxFactorySym.Flags&ast.SymbolFlagsAlias != 0 && c.getTypeOnlyAliasDeclaration(jsxFactorySym) == nil { c.markAliasSymbolAsReferenced(jsxFactorySym) } diff --git a/internal/checker/jsx.go b/internal/checker/jsx.go index 8abf107c9d..9bf61948b9 100644 --- a/internal/checker/jsx.go +++ b/internal/checker/jsx.go @@ -1030,7 +1030,7 @@ func (c *Checker) getJsxManagedAttributesFromLocatedAttributes(context *ast.Node func (c *Checker) instantiateAliasOrInterfaceWithDefaults(managedSym *ast.Symbol, typeArguments []*Type, inJavaScript bool) *Type { declaredManagedType := c.getDeclaredTypeOfSymbol(managedSym) - // fetches interface type, or initializes symbol links type parmaeters + // fetches interface type, or initializes symbol links type parameters if managedSym.Flags&ast.SymbolFlagsTypeAlias != 0 { params := c.typeAliasLinks.Get(managedSym).typeParameters if len(params) >= len(typeArguments) { diff --git a/internal/ls/change/trackerimpl.go b/internal/ls/change/trackerimpl.go index d39c5422c8..a911fe902e 100644 --- a/internal/ls/change/trackerimpl.go +++ b/internal/ls/change/trackerimpl.go @@ -256,7 +256,7 @@ func (t *Tracker) getEndPositionOfMultilineTrailingComment(sourceFile *ast.Sourc nodeEndLine := scanner.ComputeLineOfPosition(lineStarts, node.End()) for comment := range scanner.GetTrailingCommentRanges(t.NodeFactory, sourceFile.Text(), node.End()) { // Single line can break the loop as trivia will only be this line. - // Comments on subsequest lines are also ignored. + // Comments on subsequent lines are also ignored. if comment.Kind == ast.KindSingleLineCommentTrivia || scanner.ComputeLineOfPosition(lineStarts, comment.Pos()) > nodeEndLine { break } diff --git a/internal/ls/documenthighlights.go b/internal/ls/documenthighlights.go index 969d5e1246..fd1d2bb58b 100644 --- a/internal/ls/documenthighlights.go +++ b/internal/ls/documenthighlights.go @@ -45,7 +45,7 @@ func (l *LanguageService) ProvideDocumentHighlights(ctx context.Context, documen if len(documentHighlights) == 0 { documentHighlights = l.getSyntacticDocumentHighlights(node, sourceFile) } - // if nil is passed here we never generate an error, just pass an empty higlight + // if nil is passed here we never generate an error, just pass an empty highlight return lsproto.DocumentHighlightsOrNull{DocumentHighlights: &documentHighlights}, nil } diff --git a/internal/ls/organizeimports/organizeimports.go b/internal/ls/organizeimports/organizeimports.go index 57ac06331d..5b9e650aa3 100644 --- a/internal/ls/organizeimports/organizeimports.go +++ b/internal/ls/organizeimports/organizeimports.go @@ -124,7 +124,7 @@ func getImportKindOrder(s1 *ast.Statement) int { } } -// compareImportsOrRequireStatements compares two import or require statements for sorting +// CompareImportsOrRequireStatements compares two import or require statements for sorting func CompareImportsOrRequireStatements(s1 *ast.Statement, s2 *ast.Statement, comparer func(a, b string) int) int { if cmp := compareModuleSpecifiersWorker(getModuleSpecifierExpression(s1), getModuleSpecifierExpression(s2), comparer); cmp != 0 { return cmp @@ -172,14 +172,14 @@ func GetNamedImportSpecifierComparer(preferences *lsutil.UserPreferences, compar } } -// getImportSpecifierInsertionIndex finds the insertion index for a new import specifier +// GetImportSpecifierInsertionIndex finds the insertion index for a new import specifier func GetImportSpecifierInsertionIndex(sortedImports []*ast.Node, newImport *ast.Node, comparer func(s1, s2 *ast.Node) int) int { return core.FirstResult(core.BinarySearchUniqueFunc(sortedImports, func(mid int, value *ast.Node) int { return comparer(value, newImport) })) } -// getOrganizeImportsStringComparerWithDetection detects the string comparer to use based on existing imports +// GetOrganizeImportsStringComparerWithDetection detects the string comparer to use based on existing imports func GetOrganizeImportsStringComparerWithDetection(originalImportDecls []*ast.Statement, preferences *lsutil.UserPreferences) (comparer func(a, b string) int, isSorted bool) { result := detectModuleSpecifierCaseBySort([][]*ast.Statement{originalImportDecls}, getComparers(preferences)) return result.comparer, result.isSorted