[ve] Track known jslog context values
This CL introduces a list of known jslog context values, an eslint rule
to update this list and a console error message when unknown context
values are being used.
Bug: 357571602
Change-Id: I5cb2b2e8788537022d11a3acc61fb37a23bcd38d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5756569
Reviewed-by: Simon Zünd <[email protected]>
Commit-Queue: Danil Somsikov <[email protected]>
diff --git a/front_end/.eslintrc.js b/front_end/.eslintrc.js
index 4cdd653..81e9c57 100644
--- a/front_end/.eslintrc.js
+++ b/front_end/.eslintrc.js
@@ -56,6 +56,7 @@
'rulesdir/lit_html_no_attribute_quotes': 'error',
'rulesdir/lit_template_result_or_nothing': 'error',
'rulesdir/inject_checkbox_styles': 'error',
+ 'rulesdir/jslog_context_list': 'error',
'@typescript-eslint/naming-convention': [
'error', {
'selector': ['property', 'parameterProperty'],
@@ -165,6 +166,12 @@
'rulesdir/use_private_class_members': 'error',
}
},
+ {
+ 'files': ['ui/visual_logging/KnownContextValues.ts'],
+ 'rules': {
+ 'rulesdir/jslog_context_list': 'off',
+ }
+ },
// TODO(crbug/1402569): Remove once LitElement is fully adopted.
{
'files': ['panels/recorder/**/*.ts', 'panels/protocol_monitor/**/*.ts', 'ui/components/suggestion_input/*.ts'],