Enable vue/require-typed-ref eslint rule (#35764)

Enable https://eslint.vuejs.org/rules/require-typed-ref 
and fix discovered issues.
This commit is contained in:
silverwind
2025-10-29 10:42:06 +01:00
committed by GitHub
parent 95b18eb781
commit fe25997157
3 changed files with 16 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ import {SvgIcon} from '../svg.ts';
import {GET} from '../modules/fetch.ts';
import {getIssueColor, getIssueIcon} from '../features/issue.ts';
import {computed, onMounted, shallowRef} from 'vue';
import type {Issue} from '../types.ts';
const props = defineProps<{
repoLink: string,
@@ -10,9 +11,9 @@ const props = defineProps<{
}>();
const loading = shallowRef(false);
const issue = shallowRef(null);
const issue = shallowRef<Issue>(null);
const renderedLabels = shallowRef('');
const errorMessage = shallowRef(null);
const errorMessage = shallowRef('');
const createdAt = computed(() => {
return new Date(issue.value.created_at).toLocaleDateString(undefined, {year: 'numeric', month: 'short', day: 'numeric'});
@@ -25,7 +26,7 @@ const body = computed(() => {
onMounted(async () => {
loading.value = true;
errorMessage.value = null;
errorMessage.value = '';
try {
const resp = await GET(props.loadIssueInfoUrl);
if (!resp.ok) {