ESLint9
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<script setup>
|
||||
<script lang="ts" setup>
|
||||
// https://vue-macros.dev/zh-CN/features/reactivity-transform.html
|
||||
let count = $ref(0);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<script setup lang="ts">
|
||||
const baseURL = '/fake-api';
|
||||
|
||||
let fakeApiResult = $ref<Record<string, any> | null>(null);
|
||||
let fakeApiResult = $ref<Record<string, unknown> | null>(null);
|
||||
|
||||
fetch(`${baseURL}/mock/get-user-info`)
|
||||
.then((response) => response.json())
|
||||
|
@ -36,7 +36,7 @@ const {
|
||||
watch(
|
||||
pageData,
|
||||
(pageDataVal) => {
|
||||
let message = [`[watch]`, `pageDataVal :>> `, pageDataVal];
|
||||
const message = [`[watch]`, `pageDataVal :>> `, pageDataVal];
|
||||
if (pageDataVal === undefined) {
|
||||
// hot updated 会造成 pageDataVal 为 undefined
|
||||
console.warn(message);
|
||||
|
@ -12,7 +12,7 @@ enum TestEnum {
|
||||
B,
|
||||
}
|
||||
|
||||
const visitValue = (value: any) => {
|
||||
const visitValue = (value: Direction | null | undefined) => {
|
||||
$enum.visitValue(value).with({
|
||||
[Direction.Up]: () => {},
|
||||
[Direction.Down]: () => {},
|
||||
@ -24,7 +24,7 @@ const visitValue = (value: any) => {
|
||||
});
|
||||
};
|
||||
|
||||
const mapValue = (value: any) => {
|
||||
const mapValue = (value: Direction | null | undefined) => {
|
||||
return $enum.mapValue(value).with({
|
||||
[Direction.Up]: 'Up',
|
||||
[Direction.Down]: 'Down',
|
||||
|
@ -12,6 +12,7 @@
|
||||
// }
|
||||
|
||||
declare module '@vue/runtime-dom' {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
interface HTMLAttributes
|
||||
extends Partial<Record<import('@unocss/preset-attributify').AttributifyNames, string | boolean>> {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user