oyjt / uniapp-vue3-template

使用uniapp+vite+vue3+uview-plus3.0 搭建的搭建的适合团队协作的快速开发模版
http://icnpath.com/uniapp-vue3-template/
MIT License
243 stars 55 forks source link

修改vue文件后提交出错 #1

Closed caeret closed 8 months ago

caeret commented 1 year ago
✔ Preparing lint-staged...
⚠ Running tasks for staged files...
❯ package.json — 3 files
↓ src/**/*.{js,jsx,ts,tsx} — no files
↓ *.{scss,less,style,html} — no files
❯ *.vue — 1 file
✖ eslint --fix [FAILED]
◼ stylelint --fix
↓ Skipped because of errors from tasks.
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

✖ eslint --fix:

Oops! Something went wrong! :(

ESLint: 8.53.0

TypeError: Cannot read properties of undefined (reading 'ignores')
at FlatConfigArray.get ignores [as ignores] (/develops/codes/node_modules/.pnpm/@humanwhocodes+config-array@0.11.13/node_modules/@humanwhocodes/config-array/api.js:648:15)
at FlatConfigArray.isDirectoryIgnored (/develops/codes/node_modules/.pnpm/@humanwhocodes+config-array@0.11.13/node_modules/@humanwhocodes/config-array/api.js:1043:10)
at FlatConfigArray.getConfig (/develops/codes/node_modules/.pnpm/@humanwhocodes+config-array@0.11.13/node_modules/@humanwhocodes/config-array/api.js:837:12)
at FlatConfigArray.isFileIgnored (/develops/codes/node_modules/.pnpm/@humanwhocodes+config-array@0.11.13/node_modules/@humanwhocodes/config-array/api.js:993:15)
at /develops/codes/node_modules/.pnpm/eslint@8.53.0/node_modules/eslint/lib/eslint/eslint-helpers.js:504:38
at Array.forEach (<anonymous>)
at findFiles (/develops/codes/node_modules/.pnpm/eslint@8.53.0/node_modules/eslint/lib/eslint/eslint-helpers.js:493:11)
at async FlatESLint.lintFiles (/develops/codes/node_modules/.pnpm/eslint@8.53.0/node_modules/eslint/lib/eslint/flat-eslint.js:775:27)
at async Object.execute (/develops/codes/node_modules/.pnpm/eslint@8.53.0/node_modules/eslint/lib/cli.js:402:23)
at async main (/develops/codes/node_modules/.pnpm/eslint@8.53.0/node_modules/eslint/bin/eslint.js:152:22)

调试了后发现移除 eslint.config.js 内最后的 unocss 可以正常提交。

oyjt commented 10 months ago

感谢反馈。问题已修复,重新拉一下代码