Skip to content

Commit

Permalink
fix typo: identifer -> identifier (#10647)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonid-shevtsov authored and nicolo-ribaudo committed Nov 6, 2019
1 parent 2640e5a commit 2cd5ad0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/babel-generator/test/index.js
Expand Up @@ -197,7 +197,7 @@ describe("generation", function() {

const id2 = fn.body.body[0].expression;
id2.name += "2";
id2.loc.identiferName = "bar";
id2.loc.identifierName = "bar";

const generated = generate(
ast,
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/src/parser/expression.js
Expand Up @@ -384,7 +384,7 @@ export default class ExpressionParser extends LValParser {
* so for ?? operator we need to check in this case the right expression to have parenthesis
* second case a && b ?? c
* here a && b => This is considered as a logical expression in the ast tree
* c => identifer
* c => identifier
* so now here for ?? operator we need to check the left expression to have parenthesis
* if the parenthesis is missing we raise an error and throw it
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-types/src/definitions/core.js
Expand Up @@ -407,7 +407,7 @@ defineType("Identifier", {
name: {
validate: chain(function(node, key, val) {
if (!isValidIdentifier(val)) {
// throw new TypeError(`"${val}" is not a valid identifer name`);
// throw new TypeError(`"${val}" is not a valid identifier name`);
}
}, assertValueType("string")),
},
Expand Down

0 comments on commit 2cd5ad0

Please sign in to comment.