jzfai / vue3-admin-plus

👏 An amazing admin framework of vue3
MIT License
850 stars 202 forks source link

eslintrc-auto-import.json这个文件能讲解一下吗 #44

Closed rich-bot closed 2 years ago

rich-bot commented 2 years ago

为什么放在eslint里的extends选项里就能自动导入,还有大佬这样做得目的是不在每个组件里重复导入vue里的方法吗?能说下原理吗

jzfai commented 2 years ago

eslintrc-auto-import.json 由这个插件unplugin-auto-import自动生成,用于自动配置eslint 查看官方插件网址 https://www.npmjs.com/package/unplugin-auto-import 框架中配置 vite.config.js AutoImport({ eslintrc: { enabled: true, // Default false filepath: './.eslintrc-auto-import.json', // Default ./.eslintrc-auto-import.json globalsPropValue: true // Default true, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable') },

  })
rich-bot commented 2 years ago

1