Skip to content

Commit

Permalink
🐛 Fixed invalidation issues with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ileostar committed Oct 8, 2023
1 parent 1f458da commit 6c675ed
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 166 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"plugins": [
"@unocss"
]
}
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
克隆项目到本地:

``` bash
git clone https://github.com/ileostar/vue3-star.git
npx degit ileostar/vue-star 你的项目名称
```

进入项目目录:

``` bash
cd vue3-vite-ts-alova
cd 你的项目名称
```

安装依赖:
Expand All @@ -63,7 +63,7 @@ pnpm install

``` bash

pnpm run dev
pnpm dev
```

打开浏览器,访问 http://localhost:5173 即可查看项目运行效果。
Expand Down
6 changes: 0 additions & 6 deletions auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const alova: typeof import('useFetcher')['alova']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const computed: typeof import('vue')['computed']
Expand All @@ -32,8 +31,6 @@ declare global {
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const defineLoader: typeof import('vue-router/auto')['defineLoader']
const definePage: typeof import('unplugin-vue-router/runtime')['_definePage']
const defineStore: typeof import('pinia')['defineStore']
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
const effectScope: typeof import('vue')['effectScope']
Expand Down Expand Up @@ -100,7 +97,6 @@ declare global {
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const shimsD: typeof import('./shims.d')['default']
const storeToRefs: typeof import('pinia')['storeToRefs']
const syncRef: typeof import('@vueuse/core')['syncRef']
const syncRefs: typeof import('@vueuse/core')['syncRefs']
Expand All @@ -119,7 +115,6 @@ declare global {
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
const unoConfig: typeof import('./uno.config')['default']
const unref: typeof import('vue')['unref']
const unrefElement: typeof import('@vueuse/core')['unrefElement']
const until: typeof import('@vueuse/core')['until']
Expand Down Expand Up @@ -287,7 +282,6 @@ declare global {
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
const viteConfig: typeof import('./vite.config')['default']
const watch: typeof import('vue')['watch']
const watchArray: typeof import('@vueuse/core')['watchArray']
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
Expand Down
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
</head>
<body>
<div id="app"></div>
<script>
(function() {
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
const setting = localStorage.getItem('color-schema') || 'auto'
if (setting === 'dark' || (prefersDark && setting !== 'light'))
document.documentElement.classList.toggle('dark', true)
})()
</script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue3-vite-alova-ts-vitest",
"type": "module",
"version": "0.0.1",
"private": true,
"packageManager": "[email protected]",
"scripts": {
"dev": "vite --mode dev",
Expand All @@ -24,6 +24,12 @@
"path": "./node_modules/cz-emoji"
}
},
"lint-staged": {
"src/**/*.{js,vue,ts}": [
"eslint --fix",
"git add ."
]
},
"dependencies": {

Check failure on line 33 in package.json

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-latest)

Expected object keys to be in specified order. 'dependencies' should be before 'lint-staged'

Check failure on line 33 in package.json

View workflow job for this annotation

GitHub Actions / build (18.x, windows-latest)

Expected object keys to be in specified order. 'dependencies' should be before 'lint-staged'
"@vueuse/core": "^10.4.1",
"alova": "^2.13.1",
Expand All @@ -32,6 +38,7 @@
},
"devDependencies": {
"@alova/adapter-axios": "^1.1.1",
"@antfu/eslint-config": "1.0.0-beta.21",
"@iconify-json/carbon": "^1.1.21",
"@iconify-json/mdi": "^1.1.54",
"@ileostar/eslint-config": "^0.3.0",
Expand All @@ -47,7 +54,7 @@
"commitizen": "^4.3.0",
"cz-emoji": "1.3.2-canary.2",
"eslint": "^8.50.0",
"eslint-plugin-vue": "^9.17.0",
"eslint-define-config": "^1.23.0",
"husky": "^8.0.3",
"jsdom": "^22.1.0",
"lint": "^0.8.19",
Expand All @@ -68,11 +75,5 @@
"vite-plugin-pages": "^0.31.0",
"vitest": "^0.34.6",
"vue-tsc": "^1.8.15"
},
"lint-staged": {
"src/**/*.{js,vue,ts}": [
"eslint --fix",
"git add ."
]
}
}
143 changes: 140 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ const { count, msg } = storeToRefs(indexStore)
<img src="@/assets/vitest.png" class="logo pinia" alt="Vitest logo">
</a>
</div>
<h2 text-7 m-3 font-bold>{{ msg }}</h2>
<h2 m-3 text-7 font-bold>
{{ msg }}
</h2>
<div class="card">
<button type="button" @click="indexStore.updateCount" cursor-pointer font-100 border-rd-3 border p="t-2 b-2 l-3 r-3" m-2>
<button type="button" p="t-2 b-2 l-3 r-3" m-2 cursor-pointer border border-rd-3 font-100 @click="indexStore.updateCount">
count is {{ count }}
</button>
<p class="read-the-docs">
Expand Down
Loading

0 comments on commit 6c675ed

Please sign in to comment.