ci: add lint-staged check
This commit is contained in:
1
.github/workflows/vercel.yml
vendored
1
.github/workflows/vercel.yml
vendored
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
name: Production Tag Deployment
|
name: Production Tag Deployment
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|||||||
1
.npmrc
1
.npmrc
@@ -1,3 +1,4 @@
|
|||||||
shamefully-hoist=true
|
shamefully-hoist=true
|
||||||
strict-peer-dependencies=false
|
strict-peer-dependencies=false
|
||||||
shell-emulator=true
|
shell-emulator=true
|
||||||
|
ignore-workspace-root-check=true
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { installPrompt } from './utils/pwa'
|
|
||||||
import { appName } from '~/constants'
|
|
||||||
import { useIndexedDB } from '~/composables/db'
|
import { useIndexedDB } from '~/composables/db'
|
||||||
|
import { appName } from '~/constants'
|
||||||
|
import { installPrompt } from './utils/pwa'
|
||||||
|
|
||||||
// https://nuxt.com/docs/api/composables/use-head
|
// https://nuxt.com/docs/api/composables/use-head
|
||||||
useHead({
|
useHead({
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import type { StuffItem } from '~/types'
|
import { useEmojiAnimation } from '~/composables/animation'
|
||||||
import { meat, staple, tools, vegetable } from '~/data/food'
|
import { meat, staple, tools, vegetable } from '~/data/food'
|
||||||
|
|
||||||
import { useEmojiAnimation } from '~/composables/animation'
|
import type { StuffItem } from '~/types'
|
||||||
|
|
||||||
const rStore = useRecipeStore()
|
const rStore = useRecipeStore()
|
||||||
const { curTool } = storeToRefs(rStore)
|
const { curTool } = storeToRefs(rStore)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { DbRecipeItem } from '~/utils/db'
|
import { recipeHistories } from '~/composables/store/history'
|
||||||
import { tools } from '~/data/food'
|
import { tools } from '~/data/food'
|
||||||
import type { RecipeItem } from '~/types'
|
import type { RecipeItem } from '~/types'
|
||||||
import { getEmojisFromStuff } from '~/utils'
|
import { getEmojisFromStuff } from '~/utils'
|
||||||
import { recipeHistories } from '~/composables/store/history'
|
import type { DbRecipeItem } from '~/utils/db'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
dish: RecipeItem | DbRecipeItem
|
dish: RecipeItem | DbRecipeItem
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { isClient } from '@vueuse/core'
|
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
|
import { isClient } from '@vueuse/core'
|
||||||
|
|
||||||
export function useEmojiAnimation(recipeBtn: Ref<HTMLButtonElement | undefined>) {
|
export function useEmojiAnimation(recipeBtn: Ref<HTMLButtonElement | undefined>) {
|
||||||
const { x, y } = usePointer()
|
const { x, y } = usePointer()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { acceptHMRUpdate, defineStore } from 'pinia'
|
|
||||||
import { useStorage } from '@vueuse/core'
|
import { useStorage } from '@vueuse/core'
|
||||||
|
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { defaultSettings } from '../../utils/settings'
|
|
||||||
import { namespace } from '../../constants'
|
import { namespace } from '../../constants'
|
||||||
|
import { defaultSettings } from '../../utils/settings'
|
||||||
|
|
||||||
export const useAppStore = defineStore('app', () => {
|
export const useAppStore = defineStore('app', () => {
|
||||||
const deferredPrompt = ref<Event | any>()
|
const deferredPrompt = ref<Event | any>()
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { acceptHMRUpdate, defineStore } from 'pinia'
|
|
||||||
import { useStorage } from '@vueuse/core'
|
|
||||||
import { computed, onMounted, ref, watch } from 'vue'
|
|
||||||
import { useGtm } from '@gtm-support/vue-gtm'
|
import { useGtm } from '@gtm-support/vue-gtm'
|
||||||
|
import { useStorage } from '@vueuse/core'
|
||||||
|
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||||
|
import { computed, onMounted, ref, watch } from 'vue'
|
||||||
|
import type { RecipeItem, StuffItem } from '~/types'
|
||||||
import { db } from '../../utils/db'
|
import { db } from '../../utils/db'
|
||||||
import { useAppStore } from './app'
|
import { useAppStore } from './app'
|
||||||
import type { RecipeItem, StuffItem } from '~/types'
|
|
||||||
|
|
||||||
const namespace = 'cook'
|
const namespace = 'cook'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import process from 'node:process'
|
|
||||||
import type { ModuleOptions } from '@vite-pwa/nuxt'
|
import type { ModuleOptions } from '@vite-pwa/nuxt'
|
||||||
|
import process from 'node:process'
|
||||||
import { appDescription, appName } from '../constants/index'
|
import { appDescription, appName } from '../constants/index'
|
||||||
|
|
||||||
const scope = '/'
|
const scope = '/'
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -26,7 +26,5 @@
|
|||||||
// cook custom
|
// cook custom
|
||||||
:root {
|
:root {
|
||||||
--cook-bottom-menu-padding-bottom: 20px;
|
--cook-bottom-menu-padding-bottom: 20px;
|
||||||
--cook-bottom-menu-height: calc(
|
--cook-bottom-menu-height: calc(64px + var(--cook-bottom-menu-padding-bottom));
|
||||||
64px + var(--cook-bottom-menu-padding-bottom)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
20
package.json
20
package.json
@@ -28,7 +28,7 @@
|
|||||||
"vue-about-me": "^1.2.7"
|
"vue-about-me": "^1.2.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^2.27.3",
|
"@antfu/eslint-config": "^3.6.0",
|
||||||
"@headlessui/vue": "^1.7.23",
|
"@headlessui/vue": "^1.7.23",
|
||||||
"@iconify-json/carbon": "^1.2.1",
|
"@iconify-json/carbon": "^1.2.1",
|
||||||
"@iconify-json/fe": "^1.2.0",
|
"@iconify-json/fe": "^1.2.0",
|
||||||
@@ -55,19 +55,29 @@
|
|||||||
"eslint": "^9.10.0",
|
"eslint": "^9.10.0",
|
||||||
"eslint-plugin-format": "^0.1.2",
|
"eslint-plugin-format": "^0.1.2",
|
||||||
"fake-indexeddb": "^6.0.0",
|
"fake-indexeddb": "^6.0.0",
|
||||||
"happy-dom": "^14.12.3",
|
"jsdom": "^25.0.0",
|
||||||
"jsdom": "^24.1.3",
|
"lint-staged": "^15.2.10",
|
||||||
"nuxt": "3.13.1",
|
"nuxt": "3.13.1",
|
||||||
"nuxt-fix-ofetch": "^0.0.14",
|
"nuxt-fix-ofetch": "^0.0.15",
|
||||||
"nuxt-vitest": "^0.11.5",
|
"nuxt-vitest": "^0.11.5",
|
||||||
"pinia": "^2.2.2",
|
"pinia": "^2.2.2",
|
||||||
"sass": "^1.78.0",
|
"sass": "^1.78.0",
|
||||||
"serve": "^14.2.3",
|
"serve": "^14.2.3",
|
||||||
|
"simple-git-hooks": "^2.11.1",
|
||||||
"star-markdown-css": "^0.5.1",
|
"star-markdown-css": "^0.5.1",
|
||||||
"tsx": "^4.19.1",
|
"tsx": "^4.19.1",
|
||||||
"typescript": "^5.6.2",
|
"typescript": "^5.5.4",
|
||||||
"unocss": "^0.62.3",
|
"unocss": "^0.62.3",
|
||||||
"vitest": "^2.1.1",
|
"vitest": "^2.1.1",
|
||||||
"vue-tsc": "^2.1.6"
|
"vue-tsc": "^2.1.6"
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"@typescript-eslint/utils": "^8.2.0"
|
||||||
|
},
|
||||||
|
"simple-git-hooks": {
|
||||||
|
"pre-commit": "pnpm lint-staged"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*": "eslint --fix"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1192
pnpm-lock.yaml
generated
1192
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
|
import type { RecipeItem, Recipes } from '../app/types'
|
||||||
// convert csv to json
|
// convert csv to json
|
||||||
import fs from 'node:fs'
|
import fs from 'node:fs'
|
||||||
import consola from 'consola'
|
import consola from 'consola'
|
||||||
import type { RecipeItem, Recipes } from '../app/types'
|
|
||||||
|
|
||||||
import { config } from './config'
|
import { config } from './config'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { beforeEach, describe, expect, it } from 'vitest'
|
|
||||||
import { createPinia, setActivePinia } from 'pinia'
|
import { createPinia, setActivePinia } from 'pinia'
|
||||||
|
import { beforeEach, describe, expect, it } from 'vitest'
|
||||||
import { useRecipeStore } from '../composables/store'
|
import { useRecipeStore } from '../composables/store'
|
||||||
|
|
||||||
describe('recipe interaction', () => {
|
describe('recipe interaction', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user