Skip to content

Commit 62fb4ca

Browse files
committed
Enable vue/require-typed-ref eslint rule
1 parent 91839ca commit 62fb4ca

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ export default defineConfig([
921921
'vue/html-closing-bracket-spacing': [2, {startTag: 'never', endTag: 'never', selfClosingTag: 'never'}],
922922
'vue/max-attributes-per-line': [0],
923923
'vue/singleline-html-element-content-newline': [0],
924+
'vue/require-typed-ref': [2],
924925
},
925926
},
926927
{

web_src/js/components/ContextPopup.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ import {SvgIcon} from '../svg.ts';
33
import {GET} from '../modules/fetch.ts';
44
import {getIssueColor, getIssueIcon} from '../features/issue.ts';
55
import {computed, onMounted, shallowRef} from 'vue';
6+
import type {Issue} from '../types.ts';
67
78
const props = defineProps<{
89
repoLink: string,
910
loadIssueInfoUrl: string,
1011
}>();
1112
12-
const loading = shallowRef(false);
13-
const issue = shallowRef(null);
14-
const renderedLabels = shallowRef('');
15-
const errorMessage = shallowRef(null);
13+
const loading = shallowRef<boolean>(false);
14+
const issue = shallowRef<Issue>(null);
15+
const renderedLabels = shallowRef<string>('');
16+
const errorMessage = shallowRef<string | null>(null);
1617
1718
const createdAt = computed(() => {
1819
return new Date(issue.value.created_at).toLocaleDateString(undefined, {year: 'numeric', month: 'short', day: 'numeric'});

web_src/js/types.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,20 @@ export type IssuePageInfo = {
5252
};
5353

5454
export type Issue = {
55-
id: number;
56-
number: number;
57-
title: string;
58-
state: 'open' | 'closed';
55+
id: number,
56+
number: number,
57+
title: string,
58+
body: string,
59+
state: 'open' | 'closed',
60+
created_at: string,
5961
pull_request?: {
6062
draft: boolean;
6163
merged: boolean;
62-
};
64+
},
65+
repository: {
66+
full_name: string,
67+
},
68+
labels: Array<string>,
6369
};
6470

6571
export type FomanticInitFunction = {

0 commit comments

Comments
 (0)