Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dreipol/lighthouse-config

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreipol/lighthouse-config - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

config/constants.js

147

config/local/desktop.js

@@ -0,1 +1,2 @@

const constants = require('../constants');

@@ -26,53 +27,79 @@ module.exports = {

report: {
settings: {},
passes: [
settings: constants.defaultSettings,
passes: [{
passName: 'defaultPass',
recordTrace: true,
useThrottling: true,
pauseAfterLoadMs: 5250,
networkQuietThresholdMs: 5250,
cpuQuietThresholdMs: 5250,
gatherers: [
'url',
'scripts',
'css-usage',
'viewport',
'viewport-dimensions',
'theme-color',
'manifest',
'runtime-exceptions',
'chrome-console-messages',
'image-usage',
'accessibility',
'dobetterweb/all-event-listeners',
'dobetterweb/anchors-with-no-rel-noopener',
'dobetterweb/appcache',
'dobetterweb/domstats',
'dobetterweb/js-libraries',
'dobetterweb/optimized-images',
'dobetterweb/password-inputs-with-prevented-paste',
'dobetterweb/tags-blocking-first-paint',
'dobetterweb/websql',
'seo/meta-description',
'seo/font-size',
'seo/crawlable-links',
'seo/meta-robots',
'seo/hreflang',
'seo/embedded-content',
'seo/canonical',
'seo/robots-txt',
'fonts',
],
},
{
passName: 'defaultPass',
recordTrace: true,
pauseAfterLoadMs: 10000,
networkQuietThresholdMs: 5000,
pauseAfterNetworkQuietMs: 5000,
cpuQuietThresholdMs: 5250,
passName: 'offlinePass',
gatherers: [
'url',
'scripts',
'css-usage',
'viewport',
'viewport-dimensions',
'theme-color',
'manifest',
'runtime-exceptions',
'chrome-console-messages',
'image-usage',
'accessibility',
'dobetterweb/all-event-listeners',
'dobetterweb/anchors-with-no-rel-noopener',
'dobetterweb/appcache',
'dobetterweb/domstats',
'dobetterweb/js-libraries',
'dobetterweb/optimized-images',
'dobetterweb/password-inputs-with-prevented-paste',
'dobetterweb/response-compression',
'dobetterweb/tags-blocking-first-paint',
'dobetterweb/websql',
'seo/meta-description',
'seo/font-size',
'seo/crawlable-links',
'seo/meta-robots',
'seo/hreflang',
'seo/embedded-content',
'seo/canonical',
'fonts',
'service-worker',
'offline',
'start-url',
],
},
],
{
passName: 'redirectPass',
// Speed up the redirect pass by blocking stylesheets, fonts, and images
blockedUrlPatterns: ['*.css', '*.jpg', '*.jpeg', '*.png', '*.gif', '*.svg', '*.ttf', '*.woff', '*.woff2'],
gatherers: [
'http-redirect',
'html-without-javascript',
],
}],
audits: [
'redirects-http',
'service-worker',
'works-offline',
'viewport',
'without-javascript',
'first-meaningful-paint',
'load-fast-enough-for-pwa',
'speed-index-metric',
'screenshot-thumbnails',
'estimated-input-latency',
'errors-in-console',
'time-to-first-byte',
'first-interactive',
'consistently-interactive',
'user-timings',
'critical-request-chains',
'redirects',
'webapp-install-banner',
'splash-screen',
'themed-omnibox',

@@ -87,2 +114,3 @@ 'manifest-short-name-length',

'font-display',
'network-requests',
'manual/pwa-cross-browser',

@@ -136,3 +164,2 @@ 'manual/pwa-page-transitions',

'accessibility/manual/visual-order-follows-dom',
'byte-efficiency/total-byte-weight',
'byte-efficiency/offscreen-images',

@@ -142,3 +169,3 @@ 'byte-efficiency/unused-css-rules',

'byte-efficiency/uses-optimized-images',
'byte-efficiency/uses-request-compression',
// 'byte-efficiency/uses-text-compression',
'byte-efficiency/uses-responsive-images',

@@ -159,2 +186,3 @@ 'dobetterweb/appcache-manifest',

'dobetterweb/uses-passive-event-listeners',
// 'seo/robots-txt',
'seo/meta-description',

@@ -224,4 +252,4 @@ 'seo/http-status-code',

description: 'These checks are required by the baseline ' +
'[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' +
'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.',
'[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' +
'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.',
},

@@ -231,3 +259,3 @@ 'seo-mobile': {

description: 'Make sure your pages are mobile friendly so users don’t have to pinch or zoom ' +
'in order to read the content pages. [Learn more](https://developers.google.com/search/mobile-sites/).',
'in order to read the content pages. [Learn more](https://developers.google.com/search/mobile-sites/).',
},

@@ -248,8 +276,11 @@ 'seo-content': {

categories: {
performance: {
'performance': {
name: 'Performance',
description: 'These encapsulate your web app\'s current performance and opportunities to improve it.',
audits: [
{ id: 'first-meaningful-paint', weight: 5, group: 'perf-metric' },
{ id: 'first-interactive', weight: 5, group: 'perf-metric' },
{ id: 'consistently-interactive', weight: 5, group: 'perf-metric' },
{ id: 'speed-index-metric', weight: 1, group: 'perf-metric' },
{ id: 'estimated-input-latency', weight: 1, group: 'perf-metric' },
{ id: 'link-blocking-first-paint', weight: 0, group: 'perf-hint' },

@@ -262,9 +293,12 @@ { id: 'script-blocking-first-paint', weight: 0, group: 'perf-hint' },

{ id: 'uses-webp-images', weight: 0, group: 'perf-hint' },
{ id: 'uses-request-compression', weight: 0, group: 'perf-hint' },
// { id: 'uses-text-compression', weight: 0, group: 'perf-hint' },
{ id: 'time-to-first-byte', weight: 0, group: 'perf-hint' },
{ id: 'redirects', weight: 0, group: 'perf-hint' },
{ id: 'uses-rel-preload', weight: 0, group: 'perf-hint' },
{ id: 'total-byte-weight', weight: 0, group: 'perf-info' },
{ id: 'dom-size', weight: 0, group: 'perf-info' },
{ id: 'critical-request-chains', weight: 0, group: 'perf-info' },
{ id: 'network-requests', weight: 0 },
{ id: 'user-timings', weight: 0, group: 'perf-info' },
{ id: 'bootup-time', weight: 0, group: 'perf-info' },
{ id: 'screenshot-thumbnails', weight: 0 },
{ id: 'mainthread-work-breakdown', weight: 0, group: 'perf-info' },

@@ -274,9 +308,13 @@ { id: 'font-display', weight: 0, group: 'perf-info' },

},
pwa: {
'pwa': {
name: 'Progressive Web App',
weight: 1,
description: 'These checks validate the aspects of a Progressive Web App, as specified by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist).',
audits: [
{ id: 'service-worker', weight: 1 },
{ id: 'works-offline', weight: 1 },
{ id: 'without-javascript', weight: 1 },
{ id: 'redirects-http', weight: 1 },
{ id: 'load-fast-enough-for-pwa', weight: 1 },
{ id: 'webapp-install-banner', weight: 1 },
{ id: 'splash-screen', weight: 1 },
{ id: 'themed-omnibox', weight: 1 },

@@ -290,3 +328,3 @@ { id: 'viewport', weight: 1 },

},
accessibility: {
'accessibility': {
name: 'Accessibility',

@@ -342,3 +380,3 @@ description: 'These checks highlight opportunities to [improve the accessibility of your web app](https://developers.google.com/web/fundamentals/accessibility). Only a subset of accessibility issues can be automatically detected so manual testing is also encouraged.',

},
'best-practices': { //eslint-disable-line
'best-practices': {
name: 'Best Practices',

@@ -367,4 +405,4 @@ description: 'We\'ve compiled some recommendations for modernizing your web app and avoiding performance pitfalls.',

description: 'These checks ensure that your page is optimized for search engine results ranking. ' +
'There are additional factors Lighthouse does not check that may affect your search ranking. ' +
'[Learn more](https://support.google.com/webmasters/answer/35769).',
'There are additional factors Lighthouse does not check that may affect your search ranking. ' +
'[Learn more](https://support.google.com/webmasters/answer/35769).',
audits: [

@@ -377,2 +415,3 @@ { id: 'viewport', weight: 1, group: 'seo-mobile' },

{ id: 'is-crawlable', weight: 1, group: 'seo-crawl' },
// { id: 'robots-txt', weight: 1, group: 'seo-crawl' },
{ id: 'hreflang', weight: 1, group: 'seo-content' },

@@ -385,5 +424,5 @@ { id: 'canonical', weight: 1, group: 'seo-content' },

],
}
},
},
},
}
};

@@ -0,1 +1,3 @@

const constants = require('../constants');
module.exports = {

@@ -25,52 +27,81 @@ url: 'https://example.com/',

report: {
settings: {},
passes: [
settings: constants.defaultSettings,
passes: [{
passName: 'defaultPass',
recordTrace: true,
useThrottling: true,
pauseAfterLoadMs: 5250,
networkQuietThresholdMs: 5250,
cpuQuietThresholdMs: 5250,
gatherers: [
'url',
'scripts',
'css-usage',
'viewport',
'viewport-dimensions',
'theme-color',
'manifest',
'runtime-exceptions',
'chrome-console-messages',
'image-usage',
'accessibility',
'dobetterweb/all-event-listeners',
'dobetterweb/anchors-with-no-rel-noopener',
'dobetterweb/appcache',
'dobetterweb/domstats',
'dobetterweb/js-libraries',
'dobetterweb/optimized-images',
'dobetterweb/password-inputs-with-prevented-paste',
'dobetterweb/response-compression',
'dobetterweb/tags-blocking-first-paint',
'dobetterweb/websql',
'seo/meta-description',
'seo/font-size',
'seo/crawlable-links',
'seo/meta-robots',
'seo/hreflang',
'seo/embedded-content',
'seo/canonical',
'seo/robots-txt',
'fonts',
],
},
{
passName: 'defaultPass',
recordTrace: true,
pauseAfterLoadMs: 10000,
networkQuietThresholdMs: 10000,
cpuQuietThresholdMs: 10000,
passName: 'offlinePass',
gatherers: [
'url',
'scripts',
'css-usage',
'viewport',
'viewport-dimensions',
'theme-color',
'manifest',
'runtime-exceptions',
'chrome-console-messages',
'image-usage',
'accessibility',
'dobetterweb/all-event-listeners',
'dobetterweb/anchors-with-no-rel-noopener',
'dobetterweb/appcache',
'dobetterweb/domstats',
'dobetterweb/js-libraries',
'dobetterweb/optimized-images',
'dobetterweb/password-inputs-with-prevented-paste',
'dobetterweb/response-compression',
'dobetterweb/tags-blocking-first-paint',
'dobetterweb/websql',
'seo/meta-description',
'seo/font-size',
'seo/crawlable-links',
'seo/meta-robots',
'seo/hreflang',
'seo/embedded-content',
'seo/canonical',
'fonts',
'service-worker',
'offline',
'start-url',
],
},
],
{
passName: 'redirectPass',
// Speed up the redirect pass by blocking stylesheets, fonts, and images
blockedUrlPatterns: ['*.css', '*.jpg', '*.jpeg', '*.png', '*.gif', '*.svg', '*.ttf', '*.woff', '*.woff2'],
gatherers: [
'http-redirect',
'html-without-javascript',
],
}],
audits: [
'is-on-https',
'redirects-http',
'service-worker',
'works-offline',
'viewport',
'without-javascript',
'first-meaningful-paint',
'load-fast-enough-for-pwa',
'speed-index-metric',
'screenshot-thumbnails',
'estimated-input-latency',
'errors-in-console',
'time-to-first-byte',
'first-interactive',
'consistently-interactive',
'user-timings',
'critical-request-chains',
'redirects',
'webapp-install-banner',
'splash-screen',
'themed-omnibox',

@@ -85,3 +116,3 @@ 'manifest-short-name-length',

'font-display',
'screenshot-thumbnails',
'network-requests',
'manual/pwa-cross-browser',

@@ -135,8 +166,11 @@ 'manual/pwa-page-transitions',

'accessibility/manual/visual-order-follows-dom',
'byte-efficiency/uses-long-cache-ttl',
'byte-efficiency/total-byte-weight',
'byte-efficiency/offscreen-images',
'byte-efficiency/unminified-css',
'byte-efficiency/unminified-javascript',
'byte-efficiency/unused-css-rules',
'byte-efficiency/uses-webp-images',
'byte-efficiency/uses-optimized-images',
'byte-efficiency/uses-request-compression',
// 'byte-efficiency/uses-text-compression',
'byte-efficiency/uses-responsive-images',

@@ -157,2 +191,3 @@ 'dobetterweb/appcache-manifest',

'dobetterweb/uses-passive-event-listeners',
// 'seo/robots-txt',
'seo/meta-description',

@@ -222,4 +257,4 @@ 'seo/http-status-code',

description: 'These checks are required by the baseline ' +
'[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' +
'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.',
'[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' +
'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.',
},

@@ -229,3 +264,3 @@ 'seo-mobile': {

description: 'Make sure your pages are mobile friendly so users don’t have to pinch or zoom ' +
'in order to read the content pages. [Learn more](https://developers.google.com/search/mobile-sites/).',
'in order to read the content pages. [Learn more](https://developers.google.com/search/mobile-sites/).',
},

@@ -246,8 +281,11 @@ 'seo-content': {

categories: {
performance: {
'performance': {
name: 'Performance',
description: 'These encapsulate your web app\'s current performance and opportunities to improve it.',
audits: [
{ id: 'first-meaningful-paint', weight: 5, group: 'perf-metric' },
{ id: 'first-interactive', weight: 5, group: 'perf-metric' },
{ id: 'consistently-interactive', weight: 5, group: 'perf-metric' },
{ id: 'speed-index-metric', weight: 1, group: 'perf-metric' },
{ id: 'estimated-input-latency', weight: 1, group: 'perf-metric' },
{ id: 'link-blocking-first-paint', weight: 0, group: 'perf-hint' },

@@ -257,24 +295,35 @@ { id: 'script-blocking-first-paint', weight: 0, group: 'perf-hint' },

{ id: 'offscreen-images', weight: 0, group: 'perf-hint' },
{ id: 'unminified-css', weight: 0, group: 'perf-hint' },
{ id: 'unminified-javascript', weight: 0, group: 'perf-hint' },
{ id: 'unused-css-rules', weight: 0, group: 'perf-hint' },
{ id: 'uses-optimized-images', weight: 0, group: 'perf-hint' },
{ id: 'uses-webp-images', weight: 0, group: 'perf-hint' },
{ id: 'uses-request-compression', weight: 0, group: 'perf-hint' },
// { id: 'uses-text-compression', weight: 0, group: 'perf-hint' },
{ id: 'time-to-first-byte', weight: 0, group: 'perf-hint' },
{ id: 'redirects', weight: 0, group: 'perf-hint' },
{ id: 'uses-rel-preload', weight: 0, group: 'perf-hint' },
{ id: 'total-byte-weight', weight: 0, group: 'perf-info' },
{ id: 'uses-long-cache-ttl', weight: 0, group: 'perf-info' },
{ id: 'dom-size', weight: 0, group: 'perf-info' },
{ id: 'critical-request-chains', weight: 0, group: 'perf-info' },
{ id: 'network-requests', weight: 0 },
{ id: 'user-timings', weight: 0, group: 'perf-info' },
{ id: 'bootup-time', weight: 0, group: 'perf-info' },
{ id: 'screenshot-thumbnails', weight: 0 },
{ id: 'mainthread-work-breakdown', weight: 0, group: 'perf-info' },
{ id: 'font-display', weight: 0, group: 'perf-info' },
{ id: 'screenshot-thumbnails', weight: 0 },
],
},
pwa: {
'pwa': {
name: 'Progressive Web App',
weight: 1,
description: 'These checks validate the aspects of a Progressive Web App, as specified by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist).',
audits: [
{ id: 'service-worker', weight: 1 },
{ id: 'works-offline', weight: 1 },
{ id: 'without-javascript', weight: 1 },
{ id: 'is-on-https', weight: 1 },
{ id: 'redirects-http', weight: 1 },
{ id: 'load-fast-enough-for-pwa', weight: 1 },
{ id: 'webapp-install-banner', weight: 1 },
{ id: 'splash-screen', weight: 1 },
{ id: 'themed-omnibox', weight: 1 },

@@ -288,3 +337,3 @@ { id: 'viewport', weight: 1 },

},
accessibility: {
'accessibility': {
name: 'Accessibility',

@@ -340,3 +389,3 @@ description: 'These checks highlight opportunities to [improve the accessibility of your web app](https://developers.google.com/web/fundamentals/accessibility). Only a subset of accessibility issues can be automatically detected so manual testing is also encouraged.',

},
'best-practices': { //eslint-disable-line
'best-practices': {
name: 'Best Practices',

@@ -347,2 +396,3 @@ description: 'We\'ve compiled some recommendations for modernizing your web app and avoiding performance pitfalls.',

{ id: 'no-websql', weight: 1 },
{ id: 'is-on-https', weight: 1 },
{ id: 'uses-http2', weight: 1 },

@@ -363,8 +413,7 @@ { id: 'uses-passive-event-listeners', weight: 1 },

},
'seo': {
name: 'SEO',
description: 'These checks ensure that your page is optimized for search engine results ranking. ' +
'There are additional factors Lighthouse does not check that may affect your search ranking. ' +
'[Learn more](https://support.google.com/webmasters/answer/35769).',
'There are additional factors Lighthouse does not check that may affect your search ranking. ' +
'[Learn more](https://support.google.com/webmasters/answer/35769).',
audits: [

@@ -377,2 +426,3 @@ { id: 'viewport', weight: 1, group: 'seo-mobile' },

{ id: 'is-crawlable', weight: 1, group: 'seo-crawl' },
// { id: 'robots-txt', weight: 1, group: 'seo-crawl' },
{ id: 'hreflang', weight: 1, group: 'seo-content' },

@@ -385,5 +435,5 @@ { id: 'canonical', weight: 1, group: 'seo-content' },

],
}
},
},
},
}
};
{
"name": "@dreipol/lighthouse-config",
"version": "0.3.2",
"version": "0.4.0",
"description": "Basic lighthouse config",

@@ -5,0 +5,0 @@ "scripts": {

@@ -39,2 +39,2 @@ # @dreipol/lighthouse-config

| report | Object | | Lighthouse report configurations. [See exmaples](https://github.com/GoogleChrome/lighthouse/tree/master/lighthouse-core/config) |
| persisters.modules | Array | ['json', 'html'] | Current available persisters are json and html |
| persisters.modules | Array | ['html'] | Current available persisters are `html` `json` and `html-dashboard` |
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc