Skip to content

Commit ee0c795

Browse files
DimitriPapadopoulosJLHwungnicolo-ribaudo
authored
Fix typos found by codespell (#15783)
Co-authored-by: Huáng Jùnliàng <[email protected]> Co-authored-by: Nicolò Ribaudo <[email protected]>
1 parent a21be92 commit ee0c795

13 files changed

Lines changed: 15 additions & 14 deletions

File tree

packages/babel-core/test/option-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ describe("option-manager", () => {
252252
expect(options.presets).toHaveLength(0);
253253
});
254254

255-
itBabel7("es2015_named shuold throw", async () => {
255+
itBabel7("es2015_named should throw", async () => {
256256
await expect(
257257
loadOptionsAsync({
258258
presets: [

packages/babel-generator/src/buffer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ export default class Buffer {
441441
source(prop: "start" | "end", loc: Loc | undefined): void {
442442
if (!this._map) return;
443443

444-
// Since this is called extremely often, we re-use the same _sourcePosition
444+
// Since this is called extremely often, we reuse the same _sourcePosition
445445
// object for the whole lifetime of the buffer.
446446
this._normalizePosition(prop, loc, 0);
447447
}

packages/babel-generator/src/source-map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default class SourceMap {
3232
private _lastGenLine = 0;
3333
private _lastSourceLine = 0;
3434

35-
// Source columns can be 0, but we ony check in unison with sourceLine, which
35+
// Source columns can be 0, but we only check in unison with sourceLine, which
3636
// inits to an impossible value. So init to 0 is fine.
3737
private _lastSourceColumn = 0;
3838

packages/babel-helper-builder-binary-assignment-operator-visitor/src/explode-assignable-expression.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function getObjRef(
2222
if (isIdentifier(node)) {
2323
if (scope.hasBinding(node.name)) {
2424
// this variable is declared in scope so we can be 100% sure
25-
// that evaluating it multiple times wont trigger a getter
25+
// that evaluating it multiple times won't trigger a getter
2626
// or something else
2727
return node;
2828
} else {

packages/babel-helper-wrap-function/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function plainFunction(
180180
export default function wrapFunction(
181181
path: NodePath<t.Function>,
182182
callId: t.Expression,
183-
// TODO(Babel 8): Consider defaulting to false for spec compliancy
183+
// TODO(Babel 8): Consider defaulting to false for spec compliance
184184
noNewArrows: boolean = true,
185185
ignoreFunctionLength: boolean = false,
186186
) {

packages/babel-parser/src/parser/statement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2960,7 +2960,7 @@ export default abstract class StatementParser extends ExpressionParser {
29602960
}
29612961

29622962
/*
2963-
* Parse `module` in `import module x fro "x"`, disambiguating
2963+
* Parse `module` in `import module x from "x"`, disambiguating
29642964
* `import module from "x"` and `import module from from "x"`.
29652965
*
29662966
* This function might return an identifier representing the `module`

packages/babel-parser/src/plugins/typescript/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ const TSErrors = ParseErrorEnum`typescript`({
9393
propertyName: string;
9494
}) =>
9595
`Property '${propertyName}' cannot have an initializer because it is marked abstract.`,
96+
// TODO: Accesor -> Accessor
9697
AccesorCannotDeclareThisParameter:
9798
"'get' and 'set' accessors cannot declare 'this' parameters.",
9899
AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",

packages/babel-plugin-transform-destructuring/src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ export class DestructuringTransformer {
359359
if (!t.isArrayExpression(arr)) return false;
360360

361361
// pattern has less elements than the array and doesn't have a rest so some
362-
// elements wont be evaluated
362+
// elements won't be evaluated
363363
if (pattern.elements.length > arr.elements.length) return;
364364
if (
365365
pattern.elements.length < arr.elements.length &&
@@ -434,7 +434,7 @@ export class DestructuringTransformer {
434434
// optimise basic array destructuring of an array expression
435435
//
436436
// we can't do this to a pattern of unequal size to it's right hand
437-
// array expression as then there will be values that wont be evaluated
437+
// array expression as then there will be values that won't be evaluated
438438
//
439439
// eg: let [a, b] = [1, 2];
440440

packages/babel-plugin-transform-optional-chaining/src/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function transformOptionalChain(
143143
} else if (scope.isStatic(chain)) {
144144
check = ref = chainWithTypes;
145145
} else {
146-
// We cannot re-use the tmpVar for calls, because we need to
146+
// We cannot reuse the tmpVar for calls, because we need to
147147
// store both the method and the receiver.
148148
if (!tmpVar || isCall) {
149149
tmpVar = scope.generateUidIdentifierBasedOnNode(chain);

packages/babel-preset-env/test/regressions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("regressions", () => {
2828
"regressions",
2929
);
3030

31-
// Unfortunatly, when loading the browserslist config through
31+
// Unfortunately, when loading the browserslist config through
3232
// @babel/preset-env, it's resolved from process.cwd() and not
3333
// from root. Mock it to isolate this test.
3434
const spy = jest.spyOn(process, "cwd").mockReturnValue(root);

0 commit comments

Comments
 (0)