From 9347e127ada8da0915823d3cc73abac48ff51b9d Mon Sep 17 00:00:00 2001 From: Aofei Sheng Date: Mon, 22 Jul 2024 21:19:11 +0800 Subject: [PATCH] spx-gui: remove unnecessary `defineProps` and `defineEmits` imports --- spx-gui/.eslintrc.cjs | 14 ++++++++++++++ .../asset/animation/GroupCostumesModal.vue | 2 +- .../components/asset/library/AssetLibraryModal.vue | 2 +- .../asset/preprocessing/PreprocessModal.vue | 2 +- .../editor/preview/stage-viewer/SpriteItem.vue | 2 +- .../src/components/editor/sound/SoundRecorder.vue | 2 +- .../editor/sound/waveform/WaveformRangeControl.vue | 2 +- .../editor/sprite/AnimationRemoveModal.vue | 2 +- spx-gui/src/widgets/spx-runner/SpxRunner.ce.vue | 2 +- 9 files changed, 22 insertions(+), 8 deletions(-) diff --git a/spx-gui/.eslintrc.cjs b/spx-gui/.eslintrc.cjs index 8fd834a41..4d1f6ad01 100644 --- a/spx-gui/.eslintrc.cjs +++ b/spx-gui/.eslintrc.cjs @@ -31,6 +31,20 @@ module.exports = { 'v-.*' // for Vue Konva components ] } + ], + 'no-restricted-imports': [ + 'warn', + { + paths: [ + { + // Workaround for https://github.com/vuejs/eslint-plugin-vue/issues/2437 + name: 'vue', + importNames: ['defineProps', 'defineEmits'], + message: + '`defineProps` and `defineEmits` are compiler macros and no longer need to be imported.' + } + ] + } ] } } diff --git a/spx-gui/src/components/asset/animation/GroupCostumesModal.vue b/spx-gui/src/components/asset/animation/GroupCostumesModal.vue index bbad57da2..9fe8f3fda 100644 --- a/spx-gui/src/components/asset/animation/GroupCostumesModal.vue +++ b/spx-gui/src/components/asset/animation/GroupCostumesModal.vue @@ -54,7 +54,7 @@