Skip to content

Commit ab6a2f4

Browse files
authored
chore: fix some minor issues in the comments (#2291)
Signed-off-by: xiaolinny <[email protected]>
1 parent 975e07a commit ab6a2f4

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

internal/checker/checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27691,7 +27691,7 @@ func (c *Checker) markJsxAliasReferenced(node *ast.Node /*JsxOpeningLikeElement
2769127691
// Mark local symbol as referenced here because it might not have been marked
2769227692
// if jsx emit was not jsxFactory as there wont be error being emitted
2769327693
c.symbolReferenced(jsxFactorySym, ast.SymbolFlagsAll)
27694-
// If react/jsxFactory symbol is alias, mark it as refereced
27694+
// If react/jsxFactory symbol is alias, mark it as referenced
2769527695
if c.canCollectSymbolAliasAccessibilityData && jsxFactorySym.Flags&ast.SymbolFlagsAlias != 0 && c.getTypeOnlyAliasDeclaration(jsxFactorySym) == nil {
2769627696
c.markAliasSymbolAsReferenced(jsxFactorySym)
2769727697
}

internal/checker/jsx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ func (c *Checker) getJsxManagedAttributesFromLocatedAttributes(context *ast.Node
10301030

10311031
func (c *Checker) instantiateAliasOrInterfaceWithDefaults(managedSym *ast.Symbol, typeArguments []*Type, inJavaScript bool) *Type {
10321032
declaredManagedType := c.getDeclaredTypeOfSymbol(managedSym)
1033-
// fetches interface type, or initializes symbol links type parmaeters
1033+
// fetches interface type, or initializes symbol links type parameters
10341034
if managedSym.Flags&ast.SymbolFlagsTypeAlias != 0 {
10351035
params := c.typeAliasLinks.Get(managedSym).typeParameters
10361036
if len(params) >= len(typeArguments) {

internal/ls/change/trackerimpl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func (t *Tracker) getEndPositionOfMultilineTrailingComment(sourceFile *ast.Sourc
256256
nodeEndLine := scanner.ComputeLineOfPosition(lineStarts, node.End())
257257
for comment := range scanner.GetTrailingCommentRanges(t.NodeFactory, sourceFile.Text(), node.End()) {
258258
// Single line can break the loop as trivia will only be this line.
259-
// Comments on subsequest lines are also ignored.
259+
// Comments on subsequent lines are also ignored.
260260
if comment.Kind == ast.KindSingleLineCommentTrivia || scanner.ComputeLineOfPosition(lineStarts, comment.Pos()) > nodeEndLine {
261261
break
262262
}

internal/ls/documenthighlights.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (l *LanguageService) ProvideDocumentHighlights(ctx context.Context, documen
4545
if len(documentHighlights) == 0 {
4646
documentHighlights = l.getSyntacticDocumentHighlights(node, sourceFile)
4747
}
48-
// if nil is passed here we never generate an error, just pass an empty higlight
48+
// if nil is passed here we never generate an error, just pass an empty highlight
4949
return lsproto.DocumentHighlightsOrNull{DocumentHighlights: &documentHighlights}, nil
5050
}
5151

internal/ls/organizeimports/organizeimports.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func getImportKindOrder(s1 *ast.Statement) int {
124124
}
125125
}
126126

127-
// compareImportsOrRequireStatements compares two import or require statements for sorting
127+
// CompareImportsOrRequireStatements compares two import or require statements for sorting
128128
func CompareImportsOrRequireStatements(s1 *ast.Statement, s2 *ast.Statement, comparer func(a, b string) int) int {
129129
if cmp := compareModuleSpecifiersWorker(getModuleSpecifierExpression(s1), getModuleSpecifierExpression(s2), comparer); cmp != 0 {
130130
return cmp
@@ -172,14 +172,14 @@ func GetNamedImportSpecifierComparer(preferences *lsutil.UserPreferences, compar
172172
}
173173
}
174174

175-
// getImportSpecifierInsertionIndex finds the insertion index for a new import specifier
175+
// GetImportSpecifierInsertionIndex finds the insertion index for a new import specifier
176176
func GetImportSpecifierInsertionIndex(sortedImports []*ast.Node, newImport *ast.Node, comparer func(s1, s2 *ast.Node) int) int {
177177
return core.FirstResult(core.BinarySearchUniqueFunc(sortedImports, func(mid int, value *ast.Node) int {
178178
return comparer(value, newImport)
179179
}))
180180
}
181181

182-
// getOrganizeImportsStringComparerWithDetection detects the string comparer to use based on existing imports
182+
// GetOrganizeImportsStringComparerWithDetection detects the string comparer to use based on existing imports
183183
func GetOrganizeImportsStringComparerWithDetection(originalImportDecls []*ast.Statement, preferences *lsutil.UserPreferences) (comparer func(a, b string) int, isSorted bool) {
184184
result := detectModuleSpecifierCaseBySort([][]*ast.Statement{originalImportDecls}, getComparers(preferences))
185185
return result.comparer, result.isSorted

0 commit comments

Comments
 (0)