-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint related dependencies conform #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checks here make sense overall, but I think the code which looks for lint-related dependencies can be a bit more robust. I've made some suggestions below.
async function getTemplateLintPackageNames( | ||
templateDependenciesMap: Map<string, string>, | ||
): Promise<string[]> { | ||
const requiredPackagePatterns: string[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm not sure what this means. We don't typically need to be so explicit with TypeScript and can rely on the type that it infers, unless we need to do for a specific reason, such as when we want a type to be wider than it actually is (for instance, if TypeScript would infer a literal such as "foo"
but we actually want string
). In other words, I would say we treat a type annotation is a sort of note for other engineers which communicates that we're doing something that wouldn't usually happen (but is still valid TypeScript). However, here we're not doing anything out of the ordinary, so someone might wonder what the purpose of this annotation is. It's probably okay to leave for now if TypeScript is doing the wrong thing or if you just want to make sure you understand what it does, but generally if you run across an annotation you can assume that it's a bit of a manual intervention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience. Nice work on the tests! Looks good to me.
We want to make sure that for a given project:
Fixes #9