Skip to content

Commit

Permalink
feat: update eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Dec 18, 2024
1 parent f2f0389 commit 81530cc
Show file tree
Hide file tree
Showing 26 changed files with 866 additions and 1,973 deletions.
14 changes: 0 additions & 14 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion components/AnimatedArrow.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div ref="arrow">
<ArrowRightIcon class="arrow ml-md h-[14px]"></ArrowRightIcon>
<ArrowRightIcon class="arrow ml-md h-[14px]" />
</div>
</template>

Expand Down
60 changes: 60 additions & 0 deletions components/DownloadNodeBtn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<template>
<client-only>
<WButton :type="ButtonType.dark" class="mb-md">
<a :href="primaryActionUrl" target="_blank">
<i18n-t :keypath="primaryActionLocalePath" tag="p" scope="global">
<span v-if="release" class="ml-[4px]">{{ release.platform }}</span>
</i18n-t>
</a>
</WButton>
<p v-if="release" class="text text-wit-blue-500">
{{ release.platform }} • x86_64 • {{ size }} MB
</p>
</client-only>
</template>

<script setup lang="ts">
import {
getLatestRelease,
type LatestReleaseResponse,
} from '@/utils/getLatestRelease'
import { ButtonType, WButton } from 'wit-vue-ui'
import { getBrowserOs } from '@/utils/getBrowserOs'
import { URL_RELEASE_BASE } from '@/constants'
import { computed, type Ref } from 'vue'
const primaryActionLocalePath = computed(() => {
return release.value
? 'coin.run_in_platform.main-alt'
: 'coin.run_in_platform.main-mobile'
})
const size = computed(() => {
const size: number | null | undefined = release.value?.size
return size ? (size / 1024 / 1024).toFixed(1) : ''
})
const primaryActionUrl = computed(() => {
return release.value
? release.value.releaseUrl
: 'https://docs.witnet.io/node-operators/docker-quick-start-guide'
})
const { data }: { data: Ref<LatestReleaseResponse | undefined> } =
await useFetch(URL_RELEASE_BASE)
const os = computed(() => getBrowserOs(navigator))
const downloadRelease = computed(() =>
os.value ? getLatestRelease({ os: os.value, data: data.value }) : null,
)
const release = computed(() => downloadRelease.value)
</script>

<style lang="scss">
.link {
width: max-content;
height: auto;
display: flex;
}
</style>
184 changes: 0 additions & 184 deletions components/LanguageSwitcher.vue

This file was deleted.

12 changes: 2 additions & 10 deletions components/MailchimpEmbed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,8 @@
/>
</div>
<div id="mce-responses" class="clear">
<div
id="mce-error-response"
class="response"
style="display: none"
></div>
<div
id="mce-success-response"
class="response"
style="display: none"
></div>
<div id="mce-error-response" class="response" style="display: none" />
<div id="mce-success-response" class="response" style="display: none" />
</div>
<div style="position: absolute; left: -5000px" aria-hidden="true">
<input

Check warning on line 38 in components/MailchimpEmbed.vue

View workflow job for this annotation

GitHub Actions / cache-and-install

Disallow self-closing on HTML void elements (<input/>)
Expand Down
2 changes: 1 addition & 1 deletion components/RotateOnScroll.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div ref="blueStar" class="h-max w-auto">
<slot></slot>
<slot />
</div>
</template>

Expand Down
5 changes: 3 additions & 2 deletions components/sections/BuySection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@

<script setup lang="ts">
import { WIconText, WIcon, IconName, IconTextPosition } from 'wit-vue-ui'
import { URLS } from '../../constants.js'
import { URLS } from '@/constants.js'
import type { Exchange } from '@/types.js'
const { t } = useI18n()
const exchanges: Array<any> = [
const exchanges: Array<Exchange> = [
{
name: t('buy-section.exchanges.gate'),
logo: IconName.Gate,
Expand Down
48 changes: 2 additions & 46 deletions components/sections/CoinSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<span class="text-wit-blue-500">{{ $t('coin.title.mark') }}</span>
</i18n-t>

<p class="mx-xl line transform md:rotate-90 sm:rotate-90"></p>
<p class="mx-xl line transform md:rotate-90 sm:rotate-90" />
<div class="max-w-md md:text-center">
<i18n-t
keypath="coin.description1"
Expand All @@ -43,20 +43,7 @@
<p class="text text-white-50">{{ $t('coin.description3') }}</p>
</div>
</div>
<client-only>
<WButton :type="ButtonType.dark" class="mb-md">
<a :href="primaryActionUrl" target="_blank">
<i18n-t :keypath="primaryActionLocalePath" tag="p" scope="global">
<span v-if="isDesktop" class="ml-[4px]">{{
release.platform
}}</span>
</i18n-t>
</a>
</WButton>
</client-only>
<p v-if="isDesktop" class="text text-wit-blue-500">
{{ release.platform }} • x86_64 • {{ size }} MB
</p>
<DownloadNodeBtn />

<p
class="text-large text-white-50 text-center section-description-max-w mb-xl"
Expand Down Expand Up @@ -159,10 +146,8 @@
</template>

<script setup lang="ts">
import { WButton } from 'wit-vue-ui'
// TODO: uncomment when wit/2 is live
// import { WButton, WCard, CardType } from 'wit-vue-ui'
import { getLatestRelease } from '../../utils/getLatestRelease'
import DockerIcon from '@/assets/svg/docker.svg?component'
import WindowsIcon from '@/assets/svg/windows.svg?component'
import AppleIcon from '@/assets/svg/apple.svg?component'
Expand All @@ -171,37 +156,8 @@ import RaspberryIcon from '@/assets/svg/raspberry.svg?component'
import BlueStarIcon from '@/assets/svg/blue-horizontal-star.svg?component'
import { URLS } from '@/constants'
import { ButtonType } from '~/types'
const { t } = useI18n()
const { isDesktop } = useDevice()
const release = ref({
platform: '',
releaseUrl: '',
size: 0,
})
const size = computed(() => {
return (release.value.size / 1024 / 1024).toFixed(1)
})
const primaryActionUrl = computed(() => {
return isDesktop
? release.value.releaseUrl
: 'https://docs.witnet.io/node-operators/docker-quick-start-guide'
})
const primaryActionLocalePath = computed(() => {
return isDesktop
? 'coin.run_in_platform.main-alt'
: 'coin.run_in_platform.main-mobile'
})
onMounted(async () => {
if (import.meta.client) {
const latestRelease = await getLatestRelease(window.navigator)
release.value = latestRelease
}
})
// const { t } = useI18n()
// TODO uncomment when wit/2 is live
Expand Down
Loading

0 comments on commit 81530cc

Please sign in to comment.