ESLint9
Some checks failed
CI / build-and-deploy (push) Failing after 1m26s
/ depcheck (push) Successful in 1m35s

This commit is contained in:
严浩
2024-10-11 18:03:03 +08:00
parent 8a3c29499c
commit 078cb2c0e9
9 changed files with 569 additions and 469 deletions

View File

@ -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())

View File

@ -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);

View File

@ -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',