Remove opt_ prefix
TS Style guide recommends not to use opt_ prefix for optional
params.
https://google.github.io/styleguide/tsguide.html#naming-style
Google-bug-id: b/260980834
Release-Notes: skip
Change-Id: Ida87e52d1880a75de45e3c3ac67b010f347c1652
diff --git a/polygerrit-ui/app/services/gr-reporting/gr-reporting_impl.ts b/polygerrit-ui/app/services/gr-reporting/gr-reporting_impl.ts
index 5b6e852..55bb64c 100644
--- a/polygerrit-ui/app/services/gr-reporting/gr-reporting_impl.ts
+++ b/polygerrit-ui/app/services/gr-reporting/gr-reporting_impl.ts
@@ -131,8 +131,8 @@
};
// TODO(dmfilippov): TS-fix-any unclear what is context
// eslint-disable-next-line @typescript-eslint/no-explicit-any
- const catchErrors = function (opt_context?: any) {
- const context = opt_context || window;
+ const catchErrors = function (context?: any) {
+ context = context || window;
const oldOnError = context.onerror;
context.onerror = (
event: Event | string,
@@ -387,18 +387,18 @@
// We cache until metrics plugin is loaded
this.pending.push([eventInfo, noLog]);
if (this._isMetricsPluginLoaded()) {
- this.pending.forEach(([eventInfo, opt_noLog]) => {
- this._reportEvent(eventInfo, opt_noLog);
+ this.pending.forEach(([eventInfo, noLog]) => {
+ this._reportEvent(eventInfo, noLog);
});
this.pending = [];
}
}
}
- private _reportEvent(eventInfo: EventInfo, opt_noLog?: boolean) {
+ private _reportEvent(eventInfo: EventInfo, noLog?: boolean) {
const {type, value, name, eventDetails} = eventInfo;
document.dispatchEvent(new CustomEvent(type, {detail: eventInfo}));
- if (opt_noLog) {
+ if (noLog) {
return;
}
if (type !== ERROR.TYPE) {