From d53ff7c1b6f67ca389eb37ff68dfb6cf87ca379d Mon Sep 17 00:00:00 2001 From: Jithen Shriyan Date: Sun, 21 Jan 2024 10:33:43 -0500 Subject: [PATCH] [style] format Signed-off-by: Jithen Shriyan --- .../verify_microsite_accessibility.yml | 2 +- microsite/lighthouserc.js | 94 ++++++++++--------- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/.github/workflows/verify_microsite_accessibility.yml b/.github/workflows/verify_microsite_accessibility.yml index 482d8270bd..683fe7840e 100644 --- a/.github/workflows/verify_microsite_accessibility.yml +++ b/.github/workflows/verify_microsite_accessibility.yml @@ -37,4 +37,4 @@ jobs: run: | yarn dlx @lhci/cli@0.11.x --config=microsite/lighthouserc.js autorun env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/microsite/lighthouserc.js b/microsite/lighthouserc.js index a980a53287..f0024ee0b3 100644 --- a/microsite/lighthouserc.js +++ b/microsite/lighthouserc.js @@ -14,53 +14,55 @@ * limitations under the License. */ -var sidebars = require('./sidebars.json') +var sidebars = require('./sidebars.json'); module.exports = { - ci: { - collect: { - url: [ - /** Home */ - 'http://localhost:3000', - /** Docs - Getting Started */ - 'http://localhost:3000/docs/getting-started', - /** Docs - Software Catalog */ - 'http://localhost:3000/docs/features/software-catalog', - /** Docs - Create a Plugin */ - 'http://localhost:3000/docs/plugins/create-a-plugin', - /** Docs - Designing for Backstage */ - 'http://localhost:3000/docs/dls/design', - /** Blog */ - 'http://localhost:3000/blog', - /** Plugins */ - 'http://localhost:3000/plugins', - /** Demos */ - 'http://localhost:3000/demos', - /** Community */ - 'http://localhost:3000/community', - /** Releases */ - ...(sidebars.releases['Release Notes'].map((path) => `http://localhost:3000/docs/${path}`)), - ], - settings: { - onlyCategories: ['accessibility'], - output: ['html', 'json'], - outputPath: './.lighthouseci/reports', - preset: 'desktop', - }, - // refers to root package scripts - startServerCommand: 'yarn run start:microsite', - startServerReadyPattern: 'compiled successfully', - startServerReadyTimeout: 600000, - numberOfRuns: 1, - }, - assert: { - assertions: { - 'categories:performance': 'off', - 'categories:pwa': 'off', - 'categories:best-practices': 'off', - 'categories:seo': 'off', - 'categories:accessibility': ['error', { minScore: 0.95 }], - }, - }, + ci: { + collect: { + url: [ + /** Home */ + 'http://localhost:3000', + /** Docs - Getting Started */ + 'http://localhost:3000/docs/getting-started', + /** Docs - Software Catalog */ + 'http://localhost:3000/docs/features/software-catalog', + /** Docs - Create a Plugin */ + 'http://localhost:3000/docs/plugins/create-a-plugin', + /** Docs - Designing for Backstage */ + 'http://localhost:3000/docs/dls/design', + /** Blog */ + 'http://localhost:3000/blog', + /** Plugins */ + 'http://localhost:3000/plugins', + /** Demos */ + 'http://localhost:3000/demos', + /** Community */ + 'http://localhost:3000/community', + /** Releases */ + ...sidebars.releases['Release Notes'].map( + path => `http://localhost:3000/docs/${path}`, + ), + ], + settings: { + onlyCategories: ['accessibility'], + output: ['html', 'json'], + outputPath: './.lighthouseci/reports', + preset: 'desktop', + }, + // refers to root package scripts + startServerCommand: 'yarn run start:microsite', + startServerReadyPattern: 'compiled successfully', + startServerReadyTimeout: 600000, + numberOfRuns: 1, }, + assert: { + assertions: { + 'categories:performance': 'off', + 'categories:pwa': 'off', + 'categories:best-practices': 'off', + 'categories:seo': 'off', + 'categories:accessibility': ['error', { minScore: 0.95 }], + }, + }, + }, };