Skip to content

Commit

Permalink
fix some comments (closes #3683)
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Mar 14, 2024
1 parent ae5cc17 commit dfa6206
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/css_parser/css_nesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/js_parser/js_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion internal/js_printer/js_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(")")
Expand Down
4 changes: 2 additions & 2 deletions internal/linker/linker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/resolver/yarnpnp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dfa6206

Please sign in to comment.