File tree Expand file tree Collapse file tree 2 files changed +11
-30
lines changed
Expand file tree Collapse file tree 2 files changed +11
-30
lines changed Original file line number Diff line number Diff line change @@ -28,26 +28,11 @@ module.exports = {
2828 {
2929 type : 'object' ,
3030 properties : {
31- defineProps : {
32- type : 'string' ,
33- default : DEFAULT_OPTIONS . defineProps
34- } ,
35- defineEmits : {
36- type : 'string' ,
37- default : DEFAULT_OPTIONS . defineEmits
38- } ,
39- defineSlots : {
40- type : 'string' ,
41- default : DEFAULT_OPTIONS . defineSlots
42- } ,
43- useSlots : {
44- type : 'string' ,
45- default : DEFAULT_OPTIONS . useSlots
46- } ,
47- useAttrs : {
48- type : 'string' ,
49- default : DEFAULT_OPTIONS . useAttrs
50- }
31+ defineProps : { type : 'string' } ,
32+ defineEmits : { type : 'string' } ,
33+ defineSlots : { type : 'string' } ,
34+ useSlots : { type : 'string' } ,
35+ useAttrs : { type : 'string' }
5136 } ,
5237 additionalProperties : false
5338 }
@@ -60,7 +45,7 @@ module.exports = {
6045 } ,
6146 /** @param {RuleContext } context */
6247 create ( context ) {
63- const options = context . options [ 0 ] || DEFAULT_OPTIONS
48+ const options = Object . assign ( { } , DEFAULT_OPTIONS , context . options [ 0 ] )
6449 const relevantMacros = new Set ( [
6550 ...Object . keys ( DEFAULT_OPTIONS ) ,
6651 'withDefaults'
Original file line number Diff line number Diff line change @@ -82,8 +82,7 @@ module.exports = {
8282 type : 'object' ,
8383 properties : {
8484 caseSensitive : {
85- type : 'boolean' ,
86- default : true
85+ type : 'boolean'
8786 } ,
8887 ignoreChildrenOf : {
8988 type : 'array'
@@ -93,16 +92,13 @@ module.exports = {
9392 } ,
9493 minKeys : {
9594 type : 'integer' ,
96- minimum : 2 ,
97- default : 2
95+ minimum : 2
9896 } ,
9997 natural : {
100- type : 'boolean' ,
101- default : false
98+ type : 'boolean'
10299 } ,
103100 runOutsideVue : {
104- type : 'boolean' ,
105- default : true
101+ type : 'boolean'
106102 }
107103 } ,
108104 additionalProperties : false
@@ -137,7 +133,7 @@ module.exports = {
137133 ( options && options . ignoreChildrenOf ) || [ 'model' ]
138134 )
139135 const insensitive = options && options . caseSensitive === false
140- const minKeys = options && options . minKeys
136+ const minKeys = options ? .minKeys ?? 2
141137 const natural = options && options . natural
142138 const isValidOrder =
143139 isValidOrders [ order + ( insensitive ? 'I' : '' ) + ( natural ? 'N' : '' ) ]
You can’t perform that action at this time.
0 commit comments