You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the purposes of better readability, easier branching merging and easier developer onboarding, it would be useful to split the checker.js into multiple files.
For example,
var collectTypesVisitors = {
TaggedTemplateExpression(path) {
if (T.isIdentifier(path.node.tag)) {
let tagName = path.node.tag.name;
if (recognizedTypeIDs.includes(tagName)) {
nodeTypes.set(path.node,{ tagged: tagName, });
}
}
},
TemplateLiteral(path) {
if (T.isTaggedTemplateExpression(path.parent)) {
let parentType = nodeTypes.get(path.parent);
if (parentType) {
nodeTypes.set(path.node,{ ...parentType, });
}
else {
nodeTypes.set(path.node,{ inferred: "unknown", });
}
}
else {
nodeTypes.set(path.node,{ inferred: "string", });
}
},
//... etc...
}
could be split on a "per visitor type" basis.
var collectTypesVisitors = {
TaggedTemplateExpression: require('checkTaggedTemplateExpression'),
TemplateLiteral: require('checkTemplateLiteral'),
}
Or something similar.
That way for example, a developer or a group of developers could focus on documentation, tests, and code only related to one visitor type, without ever affecting the rest of the code.
The text was updated successfully, but these errors were encountered:
For the purposes of better readability, easier branching merging and easier developer onboarding, it would be useful to split the checker.js into multiple files.
For example,
could be split on a "per visitor type" basis.
Or something similar.
That way for example, a developer or a group of developers could focus on documentation, tests, and code only related to one visitor type, without ever affecting the rest of the code.
The text was updated successfully, but these errors were encountered: