summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2024-06-14 11:41:11 +0200
committerOskar Nyberg <oskar@mullvad.net>2024-06-18 15:04:34 +0200
commit59f21bba30b22a627d77184275a67a4d09daed23 (patch)
tree0868fe15307d38ca85aec5a1369f33d4e680ff95 /gui/src
parent454df7dd6b0ff70c5eb63da5745e39e2b5c5897e (diff)
downloadmullvadvpn-59f21bba30b22a627d77184275a67a4d09daed23.tar.xz
mullvadvpn-59f21bba30b22a627d77184275a67a4d09daed23.zip
Fix eslint errors
All changes in this commit were produced by running `npm run lint -- --fix`.
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/command-line-options.ts5
-rw-r--r--gui/src/main/expectation.ts5
-rw-r--r--gui/src/main/index.ts3
-rw-r--r--gui/src/main/logging.ts5
-rw-r--r--gui/src/main/macos-split-tunneling.ts4
-rw-r--r--gui/src/main/user-interface.ts8
-rw-r--r--gui/src/main/window-controller.ts5
-rw-r--r--gui/src/main/windows-pe-parser.ts10
-rw-r--r--gui/src/main/windows-split-tunneling.ts55
-rw-r--r--gui/src/renderer/app.tsx5
-rw-r--r--gui/src/renderer/components/CustomDnsSettings.tsx8
-rw-r--r--gui/src/renderer/components/EditApiAccessMethod.tsx4
-rw-r--r--gui/src/renderer/components/ExpiredAccountErrorView.tsx6
-rw-r--r--gui/src/renderer/components/HeaderBar.tsx4
-rw-r--r--gui/src/renderer/components/NotificationArea.tsx4
-rw-r--r--gui/src/renderer/components/Settings.tsx8
-rw-r--r--gui/src/renderer/components/SettingsImport.tsx5
-rw-r--r--gui/src/renderer/components/TransitionContainer.tsx6
-rw-r--r--gui/src/renderer/components/VpnSettings.tsx5
-rw-r--r--gui/src/renderer/components/cell/CellButton.tsx4
-rw-r--r--gui/src/renderer/components/select-location/CustomLists.tsx7
-rw-r--r--gui/src/renderer/components/select-location/SelectLocation.tsx8
-rw-r--r--gui/src/renderer/lib/3dmap.ts15
-rw-r--r--gui/src/renderer/lib/ip.ts5
-rw-r--r--gui/src/shared/daemon-rpc-types.ts9
-rw-r--r--gui/src/shared/ipc-helpers.ts2
-rw-r--r--gui/src/shared/notifications/block-when-disconnected.ts3
-rw-r--r--gui/src/shared/notifications/close-to-account-expiry.ts3
-rw-r--r--gui/src/shared/notifications/connecting.ts3
-rw-r--r--gui/src/shared/notifications/error.ts3
-rw-r--r--gui/src/shared/notifications/inconsistent-version.ts3
-rw-r--r--gui/src/shared/notifications/reconnecting.ts3
-rw-r--r--gui/src/shared/notifications/unsupported-version.ts3
-rw-r--r--gui/src/shared/notifications/update-available.ts3
34 files changed, 129 insertions, 100 deletions
diff --git a/gui/src/main/command-line-options.ts b/gui/src/main/command-line-options.ts
index 0cddf6b14a..5a7ca57762 100644
--- a/gui/src/main/command-line-options.ts
+++ b/gui/src/main/command-line-options.ts
@@ -1,7 +1,10 @@
class CommandLineOption {
private flags: string[];
- public constructor(private description: string, ...flags: string[]) {
+ public constructor(
+ private description: string,
+ ...flags: string[]
+ ) {
this.flags = flags;
}
diff --git a/gui/src/main/expectation.ts b/gui/src/main/expectation.ts
index 18fafb2836..4141b46ffb 100644
--- a/gui/src/main/expectation.ts
+++ b/gui/src/main/expectation.ts
@@ -2,7 +2,10 @@ export default class Expectation {
private fulfilled = false;
private timeout: NodeJS.Timeout;
- constructor(private handler: () => void, timeout = 2000) {
+ constructor(
+ private handler: () => void,
+ timeout = 2000,
+ ) {
this.timeout = global.setTimeout(() => {
this.fulfill();
}, timeout);
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index f48b73d838..ded7ea6ede 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -90,7 +90,8 @@ class ApplicationMain
UserInterfaceDelegate,
TunnelStateHandlerDelegate,
SettingsDelegate,
- AccountDelegate {
+ AccountDelegate
+{
private daemonRpc: DaemonRpc;
private notificationController = new NotificationController(this);
diff --git a/gui/src/main/logging.ts b/gui/src/main/logging.ts
index 8798b52066..f71e3a62f0 100644
--- a/gui/src/main/logging.ts
+++ b/gui/src/main/logging.ts
@@ -10,7 +10,10 @@ export const OLD_LOG_FILES = ['main.log', 'renderer.log', 'frontend.log'];
export class FileOutput implements ILogOutput {
private fileDescriptor: number;
- constructor(public level: LogLevel, filePath: string) {
+ constructor(
+ public level: LogLevel,
+ filePath: string,
+ ) {
this.fileDescriptor = fs.openSync(filePath, fs.constants.O_CREAT | fs.constants.O_WRONLY);
}
diff --git a/gui/src/main/macos-split-tunneling.ts b/gui/src/main/macos-split-tunneling.ts
index 024876d7fe..df144c1278 100644
--- a/gui/src/main/macos-split-tunneling.ts
+++ b/gui/src/main/macos-split-tunneling.ts
@@ -25,9 +25,7 @@ export class MacOsSplitTunnelingAppListRetriever implements ISplitTunnelingAppLi
*/
private additionalApplications = new AdditionalApplications();
- public async getApplications(
- updateCaches = false,
- ): Promise<{
+ public async getApplications(updateCaches = false): Promise<{
fromCache: boolean;
applications: ISplitTunnelingApplication[];
}> {
diff --git a/gui/src/main/user-interface.ts b/gui/src/main/user-interface.ts
index e3dd5a50ed..a0b4662c48 100644
--- a/gui/src/main/user-interface.ts
+++ b/gui/src/main/user-interface.ts
@@ -414,9 +414,11 @@ export default class UserInterface implements WindowControllerDelegate {
}
private async installDevTools() {
- const { default: installer, REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS } = await import(
- 'electron-devtools-installer'
- );
+ const {
+ default: installer,
+ REACT_DEVELOPER_TOOLS,
+ REDUX_DEVTOOLS,
+ } = await import('electron-devtools-installer');
const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
const options = { forceDownload, loadExtensionOptions: { allowFileAccess: true } };
try {
diff --git a/gui/src/main/window-controller.ts b/gui/src/main/window-controller.ts
index b18775a8b5..553c798334 100644
--- a/gui/src/main/window-controller.ts
+++ b/gui/src/main/window-controller.ts
@@ -159,7 +159,10 @@ export default class WindowController {
return this.webContentsValue.isDestroyed() ? undefined : this.webContentsValue;
}
- constructor(private delegate: WindowControllerDelegate, windowValue: BrowserWindow) {
+ constructor(
+ private delegate: WindowControllerDelegate,
+ windowValue: BrowserWindow,
+ ) {
this.windowValue = windowValue;
this.webContentsValue = windowValue.webContents;
this.windowPositioning = delegate.isUnpinnedWindow()
diff --git a/gui/src/main/windows-pe-parser.ts b/gui/src/main/windows-pe-parser.ts
index 94221c1228..f4d6ebc852 100644
--- a/gui/src/main/windows-pe-parser.ts
+++ b/gui/src/main/windows-pe-parser.ts
@@ -16,10 +16,10 @@ export type Datatype = PrimitiveWrapper | StructWrapper | ArrayWrapper;
type ValueType<T extends Datatype> = T extends PrimitiveWrapper
? PrimitiveValue<T>
: T extends ArrayWrapper
- ? ArrayValue<T>
- : T extends StructWrapper
- ? StructValue<T>
- : never;
+ ? ArrayValue<T>
+ : T extends StructWrapper
+ ? StructValue<T>
+ : never;
// Represents any kind of parseable value within the PE headers. Value is extended by
// PrimitiveValue, ArrayValue and StructValue.
@@ -160,7 +160,7 @@ export class StructValue<T extends StructWrapper = StructWrapper> extends Value<
// Parses and returns the value for the specified key.
public get<
U extends ValueType<T['struct'][number]['datatype']>,
- V extends StructItem = T['struct'][number]
+ V extends StructItem = T['struct'][number],
>(name: V['name']): U {
const index = this.datatype.struct.findIndex((entry) => entry.name === name);
if (index === -1) {
diff --git a/gui/src/main/windows-split-tunneling.ts b/gui/src/main/windows-split-tunneling.ts
index c74623a1f7..5ba594f7cc 100644
--- a/gui/src/main/windows-split-tunneling.ts
+++ b/gui/src/main/windows-split-tunneling.ts
@@ -170,9 +170,8 @@ export class WindowsSplitTunnelingAppListRetriever implements ISplitTunnelingApp
shortcuts.map(async (shortcut) => {
const lowercaseTarget = shortcut.target.toLowerCase();
if (this.applicationCache[lowercaseTarget] === undefined) {
- this.applicationCache[lowercaseTarget] = await this.convertToSplitTunnelingApplication(
- shortcut,
- );
+ this.applicationCache[lowercaseTarget] =
+ await this.convertToSplitTunnelingApplication(shortcut);
}
return this.applicationCache[lowercaseTarget];
@@ -246,21 +245,24 @@ export class WindowsSplitTunnelingAppListRetriever implements ISplitTunnelingApp
// Removes all duplicate shortcuts.
private removeDuplicates(shortcuts: ShortcutDetails[]): ShortcutDetails[] {
- const unique = shortcuts.reduce((shortcuts, shortcut) => {
- const lowercaseTarget = shortcut.target.toLowerCase();
- if (shortcuts[lowercaseTarget]) {
- if (
- shortcuts[lowercaseTarget].args &&
- shortcuts[lowercaseTarget].args !== '' &&
- (!shortcut.args || shortcut.args === '')
- ) {
+ const unique = shortcuts.reduce(
+ (shortcuts, shortcut) => {
+ const lowercaseTarget = shortcut.target.toLowerCase();
+ if (shortcuts[lowercaseTarget]) {
+ if (
+ shortcuts[lowercaseTarget].args &&
+ shortcuts[lowercaseTarget].args !== '' &&
+ (!shortcut.args || shortcut.args === '')
+ ) {
+ shortcuts[lowercaseTarget] = shortcut;
+ }
+ } else {
shortcuts[lowercaseTarget] = shortcut;
}
- } else {
- shortcuts[lowercaseTarget] = shortcut;
- }
- return shortcuts;
- }, {} as Record<string, ShortcutDetails>);
+ return shortcuts;
+ },
+ {} as Record<string, ShortcutDetails>,
+ );
return Object.values(unique);
}
@@ -431,15 +433,18 @@ export class WindowsSplitTunnelingAppListRetriever implements ISplitTunnelingApp
[[16], [1], [0, 1033]],
);
- const productName = await leafOffsets.reduce(async (alreadyFoundValue, leafOffset) => {
- const value = await alreadyFoundValue;
- if (value) {
- return value;
- } else {
- const strings = await this.getVsVersionInfoStrings(fileHandle, leafOffset);
- return strings.get('FileDescription') ?? strings.get('ProductName');
- }
- }, Promise.resolve() as Promise<string | undefined>);
+ const productName = await leafOffsets.reduce(
+ async (alreadyFoundValue, leafOffset) => {
+ const value = await alreadyFoundValue;
+ if (value) {
+ return value;
+ } else {
+ const strings = await this.getVsVersionInfoStrings(fileHandle, leafOffset);
+ return strings.get('FileDescription') ?? strings.get('ProductName');
+ }
+ },
+ Promise.resolve() as Promise<string | undefined>,
+ );
return productName;
} else {
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index e62d65358e..e0655707c2 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -554,9 +554,8 @@ export default class AppRenderer {
}
public setPreferredLocale = async (preferredLocale: string): Promise<void> => {
- const translations = await IpcRendererEventChannel.guiSettings.setPreferredLocale(
- preferredLocale,
- );
+ const translations =
+ await IpcRendererEventChannel.guiSettings.setPreferredLocale(preferredLocale);
// set current locale
this.setLocale(translations.locale);
diff --git a/gui/src/renderer/components/CustomDnsSettings.tsx b/gui/src/renderer/components/CustomDnsSettings.tsx
index 6b8024c9e2..35acb88a6c 100644
--- a/gui/src/renderer/components/CustomDnsSettings.tsx
+++ b/gui/src/renderer/components/CustomDnsSettings.tsx
@@ -325,10 +325,10 @@ function CellListItem(props: ICellListItemProps) {
const inputContainerRef = useStyledRef<HTMLDivElement>();
- const onRemove = useCallback(() => props.onRemove(props.children), [
- props.onRemove,
- props.children,
- ]);
+ const onRemove = useCallback(
+ () => props.onRemove(props.children),
+ [props.onRemove, props.children],
+ );
const onSubmit = useCallback(
async (value: string) => {
diff --git a/gui/src/renderer/components/EditApiAccessMethod.tsx b/gui/src/renderer/components/EditApiAccessMethod.tsx
index 2c53842543..97996d7f42 100644
--- a/gui/src/renderer/components/EditApiAccessMethod.tsx
+++ b/gui/src/renderer/components/EditApiAccessMethod.tsx
@@ -146,8 +146,8 @@ function TestingDialog(props: TestingDialogProps) {
const type = props.testing
? ModalAlertType.loading
: props.testResult
- ? ModalAlertType.success
- : ModalAlertType.failure;
+ ? ModalAlertType.success
+ : ModalAlertType.failure;
const prevType = useRef<ModalAlertType>(type);
const isOpen = props.testing || props.testResult !== undefined;
diff --git a/gui/src/renderer/components/ExpiredAccountErrorView.tsx b/gui/src/renderer/components/ExpiredAccountErrorView.tsx
index 3049ba8075..2784f64cd2 100644
--- a/gui/src/renderer/components/ExpiredAccountErrorView.tsx
+++ b/gui/src/renderer/components/ExpiredAccountErrorView.tsx
@@ -215,10 +215,8 @@ function ExternalPaymentButton() {
}
function BlockWhenDisconnectedAlert() {
- const {
- showBlockWhenDisconnectedAlert,
- setShowBlockWhenDisconnectedAlert,
- } = useExpiredAccountContext();
+ const { showBlockWhenDisconnectedAlert, setShowBlockWhenDisconnectedAlert } =
+ useExpiredAccountContext();
const { setBlockWhenDisconnected } = useAppContext();
const blockWhenDisconnected = useSelector((state) => state.settings.blockWhenDisconnected);
diff --git a/gui/src/renderer/components/HeaderBar.tsx b/gui/src/renderer/components/HeaderBar.tsx
index 98502a6346..d0f2bde6ef 100644
--- a/gui/src/renderer/components/HeaderBar.tsx
+++ b/gui/src/renderer/components/HeaderBar.tsx
@@ -121,8 +121,8 @@ function HeaderBarDeviceInfo() {
const formattedExpiry = isOutOfTime
? sprintf(messages.ngettext('1 day', '%d days', 0), 0)
: accountExpiry
- ? formatRemainingTime(accountExpiry)
- : '';
+ ? formatRemainingTime(accountExpiry)
+ : '';
return (
<StyledAccountInfo>
diff --git a/gui/src/renderer/components/NotificationArea.tsx b/gui/src/renderer/components/NotificationArea.tsx
index 79c234f71f..ebd87b58b7 100644
--- a/gui/src/renderer/components/NotificationArea.tsx
+++ b/gui/src/renderer/components/NotificationArea.tsx
@@ -208,9 +208,7 @@ function NotificationActionWrapper(props: INotificationActionWrapperProps) {
<ModalMessage>{troubleshootInfo?.details}</ModalMessage>
<ModalMessage>
<ModalMessageList>
- {troubleshootInfo?.steps.map((step) => (
- <li key={step}>{step}</li>
- ))}
+ {troubleshootInfo?.steps.map((step) => <li key={step}>{step}</li>)}
</ModalMessageList>
</ModalMessage>
<ModalMessage>
diff --git a/gui/src/renderer/components/Settings.tsx b/gui/src/renderer/components/Settings.tsx
index 34fb3eb0c1..211679a76c 100644
--- a/gui/src/renderer/components/Settings.tsx
+++ b/gui/src/renderer/components/Settings.tsx
@@ -166,10 +166,10 @@ function AppVersionButton() {
const isOffline = useSelector((state) => state.connection.isBlocked);
const { openUrl } = useAppContext();
- const openDownloadLink = useCallback(() => openUrl(getDownloadUrl(suggestedIsBeta)), [
- openUrl,
- suggestedIsBeta,
- ]);
+ const openDownloadLink = useCallback(
+ () => openUrl(getDownloadUrl(suggestedIsBeta)),
+ [openUrl, suggestedIsBeta],
+ );
let icon;
let footer;
diff --git a/gui/src/renderer/components/SettingsImport.tsx b/gui/src/renderer/components/SettingsImport.tsx
index 3f3cc5dd1f..d93064ff2e 100644
--- a/gui/src/renderer/components/SettingsImport.tsx
+++ b/gui/src/renderer/components/SettingsImport.tsx
@@ -55,9 +55,8 @@ export default function SettingsImport() {
showOpenDialog,
getPathBaseName,
} = useAppContext();
- const { clearSettingsImportForm, unsetSubmitSettingsImportForm } = useActions(
- settingsImportActions,
- );
+ const { clearSettingsImportForm, unsetSubmitSettingsImportForm } =
+ useActions(settingsImportActions);
// Status of the text form which is used to for example submit it.
const textForm = useSelector((state) => state.settingsImport);
diff --git a/gui/src/renderer/components/TransitionContainer.tsx b/gui/src/renderer/components/TransitionContainer.tsx
index 3e7007e3c8..1df9b097c5 100644
--- a/gui/src/renderer/components/TransitionContainer.tsx
+++ b/gui/src/renderer/components/TransitionContainer.tsx
@@ -98,8 +98,10 @@ export default class TransitionContainer extends React.Component<IProps, IState>
private isCycling = false;
private isTransitioning = false;
- private currentContentRef: React.MutableRefObject<HTMLDivElement | null> = React.createRef<HTMLDivElement>();
- private nextContentRef: React.MutableRefObject<HTMLDivElement | null> = React.createRef<HTMLDivElement>();
+ private currentContentRef: React.MutableRefObject<HTMLDivElement | null> =
+ React.createRef<HTMLDivElement>();
+ private nextContentRef: React.MutableRefObject<HTMLDivElement | null> =
+ React.createRef<HTMLDivElement>();
// The item that should trigger the cycle to finish in onTransitionEnd
private transitioningItemRef?: React.RefObject<HTMLDivElement>;
diff --git a/gui/src/renderer/components/VpnSettings.tsx b/gui/src/renderer/components/VpnSettings.tsx
index 395d1ba183..951b17a567 100644
--- a/gui/src/renderer/components/VpnSettings.tsx
+++ b/gui/src/renderer/components/VpnSettings.tsx
@@ -588,9 +588,8 @@ function LockdownMode() {
const blockWhenDisconnected = useSelector((state) => state.settings.blockWhenDisconnected);
const { setBlockWhenDisconnected: setBlockWhenDisconnectedImpl } = useAppContext();
- const [confirmationDialogVisible, showConfirmationDialog, hideConfirmationDialog] = useBoolean(
- false,
- );
+ const [confirmationDialogVisible, showConfirmationDialog, hideConfirmationDialog] =
+ useBoolean(false);
const setBlockWhenDisconnected = useCallback(
async (blockWhenDisconnected: boolean) => {
diff --git a/gui/src/renderer/components/cell/CellButton.tsx b/gui/src/renderer/components/cell/CellButton.tsx
index b0079226f3..cc7a6e1015 100644
--- a/gui/src/renderer/components/cell/CellButton.tsx
+++ b/gui/src/renderer/components/cell/CellButton.tsx
@@ -16,8 +16,8 @@ const StyledCellButton = styled(Row)<IStyledCellButtonProps>((props) => {
const backgroundColor = props.$selected
? colors.green
: props.$containedInSection
- ? colors.blue40
- : colors.blue;
+ ? colors.blue40
+ : colors.blue;
const backgroundColorHover = props.$selected ? colors.green : colors.blue80;
return {
diff --git a/gui/src/renderer/components/select-location/CustomLists.tsx b/gui/src/renderer/components/select-location/CustomLists.tsx
index ca4638360c..eafcb161b2 100644
--- a/gui/src/renderer/components/select-location/CustomLists.tsx
+++ b/gui/src/renderer/components/select-location/CustomLists.tsx
@@ -57,9 +57,10 @@ const StyledSideButtonIcon = styled(Cell.Icon)({
backgroundColor: colors.white40,
},
- [`${StyledCellButton}:not(:disabled):hover &&, ${StyledAddListCellButton}:not(:disabled):hover &&`]: {
- backgroundColor: colors.white,
- },
+ [`${StyledCellButton}:not(:disabled):hover &&, ${StyledAddListCellButton}:not(:disabled):hover &&`]:
+ {
+ backgroundColor: colors.white,
+ },
});
const StyledInput = styled(SimpleInput)<{ $error: boolean }>((props) => ({
diff --git a/gui/src/renderer/components/select-location/SelectLocation.tsx b/gui/src/renderer/components/select-location/SelectLocation.tsx
index 3f3535225e..f6cf772019 100644
--- a/gui/src/renderer/components/select-location/SelectLocation.tsx
+++ b/gui/src/renderer/components/select-location/SelectLocation.tsx
@@ -58,12 +58,8 @@ import {
export default function SelectLocation() {
const history = useHistory();
const relaySettingsUpdater = useRelaySettingsUpdater();
- const {
- saveScrollPosition,
- resetScrollPositions,
- scrollViewRef,
- spacePreAllocationViewRef,
- } = useScrollPositionContext();
+ const { saveScrollPosition, resetScrollPositions, scrollViewRef, spacePreAllocationViewRef } =
+ useScrollPositionContext();
const { locationType, setLocationType, setSearchTerm } = useSelectLocationContext();
const { expandSearchResults } = useRelayListContext();
diff --git a/gui/src/renderer/lib/3dmap.ts b/gui/src/renderer/lib/3dmap.ts
index f74efcf5df..ec4def0744 100644
--- a/gui/src/renderer/lib/3dmap.ts
+++ b/gui/src/renderer/lib/3dmap.ts
@@ -82,7 +82,10 @@ export interface Coordinate {
}
class Vector {
- public constructor(public x: number, public y: number) {}
+ public constructor(
+ public x: number,
+ public y: number,
+ ) {}
public static fromCoordinate(coordinate: Coordinate): Vector {
return new Vector(coordinate.latitude, coordinate.longitude);
@@ -138,7 +141,10 @@ class Globe {
private programInfo: ProgramInfo;
- public constructor(private gl: WebGL2RenderingContext, data: MapData) {
+ public constructor(
+ private gl: WebGL2RenderingContext,
+ data: MapData,
+ ) {
this.landVertexBuffer = initArrayBuffer(gl, data.landPositions);
this.oceanVertexBuffer = initArrayBuffer(gl, data.oceanPositions);
@@ -240,7 +246,10 @@ class LocationMarker {
private positionBuffer: WebGLBuffer;
private colorBuffer: WebGLBuffer;
- public constructor(private gl: WebGL2RenderingContext, color: ColorRgb) {
+ public constructor(
+ private gl: WebGL2RenderingContext,
+ color: ColorRgb,
+ ) {
const white: ColorRgb = [1.0, 1.0, 1.0];
const black: ColorRgb = [0.0, 0.0, 0.0];
const rings = [
diff --git a/gui/src/renderer/lib/ip.ts b/gui/src/renderer/lib/ip.ts
index 2f68b68d78..94eb807d49 100644
--- a/gui/src/renderer/lib/ip.ts
+++ b/gui/src/renderer/lib/ip.ts
@@ -23,7 +23,10 @@ export abstract class IpAddress<G extends number[]> {
// Abstract class representing an IP range or subnet
export abstract class IpRange<G extends number[]> {
- public constructor(public readonly groups: G, public readonly prefixSize: number) {}
+ public constructor(
+ public readonly groups: G,
+ public readonly prefixSize: number,
+ ) {}
// Returns whether or not this subnet includes the provided IP
protected includes<T extends IpAddress<G>>(ip: T, groupSize: number): boolean {
diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts
index ce0f3a8968..295db8f323 100644
--- a/gui/src/shared/daemon-rpc-types.ts
+++ b/gui/src/shared/daemon-rpc-types.ts
@@ -490,11 +490,10 @@ export type NewAccessMethodSetting<T extends AccessMethod = AccessMethod> = Name
enabled: boolean;
};
-export type AccessMethodSetting<
- T extends AccessMethod = AccessMethod
-> = NewAccessMethodSetting<T> & {
- id: string;
-};
+export type AccessMethodSetting<T extends AccessMethod = AccessMethod> =
+ NewAccessMethodSetting<T> & {
+ id: string;
+ };
export type ApiAccessMethodSettings = {
direct: AccessMethodSetting<DirectMethod>;
diff --git a/gui/src/shared/ipc-helpers.ts b/gui/src/shared/ipc-helpers.ts
index 0ff3ca2064..c49b7df9b8 100644
--- a/gui/src/shared/ipc-helpers.ts
+++ b/gui/src/shared/ipc-helpers.ts
@@ -39,7 +39,7 @@ type IpcMainFn<I extends AnyIpcCall> = I['direction'] extends 'main-to-renderer'
// Renames all receiving IPC calls, e.g. `callName` to `listenCallName`.
type IpcRendererKey<
N extends string,
- I extends AnyIpcCall
+ I extends AnyIpcCall,
> = I['direction'] extends 'main-to-renderer' ? `listen${Capitalize<N>}` : N;
// Selects either the send or receive function depending on direction.
diff --git a/gui/src/shared/notifications/block-when-disconnected.ts b/gui/src/shared/notifications/block-when-disconnected.ts
index c0b2f4e0f1..2f3df718b6 100644
--- a/gui/src/shared/notifications/block-when-disconnected.ts
+++ b/gui/src/shared/notifications/block-when-disconnected.ts
@@ -19,7 +19,8 @@ interface BlockWhenDisconnectedNotificationContext {
}
export class BlockWhenDisconnectedNotificationProvider
- implements InAppNotificationProvider, SystemNotificationProvider {
+ implements InAppNotificationProvider, SystemNotificationProvider
+{
public constructor(private context: BlockWhenDisconnectedNotificationContext) {}
public mayDisplay() {
diff --git a/gui/src/shared/notifications/close-to-account-expiry.ts b/gui/src/shared/notifications/close-to-account-expiry.ts
index 60feb7ec4d..4fde6ab395 100644
--- a/gui/src/shared/notifications/close-to-account-expiry.ts
+++ b/gui/src/shared/notifications/close-to-account-expiry.ts
@@ -18,7 +18,8 @@ interface CloseToAccountExpiryNotificationContext {
}
export class CloseToAccountExpiryNotificationProvider
- implements InAppNotificationProvider, SystemNotificationProvider {
+ implements InAppNotificationProvider, SystemNotificationProvider
+{
public constructor(private context: CloseToAccountExpiryNotificationContext) {}
public mayDisplay = () => closeToExpiry(this.context.accountExpiry);
diff --git a/gui/src/shared/notifications/connecting.ts b/gui/src/shared/notifications/connecting.ts
index 214e015e10..444dd42beb 100644
--- a/gui/src/shared/notifications/connecting.ts
+++ b/gui/src/shared/notifications/connecting.ts
@@ -17,7 +17,8 @@ interface ConnectingNotificationContext {
}
export class ConnectingNotificationProvider
- implements SystemNotificationProvider, InAppNotificationProvider {
+ implements SystemNotificationProvider, InAppNotificationProvider
+{
public constructor(private context: ConnectingNotificationContext) {}
public mayDisplay() {
diff --git a/gui/src/shared/notifications/error.ts b/gui/src/shared/notifications/error.ts
index 387ed146a9..dae080bb29 100644
--- a/gui/src/shared/notifications/error.ts
+++ b/gui/src/shared/notifications/error.ts
@@ -26,7 +26,8 @@ interface ErrorNotificationContext {
}
export class ErrorNotificationProvider
- implements SystemNotificationProvider, InAppNotificationProvider {
+ implements SystemNotificationProvider, InAppNotificationProvider
+{
public constructor(private context: ErrorNotificationContext) {}
public mayDisplay = () => this.context.tunnelState.state === 'error';
diff --git a/gui/src/shared/notifications/inconsistent-version.ts b/gui/src/shared/notifications/inconsistent-version.ts
index f4a5616c43..e4f7a8ddc1 100644
--- a/gui/src/shared/notifications/inconsistent-version.ts
+++ b/gui/src/shared/notifications/inconsistent-version.ts
@@ -13,7 +13,8 @@ interface InconsistentVersionNotificationContext {
}
export class InconsistentVersionNotificationProvider
- implements SystemNotificationProvider, InAppNotificationProvider {
+ implements SystemNotificationProvider, InAppNotificationProvider
+{
public constructor(private context: InconsistentVersionNotificationContext) {}
public mayDisplay = () => !this.context.consistent;
diff --git a/gui/src/shared/notifications/reconnecting.ts b/gui/src/shared/notifications/reconnecting.ts
index 43491322f0..4362c0edb6 100644
--- a/gui/src/shared/notifications/reconnecting.ts
+++ b/gui/src/shared/notifications/reconnecting.ts
@@ -10,7 +10,8 @@ import {
} from './notification';
export class ReconnectingNotificationProvider
- implements SystemNotificationProvider, InAppNotificationProvider {
+ implements SystemNotificationProvider, InAppNotificationProvider
+{
public constructor(private context: TunnelState) {}
public mayDisplay() {
diff --git a/gui/src/shared/notifications/unsupported-version.ts b/gui/src/shared/notifications/unsupported-version.ts
index 9d41bc268c..15c622703c 100644
--- a/gui/src/shared/notifications/unsupported-version.ts
+++ b/gui/src/shared/notifications/unsupported-version.ts
@@ -17,7 +17,8 @@ interface UnsupportedVersionNotificationContext {
}
export class UnsupportedVersionNotificationProvider
- implements SystemNotificationProvider, InAppNotificationProvider {
+ implements SystemNotificationProvider, InAppNotificationProvider
+{
public constructor(private context: UnsupportedVersionNotificationContext) {}
public mayDisplay() {
diff --git a/gui/src/shared/notifications/update-available.ts b/gui/src/shared/notifications/update-available.ts
index 6f63bafd89..732e7bb9a8 100644
--- a/gui/src/shared/notifications/update-available.ts
+++ b/gui/src/shared/notifications/update-available.ts
@@ -17,7 +17,8 @@ interface UpdateAvailableNotificationContext {
}
export class UpdateAvailableNotificationProvider
- implements InAppNotificationProvider, SystemNotificationProvider {
+ implements InAppNotificationProvider, SystemNotificationProvider
+{
public constructor(private context: UpdateAvailableNotificationContext) {}
public mayDisplay() {