* improve frontend ci check
@ -69,12 +69,19 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 16
- name: Compile and Build on ${{ matrix.os }}
- name: Code Format Check
run: |
set -x
npm install pnpm@7 -g
pnpm install
pnpm run lint
modified_files=$(git status | grep modified | wc -l)
if [ $modified_files -gt 0 ]; then
echo "Code format check failed! Please run \`pnpm run lint\` to format the code."
exit -1
fi
pnpm run build:prod
result:
name: Frontend Build
@ -24,7 +24,7 @@ import { useEdit, useIsDetailPageStore } from './use-edit'
import Card from '@/components/card'
import MonacoEditor from '@/components/monaco-editor'
import styles from '../index.module.scss'
import { useDetailPageStore } from "@/views/resource/components/resource/table/use-table";
import { useDetailPageStore } from '@/views/resource/components/resource/table/use-table'
export default defineComponent({
name: 'ResourceEdit',
@ -19,7 +19,10 @@ import { useI18n } from 'vue-i18n'
import type { Router } from 'vue-router'
import { useRouter } from 'vue-router'
import { useAsyncState } from '@vueuse/core'
import { updateResourceContent, viewResource } from '@/service/modules/resources'
import {
updateResourceContent,
viewResource
} from '@/service/modules/resources'
import { defineStore } from 'pinia'
export function useEdit(state: any) {