配置vue.config.js
...
...
module.exports = defineConfig({
...
...
configureWebpack: {
plugins: [
AutoImport({
resolvers: [ElementPlusResolver()],
eslintrc: {
enabled: true,
filepath: "./.eslintrc-auto-import.json",
globalsPropValue: true
}
}),
Components({
resolvers: [ElementPlusResolver()]
})
]
}
});
添加.eslintrc-auto-import.json
{
"globals": {}
}
配置.eslintrc
{
...
"extends": [
...
"./.eslintrc-auto-import.json"
]
}
标签:...,auto,eslintrc,element,json,eslint,vue3,import
From: https://www.cnblogs.com/tdyp/p/17433960.html