feat: arm 'vue/no-setup-props-reactivity-loss' rule

This commit is contained in:
Dominik Pschenitschni 2025-01-26 21:27:32 +01:00
parent b09d0ab711
commit 522f1cb596
5 changed files with 5 additions and 6 deletions

View File

@ -48,7 +48,7 @@ export default [
// vue3
'vue/no-ref-object-reactivity-loss': 'error',
'vue/no-setup-props-reactivity-loss': 'warn', // TODO: switch to error after vite `propsDestructure` is removed
'vue/no-setup-props-reactivity-loss': 'error',
'@typescript-eslint/no-unused-vars': [
'error',

View File

@ -55,6 +55,7 @@ const emit = defineEmits<{
const {t} = useI18n()
const passwordFieldType = ref('password')
const password = ref('')
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
const isValid = ref<true | string>(props.validateInitially === true ? true : '')
const validateAfterFirst = ref(false)

View File

@ -51,6 +51,7 @@ defineSlots<{
}): void
}>()
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
const openValue = ref(props.open)
watchEffect(() => {
openValue.value = props.open

View File

@ -93,6 +93,7 @@ const attrs = useAttrs()
const root = ref<HTMLInputElement | null>(null)
const fp = ref<flatpickr.Instance | null>(null)
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
const safeConfig = ref<Options>({...props.config})
function prepareConfig() {

View File

@ -100,11 +100,7 @@ export default defineConfig(({mode}) => {
},
},
plugins: [
vue({
script: {
propsDestructure: true,
},
}),
vue(),
svgLoader({
// Since the svgs are already manually optimized via https://jakearchibald.github.io/svgomg/
// we don't need to optimize them again.