Skip to content

Commit

Permalink
core: re-weight best practices (#15321)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine authored Aug 2, 2023
1 parent 691c506 commit d4dd645
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,12 @@ const defaultConfig = {
supportedModes: ['navigation', 'timespan', 'snapshot'],
auditRefs: [
// Trust & Safety
{id: 'is-on-https', weight: 1, group: 'best-practices-trust-safety'},
{id: 'is-on-https', weight: 5, group: 'best-practices-trust-safety'},
{id: 'geolocation-on-start', weight: 1, group: 'best-practices-trust-safety'},
{id: 'notification-on-start', weight: 1, group: 'best-practices-trust-safety'},
{id: 'csp-xss', weight: 0, group: 'best-practices-trust-safety'},
// User Experience
{id: 'paste-preventing-inputs', weight: 1, group: 'best-practices-ux'},
{id: 'paste-preventing-inputs', weight: 3, group: 'best-practices-ux'},
{id: 'image-aspect-ratio', weight: 1, group: 'best-practices-ux'},
{id: 'image-size-responsive', weight: 1, group: 'best-practices-ux'},
{id: 'preload-fonts', weight: 1, group: 'best-practices-ux'},
Expand All @@ -608,7 +608,7 @@ const defaultConfig = {
// General Group
{id: 'no-unload-listeners', weight: 1, group: 'best-practices-general'},
{id: 'js-libraries', weight: 0, group: 'best-practices-general'},
{id: 'deprecations', weight: 1, group: 'best-practices-general'},
{id: 'deprecations', weight: 5, group: 'best-practices-general'},
{id: 'errors-in-console', weight: 1, group: 'best-practices-general'},
{id: 'valid-source-maps', weight: 0, group: 'best-practices-general'},
{id: 'inspector-issues', weight: 1, group: 'best-practices-general'},
Expand Down
22 changes: 11 additions & 11 deletions core/test/fixtures/user-flows/reports/sample-flow-result.json
Original file line number Diff line number Diff line change
Expand Up @@ -4372,7 +4372,7 @@
"auditRefs": [
{
"id": "is-on-https",
"weight": 1,
"weight": 5,
"group": "best-practices-trust-safety"
},
{
Expand All @@ -4392,7 +4392,7 @@
},
{
"id": "paste-preventing-inputs",
"weight": 1,
"weight": 3,
"group": "best-practices-ux"
},
{
Expand Down Expand Up @@ -4432,7 +4432,7 @@
},
{
"id": "deprecations",
"weight": 1,
"weight": 5,
"group": "best-practices-general"
},
{
Expand Down Expand Up @@ -10848,7 +10848,7 @@
"auditRefs": [
{
"id": "is-on-https",
"weight": 1,
"weight": 5,
"group": "best-practices-trust-safety"
},
{
Expand All @@ -10873,7 +10873,7 @@
},
{
"id": "deprecations",
"weight": 1,
"weight": 5,
"group": "best-practices-general"
},
{
Expand All @@ -10893,7 +10893,7 @@
}
],
"id": "best-practices",
"score": 0.86
"score": 0.93
}
},
"categoryGroups": {
Expand Down Expand Up @@ -15221,7 +15221,7 @@
"auditRefs": [
{
"id": "paste-preventing-inputs",
"weight": 1,
"weight": 3,
"group": "best-practices-ux"
},
{
Expand All @@ -15246,7 +15246,7 @@
}
],
"id": "best-practices",
"score": 0.75
"score": 0.83
},
"seo": {
"title": "SEO",
Expand Down Expand Up @@ -22000,7 +22000,7 @@
"auditRefs": [
{
"id": "is-on-https",
"weight": 1,
"weight": 5,
"group": "best-practices-trust-safety"
},
{
Expand All @@ -22020,7 +22020,7 @@
},
{
"id": "paste-preventing-inputs",
"weight": 1,
"weight": 3,
"group": "best-practices-ux"
},
{
Expand Down Expand Up @@ -22060,7 +22060,7 @@
},
{
"id": "deprecations",
"weight": 1,
"weight": 5,
"group": "best-practices-general"
},
{
Expand Down
8 changes: 4 additions & 4 deletions core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6469,7 +6469,7 @@
"auditRefs": [
{
"id": "is-on-https",
"weight": 1,
"weight": 5,
"group": "best-practices-trust-safety"
},
{
Expand All @@ -6489,7 +6489,7 @@
},
{
"id": "paste-preventing-inputs",
"weight": 1,
"weight": 3,
"group": "best-practices-ux"
},
{
Expand Down Expand Up @@ -6529,7 +6529,7 @@
},
{
"id": "deprecations",
"weight": 1,
"weight": 5,
"group": "best-practices-general"
},
{
Expand All @@ -6549,7 +6549,7 @@
}
],
"id": "best-practices",
"score": 0.33
"score": 0.18
},
"seo": {
"title": "SEO",
Expand Down
2 changes: 1 addition & 1 deletion report/test/generator/report-generator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe('ReportGenerator', () => {
category,score
\\"performance\\",\\"0.28\\"
\\"accessibility\\",\\"0.81\\"
\\"best-practices\\",\\"0.33\\"
\\"best-practices\\",\\"0.18\\"
\\"seo\\",\\"0.67\\"
\\"pwa\\",\\"0.38\\"
Expand Down

0 comments on commit d4dd645

Please sign in to comment.