fix: type missing issue
This commit is contained in:
parent
bb000036fd
commit
275cadd596
|
|
@ -3,7 +3,6 @@ module.exports = {
|
|||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
project: ['./tsconfig.app.json', './tsconfig.config.json', './tsconfig.cypress-ct.json'],
|
||||
sourceType: 'module',
|
||||
extraFileExtensions: ['.vue'],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"build": "vite build",
|
||||
"serve": "vite preview --port 4137",
|
||||
"lint:script": "eslint \"{src/**/*.{ts,vue},cypress/**/*.ts}\"",
|
||||
"lint:tsc": "vue-tsc --noEmit",
|
||||
"lint:tsc": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
||||
"lint": "concurrently \"yarn lint:tsc\" \"yarn lint:script\"",
|
||||
"test:unit": "cypress open --component",
|
||||
"test:unit:ci": "cypress run --component --quiet --reporter spec",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ describe('# AppNavigation', () => {
|
|||
|
||||
it('should render xxx when user logged', () => {
|
||||
const userStore = useUserStore()
|
||||
userStore.updateUser({ id: 1, username: 'foo', email: '', token: '', bio: undefined, image: undefined })
|
||||
userStore.updateUser({ username: 'foo', email: '', token: '', bio: '', image: '' })
|
||||
cy.mount(AppNavigation)
|
||||
|
||||
cy.get('.nav-item').should('have.length', 4)
|
||||
|
|
|
|||
|
|
@ -46,9 +46,10 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { Comment } from 'src/services/api'
|
||||
|
||||
interface Props {
|
||||
comment: ArticleComment
|
||||
comment: Comment
|
||||
username?: string
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { useFavoriteArticle } from 'src/composable/useFavoriteArticle'
|
||||
import type { Article } from 'src/services/api'
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface Props {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
</fieldset>
|
||||
<fieldset class=" form-group">
|
||||
<input
|
||||
v-model="form.token"
|
||||
v-model="form.password"
|
||||
class="form-control form-control-lg"
|
||||
type="password"
|
||||
required
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ import { storeToRefs } from 'pinia'
|
|||
import ArticlesList from 'src/components/ArticlesList.vue'
|
||||
import { useFollow } from 'src/composable/useFollowProfile'
|
||||
import { useProfile } from 'src/composable/useProfile'
|
||||
import type { Profile } from 'src/services/api'
|
||||
import { isAuthorized, useUserStore } from 'src/store/user'
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
</fieldset>
|
||||
<fieldset class="form-group">
|
||||
<input
|
||||
v-model="form.password"
|
||||
v-model="form.token"
|
||||
type="password"
|
||||
class="form-control form-control-lg"
|
||||
placeholder="New Password"
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ import { userStorage } from 'src/store/user'
|
|||
|
||||
export default function (): void {
|
||||
const token = userStorage.get()?.token
|
||||
if (token !== undefined) api.setAuthorizationHeader(token)
|
||||
if (token !== undefined) api.setSecurityData(token)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue