Skip to content
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

core(tsc): add type checking for seo audits #5103

Merged
merged 2 commits into from
May 3, 2018
Merged

core(tsc): add type checking for seo audits #5103

merged 2 commits into from
May 3, 2018

Conversation

brendankenny
Copy link
Member

with this, all of lighthouse-core/**/*.js is type checked :) (with carve outs for tests and the html renderer, for now).

The only remaining files this adds are these seo audits and the all-important empty-stub.js (which turns out was already type safe! Good job empty-stub).

all of lighthouse-core/**/*.js!
Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@@ -34,17 +39,17 @@ function getUniqueFailingRules(fontSizeArtifact) {
}
});

return failingRules.valuesArray();
return [...failingRules.values()];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have an extraordinarily small preference for Array.from, mostly commenting out of curiosity if this is your preference? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I used to prefer Array.from since it felt more deliberate and less like an action in place or something, but now I have spread blindness and see them as the same thing, so I don't think I care anymore...

@@ -89,14 +90,14 @@ class IsCrawlable extends Audit {
if (isBlocking) {
blockingDirectives.push({
source: {
type: 'node',
type: /** @type {'node'} */ ('node'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️

"lighthouse-core/lib/emulation.js",
"lighthouse-core/gather/**/*.js",
"lighthouse-core/scripts/*.js",
"lighthouse-core/**/*.js",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@brendankenny brendankenny merged commit 4ea3f4d into master May 3, 2018
@brendankenny brendankenny deleted the tsseo branch May 3, 2018 22:08
kdzwinel pushed a commit to kdzwinel/lighthouse that referenced this pull request Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants