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:
parent
61a9d63d76
commit
5094100e21
@ -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',
|
||||
|
@ -36,7 +36,7 @@ const props = withDefaults(defineProps<{
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'pmCreated', pmID: string): void
|
||||
(e: 'pmCreated', pmID: string): void
|
||||
}>();
|
||||
|
||||
/**
|
||||
|
@ -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']);
|
||||
|
@ -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();
|
||||
|
@ -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}[] => {
|
||||
|
@ -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();
|
||||
|
@ -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(
|
||||
|
@ -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]>;
|
||||
|
@ -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',
|
||||
}
|
||||
|
@ -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(),
|
||||
) { }
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ const configStore = useConfigStore();
|
||||
const isLowBalance = useLowTokenBalance();
|
||||
|
||||
const props = defineProps<{
|
||||
parentRef: HTMLElement;
|
||||
parentRef: HTMLElement;
|
||||
}>();
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ import VTable from '@/components/common/VTable.vue';
|
||||
const projectsStore = useProjectsStore();
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
invites?: ProjectInvitation[],
|
||||
invites?: ProjectInvitation[],
|
||||
}>(), {
|
||||
invites: () => [],
|
||||
});
|
||||
|
@ -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();
|
||||
|
@ -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];
|
||||
}>();
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,6 @@ import {
|
||||
import UsageAndChargesItemComponent from '@poc/components/billing/UsageAndChargesItemComponent.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
projectIds: string[],
|
||||
projectIds: string[],
|
||||
}>();
|
||||
</script>
|
@ -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>({
|
||||
|
@ -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>({
|
||||
|
@ -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>({
|
||||
|
@ -109,7 +109,7 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [value: boolean];
|
||||
'update:modelValue': [value: boolean];
|
||||
}>();
|
||||
|
||||
const model = computed<boolean>({
|
||||
|
@ -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<{
|
||||
|
@ -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<{
|
||||
|
@ -85,8 +85,8 @@ const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const emit = defineEmits<{
|
||||
success: [];
|
||||
back: [];
|
||||
success: [];
|
||||
back: [];
|
||||
}>();
|
||||
|
||||
const loading = ref<boolean>(false);
|
||||
|
@ -111,7 +111,7 @@ const intervalID = ref<NodeJS.Timer>();
|
||||
const viewState = ref<ViewState>(ViewState.Default);
|
||||
|
||||
const emit = defineEmits<{
|
||||
back: [];
|
||||
back: [];
|
||||
}>();
|
||||
|
||||
/**
|
||||
|
@ -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[]
|
||||
}>();
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ const notify = useNotify();
|
||||
const { smAndDown } = useDisplay();
|
||||
|
||||
const emit = defineEmits<{
|
||||
select: [PricingPlanInfo];
|
||||
select: [PricingPlanInfo];
|
||||
}>();
|
||||
|
||||
const isLoading = ref<boolean>(true);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user