Skip to content

Commit

Permalink
chore: run eslint auto-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Souma-Sumire committed Nov 17, 2024
1 parent 9824081 commit bd2b4fa
Show file tree
Hide file tree
Showing 38 changed files with 189 additions and 160 deletions.
35 changes: 33 additions & 2 deletions .eslintrc-auto-import.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,37 @@
"watchThrottled": true,
"watchTriggerable": true,
"watchWithFilter": true,
"whenever": true
"whenever": true,
"Component": true,
"ComponentPublicInstance": true,
"ComputedRef": true,
"DirectiveBinding": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,
"InjectionKey": true,
"MaybeRef": true,
"MaybeRefOrGetter": true,
"PropType": true,
"Ref": true,
"VNode": true,
"WritableComputedRef": true,
"createReusableTemplate": true,
"createTemplatePromise": true,
"injectLocal": true,
"onWatcherCleanup": true,
"provideLocal": true,
"toValue": true,
"useAnimate": true,
"useArrayDifference": true,
"useArrayIncludes": true,
"useClipboardItems": true,
"useId": true,
"useModel": true,
"useParentElement": true,
"usePerformanceObserver": true,
"useTemplateRef": true,
"watchDeep": true,
"watchImmediate": true
}
}
}
8 changes: 4 additions & 4 deletions src/components/DragJob.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup lang="ts">
import type { Player } from '@/types/partyPlayer'
import type { RemovableRef } from '@vueuse/core'
import { ref } from 'vue'
import { type UseDraggableReturn, VueDraggable } from 'vue-draggable-plus'
import type { Role } from '../../cactbot/types/job'
import Util from '@/utils/util'
import type { Player } from '@/types/partyPlayer'
import { ref } from 'vue'
import { type UseDraggableReturn, VueDraggable } from 'vue-draggable-plus'
const props = withDefaults(defineProps<Props>(), {})
const emit = defineEmits<(e: 'updateSortArr', id: number[]) => void>()
Expand Down Expand Up @@ -110,7 +110,7 @@ function onUpdate() {
<VueDraggable
v-for="(role, index) in roles" :key="index" ref="el" v-model="jobList[role.role]"
:disabled="!isDisabled" animation="150" ghost-class="ghost"
class="m-b-0.25 m-t-0.25 flex flex-row gap-0.25 rounded p-0" filter=".no-draggable" :force-fallback="true"
class="p-0 m-b-0.25 m-t-0.25 flex flex-row gap-0.25 rounded" filter=".no-draggable" :force-fallback="true"
@update="onUpdate"
>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/keigennRecord2/StatusShow.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { useKeigennRecord2Store } from '@/store/keigennRecord2'
import type { PerformanceType, RowVO } from '@/types/keigennRecord2'
import { useKeigennRecord2Store } from '@/store/keigennRecord2'
import { translationFlags } from '@/utils/flags'
import { multiplierEffect } from '@/utils/keigenn'
import { getImgSrc, handleImgError } from '@/utils/xivapi'
Expand Down
2 changes: 1 addition & 1 deletion src/components/keigennRecord2/Target.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { useKeigennRecord2Store } from '@/store/keigennRecord2'
import type { RowVO } from '@/types/keigennRecord2'
import { useKeigennRecord2Store } from '@/store/keigennRecord2'
import { getImgSrc, handleImgError } from '@/utils/xivapi'
const props = defineProps({
Expand Down
16 changes: 8 additions & 8 deletions src/components/timeline/FflogsImport.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<script lang="ts" setup>
import axios from 'axios'
import Swal from 'sweetalert2'
import '@sweetalert2/theme-bootstrap-4/bootstrap-4.scss'
import type { Job } from 'cactbot/types/job'
import { factory } from '@/utils/timelineSpecialRules'
import type {
FFlogsApiV1ReportEvents,
FFlogsQuery,
FFlogsStance,
FFlogsType,
Friendlies,
} from '@/types/fflogs'
import Util from '@/utils/util'
import { getActionChinese } from '@/resources/actionChinese'
import type { ITimelineCondition } from '@/types/timeline'
import type { Job } from 'cactbot/types/job'
import { getActionChinese } from '@/resources/actionChinese'
import { useTimelineStore } from '@/store/timeline'
import { factory } from '@/utils/timelineSpecialRules'
import Util from '@/utils/util'
import { getImgSrc, handleImgError } from '@/utils/xivapi'
import axios from 'axios'
import Swal from 'sweetalert2'
import '@sweetalert2/theme-bootstrap-4/bootstrap-4.scss'
const props = defineProps<{
filters: Record<string, number[]>
Expand Down Expand Up @@ -285,7 +285,7 @@ function handeleFFlogsQueryResultFriendiesListFilter() {
.filter((event) => {
return (
(event.sourceIsFriendly
&& fflogsQueryConfig.abilityFilterSelected.includes(event.actionId))
&& fflogsQueryConfig.abilityFilterSelected.includes(event.actionId))
|| !event.sourceIsFriendly
)
})
Expand Down
4 changes: 2 additions & 2 deletions src/components/zoneMacro/MarksDiv.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import { useMacroStore } from '@/store/macro'
import type { WayMarkInfo, WayMarkKeys } from '@/types/PostNamazu'
import type { MacroInfoPlace } from '@/types/macro'
import type { WayMarkInfo, WayMarkKeys } from '@/types/PostNamazu'
import { syncMap } from '@/resources/macro'
import { useMacroStore } from '@/store/macro'
const props = defineProps({
macro: { type: Object as () => MacroInfoPlace, required: true },
Expand Down
14 changes: 7 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { createHead } from '@vueuse/head'
import { createPinia } from 'pinia'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import VxeUI from 'vxe-pc-ui'
import 'vxe-pc-ui/lib/style.css'
import VueLazyload from 'vue-lazyload'
import { createI18n } from 'vue-i18n'
import VueLazyload from 'vue-lazyload'
import VxeUI from 'vxe-pc-ui'
import VXETable from 'vxe-table'
import App from './App.vue'
import en from './locales/en.json'
import zhCn from './locales/zhCn.json'
import ja from './locales/ja.json'
import App from './App.vue'
import zhCn from './locales/zhCn.json'
import router from './router'
import 'vxe-table/lib/style.css'
import 'vxe-pc-ui/lib/style.css'
// import ElementPlus from "element-plus";
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
Expand Down
12 changes: 6 additions & 6 deletions src/pages/blubook.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ElMessage, ElMessageBox } from 'element-plus'
import type { Ref } from 'vue'
import { completeIcon } from '@/resources/status'
import { ElMessage, ElMessageBox } from 'element-plus'
interface AozAction {
ID: number
Expand Down Expand Up @@ -2122,11 +2122,11 @@ const showAozAction = computed(() => {
return (
(notLearnedOnly.value ? !learned.value[v.Number.toString()] : true)
&& (reg.test(v.Name)
|| reg.test(v.Number.toString())
|| reg.test(v.Description)
|| reg.test(v.Stats)
|| reg.test(v.AozDescription)
|| reg.test(v.Learn))
|| reg.test(v.Number.toString())
|| reg.test(v.Description)
|| reg.test(v.Stats)
|| reg.test(v.AozDescription)
|| reg.test(v.Learn))
)
})
return res
Expand Down
12 changes: 6 additions & 6 deletions src/pages/cactbotRuntime.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import 'animate.css'
import type { PlayerRuntime } from '@/types/partyPlayer'
import type { Role } from '../../cactbot/types/job'
import Util, { jobEnumOrder } from '@/utils/util'
import { VxeUI } from 'vxe-table'
import {
addOverlayListener,
callOverlayHandler,
} from '../../cactbot/resources/overlay_plugin_api'
import type { Role } from '../../cactbot/types/job'
import Util, { jobEnumOrder } from '@/utils/util'
import type { PlayerRuntime } from '@/types/partyPlayer'
import 'animate.css'
VxeUI.setTheme('dark')
Expand All @@ -16,9 +16,9 @@ VxeUI.setTheme('dark')
// );
function createRPArr(r: 'T' | 'H' | 'D' | 'C' | 'G' | 'N', l: number, start: number = 0) {
return Array(l)
return Array.from({ length: l })
.fill(r)
.map((v, i) => v + (+i + 1 + start))
.map((v, i) => (v as string) + (+i + 1 + start))
}
const dialogVisible = ref(false)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/castingMonitor.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
import { useCastingMonitorStore } from '@/store/castingMonitor'
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
const castingMonitorStore = useCastingMonitorStore()
const dev = location.href.includes('localhost')
Expand Down
2 changes: 1 addition & 1 deletion src/pages/castingToChinese.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
import { getActionChinese } from '@/resources/actionChinese'
import { getActionChineseTemp } from '@/resources/actionChineseTemp'
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
const params = new URLSearchParams(window.location.href.split('?')[1])
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dsrp6.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
import { getImgSrcByActionId } from '@/utils/xivapi'
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
addOverlayListener('LogLine', handleLogLine)
// startOverlayEvents();
Expand Down
3 changes: 2 additions & 1 deletion src/pages/hexcode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ function format(str: string) {
.replaceAll(
'<hex:024804F201F403><hex:024904F201F503>',
'<span style="color:#ff7b1a;">',
).replaceAll(/(<)(hex:[^>]+)(>)/g, '&lt;$2&gt;')
)
.replaceAll(/(<)(hex:[^>]+)(>)/g, '&lt;$2&gt;')
}

function onChange() {
Expand Down
19 changes: 9 additions & 10 deletions src/pages/hunt.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<script setup lang="ts">
import type { PPJSON, WayMarkKeys } from '@/types/PostNamazu'
import type { EventMap } from 'cactbot/types/event'
import ActWS from '@/assets/actWS.webp'
import Aetherytes from '@/resources/aetherytes.json'
import Map from '@/resources/map.json'
import zoneInfo from '@/resources/zoneInfo'
import { getPixelCoordinates, Vector2 } from '@/utils/mapCoordinates'
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
import LZString from 'lz-string'
import HuntData, { type HuntEntry } from '../../cactbot/resources/hunt'
import { addOverlayListener, callOverlayHandler } from '../../cactbot/resources/overlay_plugin_api'
import sonar from '../../cactbot/resources/sounds/freesound/sonar.webm'
import ZoneId from '../../cactbot/resources/zone_id'
import { Vector2, getPixelCoordinates } from '@/utils/mapCoordinates'
import zoneInfo from '@/resources/zoneInfo'
import Map from '@/resources/map.json'
import Aetherytes from '@/resources/aetherytes.json'
import ActWS from '@/assets/actWS.webp'
import type { PPJSON, WayMarkKeys } from '@/types/PostNamazu'
type DiscoveredMonsters = Array<{
timestamp: number
Expand Down Expand Up @@ -894,10 +894,9 @@ function cleanUpExpiredData(): Promise<void> {
type: '',
}).then(() => {
clearMonsterCurrentGameVerion()
}).catch(() => { })
.finally(() => {
resolve(undefined)
})
}).catch(() => { }).finally(() => {
resolve(undefined)
})
}
resolve(undefined)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/jobs/dnc.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup lang="ts">
import type { RemovableRef } from '@vueuse/core'
import type { EventMap } from '../../../cactbot/types/event'
import {
addOverlayListener,
removeOverlayListener,
} from '../../../cactbot/resources/overlay_plugin_api'
import type { EventMap } from '../../../cactbot/types/event'
const now = ref(0)
const game = reactive({
Expand Down
60 changes: 30 additions & 30 deletions src/pages/keigennRecord2.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<script setup lang="ts">
import type { Encounter, Keigenn, RowVO, Status } from '@/types/keigennRecord2'
import type { Player } from '@/types/partyPlayer'
import type { Ref } from 'vue'
import {
type VxeTableEvents,
type VxeTableInstance,
type VxeTablePropTypes,
VxeUI,
} from 'vxe-table'
import NetRegexes from '../../cactbot/resources/netregexes'
import logDefinitions from '../../cactbot/resources/netlog_defs'
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
import { getActionChinese } from '@/resources/actionChinese'
import { completeIcon, stackUrl } from '@/resources/status'
import { useKeigennRecord2Store } from '@/store/keigennRecord2'
import { deepClone } from '@/utils/deepClone'
import {
processAbilityLine,
processFlags,
translationFlags,
} from '@/utils/flags'
import Util from '@/utils/util'
import { getActionChinese } from '@/resources/actionChinese'
import { completeIcon, stackUrl } from '@/resources/status'
import { deepClone } from '@/utils/deepClone'
import type { Player } from '@/types/partyPlayer'
import type { Encounter, Keigenn, RowVO, Status } from '@/types/keigennRecord2'
import { useKeigennRecord2Store } from '@/store/keigennRecord2'
import {
getKeigenn,
universalVulnerableEnemy,
universalVulnerableFriendly,
} from '@/utils/keigenn'
import Util from '@/utils/util'
import {
type VxeTableEvents,
type VxeTableInstance,
type VxeTablePropTypes,
VxeUI,
} from 'vxe-table'
import logDefinitions from '../../cactbot/resources/netlog_defs'
import NetRegexes from '../../cactbot/resources/netregexes'
import { addOverlayListener } from '../../cactbot/resources/overlay_plugin_api'
VxeUI.setTheme('dark')
Expand All @@ -45,14 +45,14 @@ const size = {
action: 65 * userOptions.scale,
target:
((userOptions.showIcon ? 24 : 0)
+ (userOptions.showName
? userOptions.anonymous
|| (!userOptions.anonymous && userOptions.abbrId)
? 24
: 36
: 0)
+ (userOptions.showName
? userOptions.anonymous
|| (!userOptions.anonymous && userOptions.abbrId)
? 24
: 36
: 0)
+ 7)
* userOptions.scale,
* userOptions.scale,
amount: 44 * userOptions.scale,
}
Expand Down Expand Up @@ -176,13 +176,13 @@ function handleLine(line: string) {
if (!keigenn) {
const vulnerable
= (targetId.startsWith('1')
&& universalVulnerableFriendly.get(
Number.parseInt(effectId, 16).toString(),
))
|| (targetId.startsWith('4')
&& universalVulnerableEnemy.get(
Number.parseInt(effectId, 16).toString(),
))
&& universalVulnerableFriendly.get(
Number.parseInt(effectId, 16).toString(),
))
|| (targetId.startsWith('4')
&& universalVulnerableEnemy.get(
Number.parseInt(effectId, 16).toString(),
))
if (!vulnerable)
return
const fullIcon = completeIcon(vulnerable.icon)
Expand Down
Loading

0 comments on commit bd2b4fa

Please sign in to comment.