Merge pull request #3123 from jmm/traverse-needs-parent-message

Make traverseNeedsParent message clearer.
This commit is contained in:
Jesse McCarthy 2015-12-11 10:05:43 -05:00
commit 740604f268

View File

@ -32,7 +32,7 @@ export const MESSAGES = {
undeclaredVariableType: "Referencing a type alias outside of a type annotation", undeclaredVariableType: "Referencing a type alias outside of a type annotation",
undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?", undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?",
traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File got a $1 node", traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",
traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",
traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2", traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",
traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type", traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type",