Skip to content

Commit 1aa4ade

Browse files
committed
xo: Fix @typescript-eslint/parameter-properties.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent dcb46ee commit 1aa4ade

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

app/renderer/js/components/tab.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ export interface TabProps {
1515
}
1616

1717
export default abstract class Tab {
18-
props: TabProps;
1918
abstract $el: Element;
2019

21-
constructor(props: TabProps) {
22-
this.props = props;
23-
}
20+
constructor(readonly props: TabProps) {}
2421

2522
registerListeners(): void {
2623
this.$el.addEventListener("click", this.props.onClick);

app/renderer/js/components/webview.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export default class WebView {
9292
return new WebView(props, $element, webContentsId);
9393
}
9494

95-
props: WebViewProps;
9695
zoomFactor: number;
9796
badgeCount: number;
9897
loading: boolean;
@@ -102,11 +101,10 @@ export default class WebView {
102101
webContentsId: number;
103102

104103
private constructor(
105-
props: WebViewProps,
104+
readonly props: WebViewProps,
106105
$element: HTMLElement,
107106
webContentsId: number,
108107
) {
109-
this.props = props;
110108
this.zoomFactor = 1;
111109
this.loading = true;
112110
this.badgeCount = 0;

app/renderer/js/pages/preference/nav.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ interface PreferenceNavProps {
1010
}
1111

1212
export default class PreferenceNav {
13-
props: PreferenceNavProps;
1413
navItems: NavItem[];
1514
$el: Element;
16-
constructor(props: PreferenceNavProps) {
17-
this.props = props;
15+
constructor(private readonly props: PreferenceNavProps) {
1816
this.navItems = [
1917
"General",
2018
"Network",

app/renderer/js/utils/reconnect-util.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ const logger = new Logger({
1010
});
1111

1212
export default class ReconnectUtil {
13-
webview: WebView;
1413
url: string;
1514
alreadyReloaded: boolean;
1615
fibonacciBackoff: backoff.Backoff;
1716

1817
constructor(webview: WebView) {
19-
this.webview = webview;
2018
this.url = webview.props.url;
2119
this.alreadyReloaded = false;
2220
this.fibonacciBackoff = backoff.fibonacci({

0 commit comments

Comments
 (0)