diff --git a/src/components/Breadcrumb.vue b/src/components/Breadcrumb.vue index 85a3520a..744741d2 100644 --- a/src/components/Breadcrumb.vue +++ b/src/components/Breadcrumb.vue @@ -69,17 +69,15 @@ export default { }, separator: { type: String, - default: ' > ', + default: undefined, }, rootPath: { type: String, - default: null, + default: undefined, }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/ClearRefinements.vue b/src/components/ClearRefinements.vue index 1704a6fc..0eb5aacc 100644 --- a/src/components/ClearRefinements.vue +++ b/src/components/ClearRefinements.vue @@ -36,21 +36,17 @@ export default { createSuitMixin({ name: 'ClearRefinements' }), ], props: { - // explicitly no default, since included and excluded are incompatible - // eslint-disable-next-line vue/require-default-prop excludedAttributes: { type: Array, + default: undefined, }, - // explicitly no default, since included and excluded are incompatible - // eslint-disable-next-line vue/require-default-prop includedAttributes: { type: Array, + default: undefined, }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/CurrentRefinements.vue b/src/components/CurrentRefinements.vue index b2b27963..24f5a867 100644 --- a/src/components/CurrentRefinements.vue +++ b/src/components/CurrentRefinements.vue @@ -70,21 +70,17 @@ export default { }), ], props: { - // no default because included and excluded are incompatible - // eslint-disable-next-line vue/require-default-prop includedAttributes: { type: Array, + default: undefined, }, - // no default because included and excluded are incompatible - // eslint-disable-next-line vue/require-default-prop excludedAttributes: { type: Array, + default: undefined, }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/HierarchicalMenu.vue b/src/components/HierarchicalMenu.vue index f3728999..f06260d3 100644 --- a/src/components/HierarchicalMenu.vue +++ b/src/components/HierarchicalMenu.vue @@ -68,11 +68,11 @@ export default { }, limit: { type: Number, - default: 10, + default: undefined, }, showMoreLimit: { type: Number, - default: 20, + default: undefined, }, showMore: { type: Boolean, @@ -80,27 +80,23 @@ export default { }, sortBy: { type: [Array, Function], - default() { - return ['name:asc']; - }, + default: undefined, }, separator: { type: String, - default: ' > ', + default: undefined, }, rootPath: { type: String, - default: null, + default: undefined, }, showParentLevel: { type: Boolean, - default: true, + default: undefined, }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/Highlighter.vue b/src/components/Highlighter.vue index bee0e498..c7e05a4f 100644 --- a/src/components/Highlighter.vue +++ b/src/components/Highlighter.vue @@ -27,10 +27,22 @@ export default { type: String, default: 'mark', }, - suit: { type: Function, required: true }, - highlightProperty: { type: String, required: true }, - preTag: { type: String, required: true }, - postTag: { type: String, required: true }, + suit: { + type: Function, + required: true, + }, + highlightProperty: { + type: String, + required: true, + }, + preTag: { + type: String, + required: true, + }, + postTag: { + type: String, + required: true, + }, }, data() { return { diff --git a/src/components/Hits.vue b/src/components/Hits.vue index ba74e14d..296ad86c 100644 --- a/src/components/Hits.vue +++ b/src/components/Hits.vue @@ -44,9 +44,7 @@ export default { }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/HitsPerPage.vue b/src/components/HitsPerPage.vue index a2595fa1..bc5d184d 100644 --- a/src/components/HitsPerPage.vue +++ b/src/components/HitsPerPage.vue @@ -43,13 +43,10 @@ export default { items: { type: Array, required: true, - default: () => [], }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, data() { diff --git a/src/components/InfiniteHits.vue b/src/components/InfiniteHits.vue index 864ee7f2..81888ed0 100644 --- a/src/components/InfiniteHits.vue +++ b/src/components/InfiniteHits.vue @@ -82,9 +82,7 @@ export default { }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, cache: { type: Object, diff --git a/src/components/InstantSearch.js b/src/components/InstantSearch.js index 928f2798..f655cd10 100644 --- a/src/components/InstantSearch.js +++ b/src/components/InstantSearch.js @@ -16,14 +16,14 @@ export default createInstantSearchComponent({ }, insightsClient: { type: Function, - required: false, + default: undefined, }, indexName: { type: String, required: true, }, routing: { - default: null, + default: undefined, validator(value) { if ( typeof value === 'boolean' || @@ -39,19 +39,19 @@ export default createInstantSearchComponent({ }, stalledSearchDelay: { type: Number, - default: 200, + default: undefined, }, searchFunction: { type: Function, - default: null, + default: undefined, }, initialUiState: { type: Object, - required: false, + default: undefined, }, apiKey: { type: String, - default: null, + default: undefined, validator(value) { if (value) { warn(oldApiWarning); @@ -61,7 +61,7 @@ export default createInstantSearchComponent({ }, appId: { type: String, - default: null, + default: undefined, validator(value) { if (value) { warn(oldApiWarning); diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 9af47613..2b0288d6 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -72,11 +72,11 @@ export default { // }, limit: { type: Number, - default: 10, + default: undefined, }, showMoreLimit: { type: Number, - default: 20, + default: undefined, }, showMore: { type: Boolean, @@ -84,15 +84,11 @@ export default { }, sortBy: { type: [Array, Function], - default() { - return ['count:desc', 'name:asc']; - }, + default: undefined, }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/MenuSelect.vue b/src/components/MenuSelect.vue index f8ae8843..6cc9acd2 100644 --- a/src/components/MenuSelect.vue +++ b/src/components/MenuSelect.vue @@ -63,9 +63,7 @@ export default { }, sortBy: { type: [Array, Function], - default() { - return ['name:asc']; - }, + default: undefined, }, transformItems: { type: Function, diff --git a/src/components/NumericMenu.vue b/src/components/NumericMenu.vue index afbb13f7..c5a71aba 100644 --- a/src/components/NumericMenu.vue +++ b/src/components/NumericMenu.vue @@ -59,9 +59,7 @@ export default { }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/Pagination.vue b/src/components/Pagination.vue index c744e9af..1dcfbaec 100644 --- a/src/components/Pagination.vue +++ b/src/components/Pagination.vue @@ -182,7 +182,7 @@ export default { props: { padding: { type: Number, - default: 3, + default: undefined, validator(value) { return value > 0; }, diff --git a/src/components/QueryRuleContext.js b/src/components/QueryRuleContext.js index 8f650154..f93e9641 100644 --- a/src/components/QueryRuleContext.js +++ b/src/components/QueryRuleContext.js @@ -18,7 +18,7 @@ export default { transformRuleContexts: { type: Function, required: false, - default: ruleContexts => ruleContexts, + default: undefined, }, }, computed: { diff --git a/src/components/QueryRuleCustomData.vue b/src/components/QueryRuleCustomData.vue index 6e23856a..5689e005 100644 --- a/src/components/QueryRuleCustomData.vue +++ b/src/components/QueryRuleCustomData.vue @@ -36,7 +36,7 @@ export default { transformItems: { type: Function, required: false, - default: items => items, + default: undefined, }, }, computed: { diff --git a/src/components/RangeInput.vue b/src/components/RangeInput.vue index fb209f06..c4facb66 100644 --- a/src/components/RangeInput.vue +++ b/src/components/RangeInput.vue @@ -80,11 +80,13 @@ export default { min: { type: Number, required: false, + // @major: remove this default default: -Infinity, }, max: { type: Number, required: false, + // @major: remove this default default: Infinity, }, precision: { diff --git a/src/components/RatingMenu.vue b/src/components/RatingMenu.vue index 309be50d..06376bc1 100644 --- a/src/components/RatingMenu.vue +++ b/src/components/RatingMenu.vue @@ -99,7 +99,7 @@ export default { }, max: { type: Number, - default: 5, + default: undefined, }, }, computed: { diff --git a/src/components/RefinementList.vue b/src/components/RefinementList.vue index a88c4554..c40d43ab 100644 --- a/src/components/RefinementList.vue +++ b/src/components/RefinementList.vue @@ -122,12 +122,12 @@ export default { }, searchable: { type: Boolean, - default: false, + default: undefined, }, searchablePlaceholder: { - default: 'Search here…', type: String, required: false, + default: 'Search here…', }, operator: { default: 'or', @@ -138,28 +138,28 @@ export default { }, limit: { type: Number, - default: 10, required: false, + default: undefined, }, showMoreLimit: { type: Number, - default: 20, required: false, + default: undefined, }, showMore: { type: Boolean, - default: false, required: false, + default: false, }, sortBy: { type: [Array, Function], - default: () => ['isRefined', 'count:desc', 'name:asc'], required: false, + default: undefined, }, transformItems: { type: Function, - default: items => items, required: false, + default: undefined, }, }, data() { diff --git a/src/components/SortBy.vue b/src/components/SortBy.vue index b61113e0..83e76b58 100644 --- a/src/components/SortBy.vue +++ b/src/components/SortBy.vue @@ -48,9 +48,7 @@ export default { }, transformItems: { type: Function, - default(items) { - return items; - }, + default: undefined, }, }, computed: { diff --git a/src/components/ToggleRefinement.vue b/src/components/ToggleRefinement.vue index 2f82f54f..b9f95a4e 100644 --- a/src/components/ToggleRefinement.vue +++ b/src/components/ToggleRefinement.vue @@ -63,8 +63,6 @@ export default { off: { type: [String, Number, Boolean, Array], required: false, - // explicit otherwise Vue coerces the default value - // to false because of the `Boolean` prop type default: undefined, }, },