refactor: add TypeScript type annotations and update ESLint rules

This commit is contained in:
CaptainB 2025-07-03 20:17:24 +08:00
parent 6dd1e68efc
commit a3c5cf452c
3 changed files with 12 additions and 5 deletions

View File

@ -19,4 +19,11 @@ export default defineConfigWithVueTs(
pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
skipFormatting,
{
rules: {
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['off'],
}
}
)

View File

@ -456,7 +456,7 @@ const uploadFile = async (file: any, fileList: any) => {
formData,
localLoading,
)
.then((response) => {
.then((response: any) => {
fileList.splice(0, fileList.length)
uploadImageList.value.forEach((file: any) => {
const f = response.data.filter(

View File

@ -65,11 +65,11 @@ const useApplicationStore = defineStore('application', {
console.log('xxxx')
applicationApi
.getAppProfile(loading)
.then((res) => {
.then((res: any) => {
sessionStorage.setItem('language', res.data?.language || getBrowserLang())
resolve(res)
})
.catch((error) => {
.catch((error: any) => {
reject(error)
})
})
@ -83,12 +83,12 @@ const useApplicationStore = defineStore('application', {
return new Promise((resolve, reject) => {
applicationApi
.postAppAuthentication(token, loading, authentication_value)
.then((res) => {
.then((res: any) => {
localStorage.setItem(`${token}-accessToken`, res.data)
sessionStorage.setItem(`${token}-accessToken`, res.data)
resolve(res)
})
.catch((error) => {
.catch((error: any) => {
reject(error)
})
})