From c7304a7ef96c9839a44d7aa12d83a7afb83a7759 Mon Sep 17 00:00:00 2001 From: Kayce Basques Date: Tue, 19 Jun 2018 15:05:07 -0700 Subject: [PATCH] add links to lighthouse docs --- lighthouse-core/audits/byte-efficiency/unminified-css.js | 2 +- lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js | 2 +- .../audits/byte-efficiency/uses-text-compression.js | 2 +- lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js | 3 ++- .../audits/dobetterweb/password-inputs-can-be-pasted-into.js | 2 +- lighthouse-core/audits/image-aspect-ratio.js | 3 ++- lighthouse-core/audits/redirects.js | 2 +- lighthouse-core/audits/time-to-first-byte.js | 2 +- lighthouse-core/audits/uses-rel-preload.js | 2 +- 9 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lighthouse-core/audits/byte-efficiency/unminified-css.js b/lighthouse-core/audits/byte-efficiency/unminified-css.js index b9e34bd07749..22f88d1f51ce 100644 --- a/lighthouse-core/audits/byte-efficiency/unminified-css.js +++ b/lighthouse-core/audits/byte-efficiency/unminified-css.js @@ -24,7 +24,7 @@ class UnminifiedCSS extends ByteEfficiencyAudit { description: 'Minify CSS', scoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC, helpText: 'Minifying CSS files can reduce network payload sizes. ' + - '[Learn more](https://developers.google.com/speed/docs/insights/MinifyResources).', + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/minify-css).', requiredArtifacts: ['CSSUsage', 'devtoolsLogs'], }; } diff --git a/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js b/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js index d86ebea95b7f..2041c49e753e 100644 --- a/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js +++ b/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js @@ -27,7 +27,7 @@ class CacheHeaders extends Audit { failureDescription: 'Uses inefficient cache policy on static assets', helpText: 'A long cache lifetime can speed up repeat visits to your page. ' + - '[Learn more](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#cache-control).', + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/cache-policy).', scoreDisplayMode: Audit.SCORING_MODES.NUMERIC, requiredArtifacts: ['devtoolsLogs'], }; diff --git a/lighthouse-core/audits/byte-efficiency/uses-text-compression.js b/lighthouse-core/audits/byte-efficiency/uses-text-compression.js index 16c000ed1ddd..a68f2f6c5552 100644 --- a/lighthouse-core/audits/byte-efficiency/uses-text-compression.js +++ b/lighthouse-core/audits/byte-efficiency/uses-text-compression.js @@ -26,7 +26,7 @@ class ResponsesAreCompressed extends ByteEfficiencyAudit { description: 'Enable text compression', helpText: 'Text-based responses should be served with compression (gzip, deflate or brotli)' + ' to minimize total network bytes.' + - ' [Learn more](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/optimize-encoding-and-transfer).', + ' [Learn more](https://developers.google.com/web/tools/lighthouse/audits/text-compression).', requiredArtifacts: ['ResponseCompression', 'devtoolsLogs'], }; } diff --git a/lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js b/lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js index 8278a520b7e6..4badb53d3476 100644 --- a/lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js +++ b/lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js @@ -35,7 +35,8 @@ class NoVulnerableLibrariesAudit extends Audit { failureDescription: 'Includes front-end JavaScript libraries' + ' with known security vulnerabilities', helpText: 'Some third-party scripts may contain known security vulnerabilities ' + - ' that are easily identified and exploited by attackers.', + 'that are easily identified and exploited by attackers. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/vulnerabilities).', requiredArtifacts: ['JSLibraries'], }; } diff --git a/lighthouse-core/audits/dobetterweb/password-inputs-can-be-pasted-into.js b/lighthouse-core/audits/dobetterweb/password-inputs-can-be-pasted-into.js index 75ade3324313..63f554b26f8d 100644 --- a/lighthouse-core/audits/dobetterweb/password-inputs-can-be-pasted-into.js +++ b/lighthouse-core/audits/dobetterweb/password-inputs-can-be-pasted-into.js @@ -17,7 +17,7 @@ class PasswordInputsCanBePastedIntoAudit extends Audit { description: 'Allows users to paste into password fields', failureDescription: 'Prevents users to paste into password fields', helpText: 'Preventing password pasting undermines good security policy. ' + - '[Learn more](https://www.ncsc.gov.uk/blog-post/let-them-paste-passwords).', + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/password-pasting).', requiredArtifacts: ['PasswordInputsWithPreventedPaste'], }; } diff --git a/lighthouse-core/audits/image-aspect-ratio.js b/lighthouse-core/audits/image-aspect-ratio.js index 09844f557c3c..1bff008872d5 100644 --- a/lighthouse-core/audits/image-aspect-ratio.js +++ b/lighthouse-core/audits/image-aspect-ratio.js @@ -27,7 +27,8 @@ class ImageAspectRatio extends Audit { name: 'image-aspect-ratio', description: 'Displays images with correct aspect ratio', failureDescription: 'Displays images with incorrect aspect ratio', - helpText: 'Image display dimensions should match natural aspect ratio.', + helpText: 'Image display dimensions should match natural aspect ratio. ' + + '[Learn more](https://developers.google.com/web/tools/lighthouse/audits/aspect-ratio).', requiredArtifacts: ['ImageUsage'], }; } diff --git a/lighthouse-core/audits/redirects.js b/lighthouse-core/audits/redirects.js index a962ddc8660b..ee6ac8f21c13 100644 --- a/lighthouse-core/audits/redirects.js +++ b/lighthouse-core/audits/redirects.js @@ -17,7 +17,7 @@ class Redirects extends Audit { name: 'redirects', description: 'Avoid multiple page redirects', scoreDisplayMode: Audit.SCORING_MODES.NUMERIC, - helpText: 'Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/speed/docs/insights/AvoidRedirects).', + helpText: 'Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/redirects).', requiredArtifacts: ['URL', 'devtoolsLogs', 'traces'], }; } diff --git a/lighthouse-core/audits/time-to-first-byte.js b/lighthouse-core/audits/time-to-first-byte.js index e331319a30f5..b5628d45928d 100644 --- a/lighthouse-core/audits/time-to-first-byte.js +++ b/lighthouse-core/audits/time-to-first-byte.js @@ -19,7 +19,7 @@ class TTFBMetric extends Audit { name: 'time-to-first-byte', description: 'Keep server response times low (TTFB)', helpText: 'Time To First Byte identifies the time at which your server sends a response.' + - ' [Learn more](https://developers.google.com/web/tools/chrome-devtools/network-performance/issues).', + ' [Learn more](https://developers.google.com/web/tools/lighthouse/audits/ttfb).', requiredArtifacts: ['devtoolsLogs', 'URL'], }; } diff --git a/lighthouse-core/audits/uses-rel-preload.js b/lighthouse-core/audits/uses-rel-preload.js index 4625d4b3d0d9..70fc2ad289a1 100644 --- a/lighthouse-core/audits/uses-rel-preload.js +++ b/lighthouse-core/audits/uses-rel-preload.js @@ -19,7 +19,7 @@ class UsesRelPreloadAudit extends Audit { name: 'uses-rel-preload', description: 'Preload key requests', helpText: 'Consider using to prioritize fetching late-discovered ' + - 'resources sooner. [Learn more](https://developers.google.com/web/updates/2016/03/link-rel-preload).', + 'resources sooner. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/preload).', requiredArtifacts: ['devtoolsLogs', 'traces', 'URL'], scoreDisplayMode: Audit.SCORING_MODES.NUMERIC, };