From dfa62069192b1c49918b2dfe4b8c10278361ae34 Mon Sep 17 00:00:00 2001 From: Evan Wallace Date: Thu, 14 Mar 2024 13:03:57 -0400 Subject: [PATCH] fix some comments (closes #3683) --- internal/css_parser/css_nesting.go | 2 +- internal/js_parser/js_parser.go | 2 +- internal/js_printer/js_printer.go | 2 +- internal/linker/linker.go | 4 ++-- internal/resolver/yarnpnp.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/css_parser/css_nesting.go b/internal/css_parser/css_nesting.go index e2831cf3578..a95da135956 100644 --- a/internal/css_parser/css_nesting.go +++ b/internal/css_parser/css_nesting.go @@ -190,7 +190,7 @@ func (p *parser) lowerNestingInRuleWithContext(rule css_ast.Rule, context *lower r.Selectors = []css_ast.ComplexSelector{merged} } - // Pass 2: Substitue "&" for the parent selector + // Pass 2: Substitute "&" for the parent selector if !p.options.unsupportedCSSFeatures.Has(compat.IsPseudoClass) || len(context.parentSelectors) <= 1 { // If we can use ":is", or we don't have to because there's only one // parent selector, or we are using ":is()" to match zero parent selectors diff --git a/internal/js_parser/js_parser.go b/internal/js_parser/js_parser.go index 8ed5ac52309..d45298ca974 100644 --- a/internal/js_parser/js_parser.go +++ b/internal/js_parser/js_parser.go @@ -8586,7 +8586,7 @@ func (p *parser) visitStmts(stmts []js_ast.Stmt, kind stmtsKind) []js_ast.Stmt { for _, stmt := range before { s, ok := stmt.Data.(*js_ast.SFunction) if !ok { - // We may get non-function statements here in certain scenarious such as when "KeepNames" is enabled + // We may get non-function statements here in certain scenarios such as when "KeepNames" is enabled nonFnStmts = append(nonFnStmts, stmt) continue } diff --git a/internal/js_printer/js_printer.go b/internal/js_printer/js_printer.go index f6cc144f50f..19d11073c06 100644 --- a/internal/js_printer/js_printer.go +++ b/internal/js_printer/js_printer.go @@ -1545,7 +1545,7 @@ func (p *printer) printRequireOrImportExpr(importRecordIndex uint32, level js_as defer p.printDotThenSuffix() } - // Make sure the comma operator is propertly wrapped + // Make sure the comma operator is properly wrapped if meta.ExportsRef != ast.InvalidRef && level >= js_ast.LComma { p.print("(") defer p.print(")") diff --git a/internal/linker/linker.go b/internal/linker/linker.go index 46677ef5756..cdc3b53a12f 100644 --- a/internal/linker/linker.go +++ b/internal/linker/linker.go @@ -3370,7 +3370,7 @@ type cssImportOrder struct { // The only exception to this is "@layer". Evaluating a CSS file multiple // times is sort of equivalent to evaluating it once at the first location // as far as "@layer" is concerned. So we may in some cases keep both the -// first and and last locations and only write out the "@layer" information +// first and last locations and only write out the "@layer" information // for the first location. func (c *linkerContext) findImportedFilesInCSSOrder(entryPoints []uint32) (order []cssImportOrder) { var visit func(uint32, []uint32, []css_ast.ImportConditions, []ast.ImportRecord) @@ -3778,7 +3778,7 @@ func importConditionsAreEqual(a []css_ast.ImportConditions, b []css_ast.ImportCo // For "lib.css", the entry with the conditions [supports(display: flex)] should // make the entry with the conditions [supports(display: flex), screen] redundant. // -// Note that all of this deliberately ignores the existance of "@layer" because +// Note that all of this deliberately ignores the existence of "@layer" because // that is handled separately. All of this is only for handling unlayered styles. func isConditionalImportRedundant(earlier []css_ast.ImportConditions, later []css_ast.ImportConditions) bool { if len(later) > len(earlier) { diff --git a/internal/resolver/yarnpnp.go b/internal/resolver/yarnpnp.go index 1b735bd9622..344f633ac24 100644 --- a/internal/resolver/yarnpnp.go +++ b/internal/resolver/yarnpnp.go @@ -370,7 +370,7 @@ func (r resolverQuery) resolveViaFallback(manifest *pnpData, ident string) (pnpI // Let referenceOrAlias be the entry from manifest.fallbackPool referenced by ident referenceOrAlias, ok = manifest.fallbackPool[ident] - // Return it immediatly, whether it's defined or not + // Return it immediately, whether it's defined or not if r.debugLogs != nil { if ok { r.debugLogs.addNote(fmt.Sprintf(" Found fallback for %q in \"fallbackPool\": [%s, %s]", ident,