web/satellite: fix indentation for TS logic

Added new eslint rule to fix indentation for typescript logic.

Change-Id: I08ad94411c579ac6c4687217a29c3b7dc61b0d76
This commit is contained in:
Vitalii 2023-12-05 16:22:37 +02:00 committed by Storj Robot
parent 61a9d63d76
commit 5094100e21
27 changed files with 75 additions and 74 deletions

View File

@ -29,6 +29,7 @@ module.exports = {
'no-tabs': 'warn',
'indent': ['warn', 4],
'vue/html-indent': ['warn', 4],
'@typescript-eslint/indent': ['warn', 4, {"SwitchCase": 0}],
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-empty-function': 'off',

View File

@ -36,7 +36,7 @@ const props = withDefaults(defineProps<{
});
const emit = defineEmits<{
(e: 'pmCreated', pmID: string): void
(e: 'pmCreated', pmID: string): void
}>();
/**

View File

@ -149,8 +149,8 @@ const notify = useNotify();
const router = useRouter();
const props = defineProps<{
path: string,
file: BrowserObject,
path: string,
file: BrowserObject,
}>();
const emit = defineEmits(['onUpdate']);

View File

@ -98,8 +98,8 @@ import PaginationRightIcon from '@/../static/images/common/tablePaginationArrowR
// Represents each type of item in the pagination component.
interface PaginationControlItem {
index?: number;
type: 'page' | 'prev' | 'next' | 'next_3' | 'prev_3';
index?: number;
type: 'page' | 'prev' | 'next' | 'next_3' | 'prev_3';
}
const { withLoading } = useLoading();

View File

@ -38,13 +38,13 @@ import ArrowDownIcon from '@/../static/images/common/dropIcon.svg';
const appStore = useAppStore();
const props = defineProps<{
selected: number | null;
itemCount?: number;
simplePagination?: boolean;
selected: number | null;
itemCount?: number;
simplePagination?: boolean;
}>();
const emit = defineEmits<{
(e: 'change', size: number): void
(e: 'change', size: number): void
}>();
const options = computed((): {label:string, value:number}[] => {

View File

@ -76,7 +76,7 @@ import VModal from '@/components/common/VModal.vue';
import ConfirmMFAInput from '@/components/account/mfa/ConfirmMFAInput.vue';
interface ClearInput {
clearInput(): void;
clearInput(): void;
}
const usersStore = useUsersStore();

View File

@ -36,7 +36,7 @@ export type BrowserObject = {
type?: 'file' | 'folder';
progress?: number;
upload?: {
abort: () => void;
abort: () => void;
};
path?: string;
};
@ -105,7 +105,7 @@ export class FilesState {
}
type InitializedFilesState = FilesState & {
s3: S3Client;
s3: S3Client;
};
function assertIsInitialized(

View File

@ -14,7 +14,7 @@ export type JSONObject = string | number | boolean | null | JSONObject[] | {
*/
export type JSONRepresentable<T> =
T extends undefined ? never :
T extends JSONObject ? T :
Pick<T, {
[P in keyof T]: T[P] extends JSONObject ? P : never;
}[keyof T]>;
T extends JSONObject ? T :
Pick<T, {
[P in keyof T]: T[P] extends JSONObject ? P : never;
}[keyof T]>;

View File

@ -2,8 +2,8 @@
// See LICENSE for copying information.
export enum ManageProjectPassphraseStep {
ManageOptions = 'ManageOptions',
Create = 'Create',
Switch = 'Switch',
Clear = 'Clear',
ManageOptions = 'ManageOptions',
Create = 'Create',
Switch = 'Switch',
Clear = 'Clear',
}

View File

@ -628,8 +628,8 @@ export enum CouponDuration {
*/
export class Wallet {
public constructor(
public address: string = '',
public balance: TokenAmount = new TokenAmount(),
public address: string = '',
public balance: TokenAmount = new TokenAmount(),
) { }
}

View File

@ -77,7 +77,7 @@ const configStore = useConfigStore();
const isLowBalance = useLowTokenBalance();
const props = defineProps<{
parentRef: HTMLElement;
parentRef: HTMLElement;
}>();
/**

View File

@ -41,7 +41,7 @@ import VTable from '@/components/common/VTable.vue';
const projectsStore = useProjectsStore();
const props = withDefaults(defineProps<{
invites?: ProjectInvitation[],
invites?: ProjectInvitation[],
}>(), {
invites: () => [],
});

View File

@ -58,7 +58,7 @@ import StripeCardElement from '@/components/account/billing/paymentMethods/Strip
import StripeCardInput from '@/components/account/billing/paymentMethods/StripeCardInput.vue';
interface StripeForm {
onSubmit(): Promise<void>;
onSubmit(): Promise<void>;
}
const configStore = useConfigStore();

View File

@ -68,15 +68,15 @@ import { EXTENSION_PREVIEW_TYPES, PreviewType } from '@/types/browser';
import BrowserRowActions from '@poc/components/BrowserRowActions.vue';
type BrowserObjectTypeInfo = {
title: string;
icon: string;
title: string;
icon: string;
};
type BrowserObjectWrapper = {
browserObject: BrowserObject;
typeInfo: BrowserObjectTypeInfo;
lowerName: string;
ext: string;
browserObject: BrowserObject;
typeInfo: BrowserObjectTypeInfo;
lowerName: string;
ext: string;
};
const analyticsStore = useAnalyticsStore();
@ -92,9 +92,9 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
previewClick: [BrowserObject];
deleteFileClick: [BrowserObject];
shareClick: [BrowserObject];
previewClick: [BrowserObject];
deleteFileClick: [BrowserObject];
shareClick: [BrowserObject];
}>();
/**

View File

@ -24,6 +24,6 @@ import {
import UsageAndChargesItemComponent from '@poc/components/billing/UsageAndChargesItemComponent.vue';
const props = defineProps<{
projectIds: string[],
projectIds: string[],
}>();
</script>

View File

@ -123,11 +123,11 @@ const notify = useNotify();
const { isLoading, withLoading } = useLoading();
const props = defineProps<{
modelValue: boolean,
modelValue: boolean,
}>();
const emit = defineEmits<{
'update:modelValue': [value: boolean];
'update:modelValue': [value: boolean];
}>();
const model = computed<boolean>({

View File

@ -36,13 +36,13 @@ import { VAlert, VContainer, VDialog } from 'vuetify/components';
import { computed } from 'vue';
const props = defineProps<{
modelValue: boolean,
bucket: string,
modelValue: boolean,
bucket: string,
}>();
const emit = defineEmits<{
(event: 'update:modelValue', value: boolean): void,
(event: 'fileDrop', value: Event): void,
(event: 'update:modelValue', value: boolean): void,
(event: 'fileDrop', value: Event): void,
}>();
const model = computed<boolean>({

View File

@ -125,12 +125,12 @@ const innerContent = ref<Component | null>(null);
const formValid = ref<boolean>(false);
const props = defineProps<{
modelValue: boolean,
modelValue: boolean,
}>();
const emit = defineEmits<{
(event: 'update:modelValue', value: boolean): void,
(event: 'passphraseEntered'): void,
(event: 'update:modelValue', value: boolean): void,
(event: 'passphraseEntered'): void,
}>();
const model = computed<boolean>({

View File

@ -109,7 +109,7 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
'update:modelValue': [value: boolean];
'update:modelValue': [value: boolean];
}>();
const model = computed<boolean>({

View File

@ -72,8 +72,8 @@ const isLoading = ref<boolean>(false);
const previewAndMapFailed = ref<boolean>(false);
const props = defineProps<{
file: BrowserObject,
active: boolean, // whether this item is visible
file: BrowserObject,
active: boolean, // whether this item is visible
}>();
const emit = defineEmits<{

View File

@ -23,7 +23,7 @@ import prettyBytes from 'pretty-bytes';
import { BrowserObject } from '@/store/modules/objectBrowserStore';
const props = defineProps<{
file: BrowserObject,
file: BrowserObject,
}>();
const emits = defineEmits<{

View File

@ -85,8 +85,8 @@ const router = useRouter();
const route = useRoute();
const emit = defineEmits<{
success: [];
back: [];
success: [];
back: [];
}>();
const loading = ref<boolean>(false);

View File

@ -111,7 +111,7 @@ const intervalID = ref<NodeJS.Timer>();
const viewState = ref<ViewState>(ViewState.Default);
const emit = defineEmits<{
back: [];
back: [];
}>();
/**

View File

@ -47,10 +47,10 @@ import { useConfigStore } from '@/store/modules/configStore';
const configStore = useConfigStore();
const props = defineProps<{
isDefault: boolean
isPending: boolean
isSuccess: boolean
pendingPayments: PaymentWithConfirmations[]
isDefault: boolean
isPending: boolean
isSuccess: boolean
pendingPayments: PaymentWithConfirmations[]
}>();
/**

View File

@ -38,7 +38,7 @@ const notify = useNotify();
const { smAndDown } = useDisplay();
const emit = defineEmits<{
select: [PricingPlanInfo];
select: [PricingPlanInfo];
}>();
const isLoading = ref<boolean>(true);

View File

@ -79,19 +79,19 @@ import { computed, ref } from 'vue';
import { RequiredRule } from '@poc/types/common';
const props = defineProps<{
modelValue: boolean;
loading: boolean;
error: boolean;
recovery: string;
otp: string;
modelValue: boolean;
loading: boolean;
error: boolean;
recovery: string;
otp: string;
}>();
const emit = defineEmits<{
'update:modelValue': [value: boolean];
'update:error': [value: boolean];
'update:recovery': [value: string];
'update:otp': [value: string];
verify: [];
'update:modelValue': [value: boolean];
'update:error': [value: boolean];
'update:recovery': [value: string];
'update:otp': [value: string];
verify: [];
}>();
const formValid = ref(false);

View File

@ -219,14 +219,14 @@ import { useNotify } from '@/utils/hooks';
import SignupConfirmation from '@poc/views/SignupConfirmation.vue';
type ViewConfig = {
title: string;
partnerUrl: string;
partnerLogoTopUrl: string;
partnerLogoBottomUrl: string;
description: string;
customHtmlDescription: string;
signupButtonLabel: string;
tooltip: string;
title: string;
partnerUrl: string;
partnerLogoTopUrl: string;
partnerLogoBottomUrl: string;
description: string;
customHtmlDescription: string;
signupButtonLabel: string;
tooltip: string;
}
const auth = new AuthHttpApi();