lighthouse-ci
lighthouse-ci copied to clipboard
Multiple levels for a single metric
Hello! You've made a great instrument! Thank you!
Is there any way to configure multiple levels for a single metric? I want to configure metric to warn at one threshold, and fail at another.
e.g:
'largest-contentful-paint': ['error', { maxNumericValue: 3000 }],
'largest-contentful-paint': ['warn', { maxNumericValue: 2000 }],
Thanks for filing @MrFlashAccount!
There is not a way to do this currently without two separate configs (the example you provide would be invalid due to duplicate keys). If we were to support this I think we'd pursue something like
'largest-contentful-paint': [
['error', {maxNumericValue: 3000}],
['warn', {maxNumericValue: 2000}],
]
Yes, I know about duplication, I wrote this example only to explain myself with code :) Thank you for your answer!