Skip to content

Commit

Permalink
fix(explorer): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Swepool committed Aug 26, 2024
1 parent baf62a5 commit 7c40465
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/components/ProposalProcess.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { useFormatter } from '@/stores';
import type { Tally } from '@/types';
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import type { PropType } from 'vue';
const props = defineProps({
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/PriceMarketChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import ApexCharts from 'vue3-apexcharts';
import { getMarketPriceChartConfig } from './apexChartConfig';
import { useIndexModule } from '@/modules/[chain]/indexStore';
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import { useBaseStore } from '@/stores';
const store = useIndexModule();
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/TxsInBlocksChart.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import ApexCharts from 'vue3-apexcharts';
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import { useBaseStore } from '@/stores';
const baseStore = useBaseStore();
Expand Down
2 changes: 1 addition & 1 deletion src/components/dynamic/ArrayElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ArrayCoinElement from './ArrayCoinElement.vue';
import ArrayStringElement from './ArrayStringElement.vue'
const props = defineProps({
value: { type: Array<Object> },
value: { type: Array<object> },
});
function selectByElement() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/dynamic/ArrayObjectElement.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import DynamicComponent from './DynamicComponent.vue';
const props = defineProps({
Expand Down
2 changes: 1 addition & 1 deletion src/components/dynamic/TxsElement.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { fromBase64, toBase64 } from '@cosmjs/encoding';
import { decodeTxRaw } from '@cosmjs/proto-signing';
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import { hashTx } from '@/libs';
import { useBlockchain, useFormatter } from '@/stores';
const props = defineProps({
Expand Down
2 changes: 1 addition & 1 deletion src/components/dynamic/UInt8Array.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { toBase64, toHex } from '@cosmjs/encoding';
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import { ref } from 'vue';
const props = defineProps(['value']);
Expand Down
2 changes: 1 addition & 1 deletion src/components/dynamic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function select(v: any, direct?: string) {
// }
}

function selectObject(v: Object, direct?: string) {
function selectObject(v: object, direct?: string) {
switch (true) {
case v instanceof Long:
return NumberElement;
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/components/DefaultLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ blockchain.$subscribe((m, s) => {
const sidebarShow = ref(false);
const sidebarOpen = ref(true);
const changeOpen = (index: Number) => {
const changeOpen = (index: number) => {
if (index === 0) {
sidebarOpen.value = !sidebarOpen.value;
}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function formatTokenAmount(
: tokenDenom?.denom_trace?.base_denom;
let amount = 0;
const asset = assets.find((a: any) => a.base === denom);
let exp = asset
const exp = asset
? asset.exponent
: String(denom).startsWith('gravity')
? 18
Expand Down Expand Up @@ -177,7 +177,7 @@ export function rgbToHsl(color: string) {
h = 0;
s = 0;
} else {
var d = max - min;
const d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r:
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/account/[address].vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@/stores';
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
import DonutChart from '@/components/charts/DonutChart.vue';
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import { onMounted } from 'vue';
import { Icon } from '@iconify/vue';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/account/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import { useBaseStore, useBlockchain, useFormatter } from '@/stores';
import { PageRequest, type AuthAccount, type Pagination } from '@/types';
import { onMounted } from 'vue';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/block/[height].vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { onMounted, ref, watchEffect } from 'vue';
import { Icon } from '@iconify/vue';
import TxsElement from '@/components/dynamic/TxsElement.vue';
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import { onBeforeRouteUpdate } from 'vue-router';
import { useBaseStore, useFormatter } from '@/stores';
import type { Block } from '@/types';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/block/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import { useBaseStore, useFormatter } from '@/stores';
import TxsInBlocksChart from '@/components/charts/TxsInBlocksChart.vue';
Expand Down
6 changes: 3 additions & 3 deletions src/modules/[chain]/consensus/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ async function update() {
.then((res) => {
roundState.value = res.result.round_state;
const raw = roundState?.value?.['height/round/step']?.split('/');
// eslint-disable-next-line prefer-destructuring
height.value = raw[0];
// eslint-disable-next-line prefer-destructuring
round.value = raw[1];
// eslint-disable-next-line prefer-destructuring
step.value = raw[2];
// find the highest onboard rate
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/gov/[proposal_id].vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import MdEditor from 'md-editor-v3';
import ObjectElement from '@/components/dynamic/ObjectElement.vue';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '@/stores';
import { onMounted, ref } from 'vue';
import { useIndexModule, colorMap } from './indexStore';
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import CardStatisticsVertical from '@/components/CardStatisticsVertical.vue';
import ProposalListItem from '@/components/ProposalListItem.vue';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/staking/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useStakingStore,
useTxDialog,
} from '@/stores';
import { computed } from '@vue/reactivity';
import { computed } from 'vue';
import { onMounted, ref } from 'vue';
import { Icon } from '@iconify/vue';
import type { Key, SlashingParam, Validator } from '@/types';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/supply/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import { useBaseStore, useBlockchain, useFormatter } from '@/stores';
import { PageRequest, type AuthAccount, type Pagination, type Coin } from '@/types';
import { onMounted } from 'vue';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/tx/[hash].vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { useBaseStore, useBlockchain, useFormatter } from '@/stores';
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import type { Tx, TxResponse } from '@/types';
import { JsonViewer } from "vue3-json-viewer"
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/tx/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, ref } from '@vue/reactivity';
import { computed, ref } from 'vue';
import { useBaseStore, useBlockchain, useFormatter } from '@/stores';
import type { PaginatedTxs } from '@/types';
import { useRouter } from 'vue-router';
Expand Down
2 changes: 1 addition & 1 deletion src/stores/useFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const useFormatter = defineStore('formatter', {
) {
if (token && token.amount && token?.denom) {
let amount = Number(token.amount);
let denom = token.denom;
const denom = token.denom;

let conf = mode === 'local'? this.blockchain.current?.assets?.find(
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion vue3-json-viewer.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
declare module 'vue3-json-viewer' {
import { AllowedComponentProps, App, Component, ComponentCustomProps, VNodeProps } from 'vue'
interface JsonViewerProps {
value: Object | Array<any> | string | number | boolean; //对象
value: object | Array<any> | string | number | boolean; //对象
expanded: boolean; //是否自动展开
expandDepth: number; //展开层级
copyable: boolean | object; //是否可复制
Expand Down

0 comments on commit 7c40465

Please sign in to comment.