Skip to content

Commit

Permalink
some more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianaixba committed Apr 10, 2024
1 parent 525f65a commit 430f2ad
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 41 deletions.
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ _Some incomplete notes_
* **Report** - The report UI, created client-side from the LHR. See [HTML Report Generation Overview](../report/README.md) for details.

### Audit/Report terminology
* **Category** - Roll-up collection of audits and audit groups into a user-facing section of the report (eg. `Best Practices`). Applies weighting and overall scoring to the section. Examples: PWA, Accessibility, Best Practices.
* **Category** - Roll-up collection of audits and audit groups into a user-facing section of the report (eg. `Best Practices`). Applies weighting and overall scoring to the section. Examples: Accessibility, Best Practices.
* **Audit title** - Short user-visible title for the successful audit. eg. “All image elements have `[alt]` attributes.”
* **Audit failureTitle** - Short user-visible title for a failing audit. eg. “Some image elements do not have `[alt]` attributes.”
* **Audit description** - Explanation of why the user should care about the audit. Not necessarily how to fix it, unless there is no external link that explains it. ([See description guidelines](../CONTRIBUTING.md#audit-description-guidelines)). eg. “Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute. [Learn more].”
Expand Down
10 changes: 5 additions & 5 deletions docs/understanding-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ An array containing the different categories, their scores, and the results of t
### Example
```json
{
"pwa": {
"id": "pwa",
"title": "Progressive Web App",
"description": "PWAs are awesome. [Learn more](...)",
"seo": {
"id": "seo",
"title": "SEO",
"description": "These checks ensure that your page is following basic search engine optimization advice...",
"score": 0.54,
"auditRefs": [
{
"id": "is-on-https",
"id": "crawlable-anchors",
"weight": 1
}
]
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Configuration:
--gather-mode, -G Collect artifacts from a connected browser and save to disk. (Artifacts folder path may optionally be provided). If audit-mode is not also enabled, the run will quit early.
--audit-mode, -A Process saved artifacts from disk. (Artifacts folder path may be provided, otherwise defaults to ./latest-run/)
--only-audits Only run the specified audits [array]
--only-categories Only run the specified categories. Available categories: accessibility, best-practices, performance, pwa, seo [array]
--only-categories Only run the specified categories. Available categories: accessibility, best-practices, performance, seo [array]
--skip-audits Run everything except these audits [array]
--budget-path The path to the budget.json file for LightWallet. [string]
--disable-full-page-screenshot Disables collection of the full page screenshot, which can be quite large [boolean]
Expand Down Expand Up @@ -148,7 +148,7 @@ Examples:
lighthouse <url> --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging
lighthouse <url> --extra-headers "{\"Cookie\":\"monster=blue\", \"x-men\":\"wolverine\"}" Stringify'd JSON HTTP Header key/value pairs to send in requests
lighthouse <url> --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests
lighthouse <url> --only-categories=performance,pwa Only run the specified categories. Available categories: accessibility, best-practices, performance, pwa, seo
lighthouse <url> --only-categories=performance,seo Only run the specified categories. Available categories: accessibility, best-practices, performance, seo
For more information on Lighthouse, see https://developers.google.com/web/tools/lighthouse/.
```
Expand Down
21 changes: 0 additions & 21 deletions types/artifacts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
TraceError: Trace;
/** Elements associated with metrics (ie: Largest Contentful Paint element). */
TraceElements: Artifacts.TraceElement[];
/** Parsed version of the page's Web App Manifest, or null if none found. */
WebAppManifest: Artifacts.Manifest | null;
/** COMPAT: A set of traces, keyed by passName. */
traces: {[passName: string]: Trace};
/** COMPAT: A set of DevTools debugger protocol records, keyed by passName. */
Expand Down Expand Up @@ -595,25 +593,6 @@ declare module Artifacts {
}
}

type ManifestValueCheckID = 'hasStartUrl'|'hasIconsAtLeast144px'|'hasIconsAtLeast512px'|'fetchesIcon'|'hasPWADisplayValue'|'hasBackgroundColor'|'hasThemeColor'|'hasShortName'|'hasName'|'shortNameLength'|'hasMaskableIcon';

type ManifestValues = {
isParseFailure: false;
allChecks: {
id: ManifestValueCheckID;
failureText: string;
passing: boolean;
}[];
} | {
isParseFailure: true;
parseFailureReason: string;
allChecks: {
id: ManifestValueCheckID;
failureText: string;
passing: boolean;
}[];
}

type MeasureEntry = LHResult.MeasureEntry;

interface MetricComputationDataInput {
Expand Down
10 changes: 0 additions & 10 deletions types/audit.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,6 @@ declare module Audit {

/** Type returned by Audit.audit(). Only score is required. */
type Product = NonNumericProduct | NumericProduct;

type MultiCheckAuditP1 = Partial<Record<Artifacts.ManifestValueCheckID, boolean>>;
type MultiCheckAuditP2 = Partial<Artifacts.ManifestValues>;
interface MultiCheckAuditP3 {
failures: Array<string>;
manifestValues?: undefined;
allChecks?: undefined;
}

type MultiCheckAuditDetails = MultiCheckAuditP1 & MultiCheckAuditP2 & MultiCheckAuditP3;
}

export default Audit;
2 changes: 1 addition & 1 deletion types/internal/smokehouse.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ declare global {
}

export interface TestDfn {
/** Identification of test. Can be used for group selection (e.g. `yarn smoke pwa` will run all tests with `id.includes('pwa')`). */
/** Identification of test. Can be used for group selection (e.g. `yarn smoke csp` will run all tests with `id.includes('csp')`). */
id: string;
/** Expected test results. */
expectations: ExpectedRunnerResult;
Expand Down
2 changes: 1 addition & 1 deletion viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ e.g., `http://localhost:7333/?jsonurl=https://gist.githubusercontent.com/Kikobea

Pass target URL `psiurl` query parameter.

e.g., `http://localhost:7333/?psiurl=https://www.example.com&category=pwa&category=seo`
e.g., `http://localhost:7333/?psiurl=https://www.example.com&category=seo`

The following query parameters are also supported as options:

Expand Down

0 comments on commit 430f2ad

Please sign in to comment.