mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-09 23:48:52 +08:00
优化unplugin-auto-import插件配置
This commit is contained in:
parent
cf6fef85c0
commit
e1344e7c91
@ -15,7 +15,7 @@ module.exports = {
|
|||||||
'plugin:vue/vue3-recommended',
|
'plugin:vue/vue3-recommended',
|
||||||
'plugin:vue/vue3-strongly-recommended',
|
'plugin:vue/vue3-strongly-recommended',
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'./auto-import-eslint-config.js'
|
'./.eslintrc-auto-import.json'
|
||||||
],
|
],
|
||||||
parser: 'vue-eslint-parser',
|
parser: 'vue-eslint-parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,5 +3,6 @@ node_modules
|
|||||||
dist*
|
dist*
|
||||||
dist-ssr
|
dist-ssr
|
||||||
*.local
|
*.local
|
||||||
|
.eslintrc-auto-import.json
|
||||||
public/icons
|
public/icons
|
||||||
src/assets/sprites/*.*
|
src/assets/sprites/*.*
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
globals: {
|
|
||||||
// lifecycle
|
|
||||||
onActivated: 'readonly',
|
|
||||||
onBeforeMount: 'readonly',
|
|
||||||
onBeforeUnmount: 'readonly',
|
|
||||||
onBeforeUpdate: 'readonly',
|
|
||||||
onDeactivated: 'readonly',
|
|
||||||
onErrorCaptured: 'readonly',
|
|
||||||
onMounted: 'readonly',
|
|
||||||
onServerPrefetch: 'readonly',
|
|
||||||
onUnmounted: 'readonly',
|
|
||||||
onUpdated: 'readonly',
|
|
||||||
// reactivity
|
|
||||||
computed: 'readonly',
|
|
||||||
customRef: 'readonly',
|
|
||||||
isReadonly: 'readonly',
|
|
||||||
isRef: 'readonly',
|
|
||||||
markRaw: 'readonly',
|
|
||||||
reactive: 'readonly',
|
|
||||||
readonly: 'readonly',
|
|
||||||
ref: 'readonly',
|
|
||||||
shallowReactive: 'readonly',
|
|
||||||
shallowReadonly: 'readonly',
|
|
||||||
shallowRef: 'readonly',
|
|
||||||
toRaw: 'readonly',
|
|
||||||
toRef: 'readonly',
|
|
||||||
toRefs: 'readonly',
|
|
||||||
triggerRef: 'readonly',
|
|
||||||
unref: 'readonly',
|
|
||||||
watch: 'readonly',
|
|
||||||
watchEffect: 'readonly',
|
|
||||||
// component
|
|
||||||
defineComponent: 'readonly',
|
|
||||||
defineAsyncComponent: 'readonly',
|
|
||||||
getCurrentInstance: 'readonly',
|
|
||||||
h: 'readonly',
|
|
||||||
inject: 'readonly',
|
|
||||||
nextTick: 'readonly',
|
|
||||||
provide: 'readonly',
|
|
||||||
useCssModule: 'readonly',
|
|
||||||
// other
|
|
||||||
defineProps: 'readonly',
|
|
||||||
defineEmits: 'readonly',
|
|
||||||
defineExpose: 'readonly',
|
|
||||||
withDefaults: 'readonly',
|
|
||||||
// vue-router
|
|
||||||
useRoute: 'readonly',
|
|
||||||
useRouter: 'readonly',
|
|
||||||
// element plus
|
|
||||||
ElMessage: 'readonly',
|
|
||||||
ElNotification: 'readonly',
|
|
||||||
ElMessageBox: 'readonly',
|
|
||||||
ElLoading: 'readonly'
|
|
||||||
}
|
|
||||||
}
|
|
@ -5,8 +5,21 @@ export default function createAutoImport() {
|
|||||||
return autoImport({
|
return autoImport({
|
||||||
imports: [
|
imports: [
|
||||||
'vue',
|
'vue',
|
||||||
'vue-router'
|
'vue-router',
|
||||||
|
{
|
||||||
|
'vue': [
|
||||||
|
'defineProps',
|
||||||
|
'defineEmits',
|
||||||
|
'defineExpose',
|
||||||
|
'withDefaults'
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
eslintrc: {
|
||||||
|
enabled: true,
|
||||||
|
filepath: './.eslintrc-auto-import.json',
|
||||||
|
globalsPropValue: true
|
||||||
|
},
|
||||||
resolvers: [
|
resolvers: [
|
||||||
ElementPlusResolver()
|
ElementPlusResolver()
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user