mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 21:44:51 +00:00
Upgrade eslint tooling to v10 and fix linting bugs (#601)
- Upgrade eslint 9→10, eslint-config-prettier 9→10, eslint-plugin-vue 9→10 - Upgrade @types/node 20→24 - Migrate from legacy .eslintrc.mjs to flat config eslint.config.mjs - Remove --ext flag from npm test script (dropped in eslint 10) - Fix vue/no-ref-as-operand: add missing .value to ref assignments (5 files) - Fix vue/return-in-computed-property: add default returns (2 files) - Fix vue/no-side-effects-in-computed-properties: move mutation to watcher - Fix vue/no-dupe-keys: remove ref shadowing prop in DomPDFDriver - Fix vue/no-deprecated-slot-attribute: migrate to v-slot syntax (3 files) - Fix vue/require-valid-default-prop: use factory function for array default - Fix vue/no-unused-vars: remove unused slot destructure - Disable vue/no-mutating-props (false positive for Pinia store props)
This commit is contained in:
committed by
GitHub
parent
9e5b9fdaad
commit
5014a75fbc
@@ -108,11 +108,13 @@ export default function useOptions(props, context, dep) {
|
||||
case 'multiple':
|
||||
case 'tags':
|
||||
return !isNullish(iv.value) && iv.value.length > 0
|
||||
|
||||
default: return null
|
||||
}
|
||||
})
|
||||
|
||||
const multipleLabelText = computed(() => {
|
||||
return multipleLabel !== undefined && multipleLabel.value !== undefined
|
||||
return multipleLabel.value !== undefined && multipleLabel.value !== undefined
|
||||
? multipleLabel.value(iv.value)
|
||||
: (iv.value && iv.value.length > 1 ? `${iv.value.length} options selected` : `1 option selected`)
|
||||
})
|
||||
@@ -148,6 +150,8 @@ export default function useOptions(props, context, dep) {
|
||||
case 'multiple':
|
||||
case 'tags':
|
||||
return []
|
||||
|
||||
default: return null
|
||||
}
|
||||
})
|
||||
|
||||
@@ -243,7 +247,7 @@ export default function useOptions(props, context, dep) {
|
||||
}
|
||||
|
||||
const isMax = () => {
|
||||
if (max === undefined || max.value === -1 || (!hasSelected.value && max.value > 0)) {
|
||||
if (max.value === undefined || max.value === -1 || (!hasSelected.value && max.value > 0)) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -519,7 +523,7 @@ export default function useOptions(props, context, dep) {
|
||||
throw new Error(`v-model must be an array when using "${mode.value}" mode`)
|
||||
}
|
||||
|
||||
if (options && typeof options.value == 'function') {
|
||||
if (options.value && typeof options.value == 'function') {
|
||||
if (resolveOnLoad.value) {
|
||||
resolveOptions(initInternalValue)
|
||||
} else if (object.value == true) {
|
||||
|
||||
Reference in New Issue
Block a user