Skip to content

Commit 2cd5ad0

Browse files
leonid-shevtsovnicolo-ribaudo
authored andcommitted
fix typo: identifer -> identifier (#10647)
1 parent 2640e5a commit 2cd5ad0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/babel-generator/test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ describe("generation", function() {
197197

198198
const id2 = fn.body.body[0].expression;
199199
id2.name += "2";
200-
id2.loc.identiferName = "bar";
200+
id2.loc.identifierName = "bar";
201201

202202
const generated = generate(
203203
ast,

packages/babel-parser/src/parser/expression.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ export default class ExpressionParser extends LValParser {
384384
* so for ?? operator we need to check in this case the right expression to have parenthesis
385385
* second case a && b ?? c
386386
* here a && b => This is considered as a logical expression in the ast tree
387-
* c => identifer
387+
* c => identifier
388388
* so now here for ?? operator we need to check the left expression to have parenthesis
389389
* if the parenthesis is missing we raise an error and throw it
390390
*/

packages/babel-types/src/definitions/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ defineType("Identifier", {
407407
name: {
408408
validate: chain(function(node, key, val) {
409409
if (!isValidIdentifier(val)) {
410-
// throw new TypeError(`"${val}" is not a valid identifer name`);
410+
// throw new TypeError(`"${val}" is not a valid identifier name`);
411411
}
412412
}, assertValueType("string")),
413413
},

0 commit comments

Comments
 (0)