File tree 4 files changed +20
-66
lines changed
4 files changed +20
-66
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,9 @@ module.exports = {
35
35
{
36
36
type : 'object' ,
37
37
properties : {
38
- button : {
39
- default : optionDefaults . button ,
40
- type : 'boolean'
41
- } ,
42
- submit : {
43
- default : optionDefaults . submit ,
44
- type : 'boolean'
45
- } ,
46
- reset : {
47
- default : optionDefaults . reset ,
48
- type : 'boolean'
49
- }
38
+ button : { type : 'boolean' } ,
39
+ submit : { type : 'boolean' } ,
40
+ reset : { type : 'boolean' }
50
41
} ,
51
42
additionalProperties : false
52
43
}
Original file line number Diff line number Diff line change @@ -31,30 +31,12 @@ module.exports = {
31
31
{
32
32
type : 'object' ,
33
33
properties : {
34
- skipComments : {
35
- type : 'boolean' ,
36
- default : false
37
- } ,
38
- skipStrings : {
39
- type : 'boolean' ,
40
- default : true
41
- } ,
42
- skipTemplates : {
43
- type : 'boolean' ,
44
- default : false
45
- } ,
46
- skipRegExps : {
47
- type : 'boolean' ,
48
- default : false
49
- } ,
50
- skipHTMLAttributeValues : {
51
- type : 'boolean' ,
52
- default : false
53
- } ,
54
- skipHTMLTextContents : {
55
- type : 'boolean' ,
56
- default : false
57
- }
34
+ skipComments : { type : 'boolean' } ,
35
+ skipStrings : { type : 'boolean' } ,
36
+ skipTemplates : { type : 'boolean' } ,
37
+ skipRegExps : { type : 'boolean' } ,
38
+ skipHTMLAttributeValues : { type : 'boolean' } ,
39
+ skipHTMLTextContents : { type : 'boolean' }
58
40
} ,
59
41
additionalProperties : false
60
42
}
Original file line number Diff line number Diff line change @@ -28,26 +28,11 @@ module.exports = {
28
28
{
29
29
type : 'object' ,
30
30
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' }
51
36
} ,
52
37
additionalProperties : false
53
38
}
@@ -60,7 +45,7 @@ module.exports = {
60
45
} ,
61
46
/** @param {RuleContext } context */
62
47
create ( context ) {
63
- const options = context . options [ 0 ] || DEFAULT_OPTIONS
48
+ const options = Object . assign ( { } , DEFAULT_OPTIONS , context . options [ 0 ] )
64
49
const relevantMacros = new Set ( [
65
50
...Object . keys ( DEFAULT_OPTIONS ) ,
66
51
'withDefaults'
Original file line number Diff line number Diff line change @@ -82,8 +82,7 @@ module.exports = {
82
82
type : 'object' ,
83
83
properties : {
84
84
caseSensitive : {
85
- type : 'boolean' ,
86
- default : true
85
+ type : 'boolean'
87
86
} ,
88
87
ignoreChildrenOf : {
89
88
type : 'array'
@@ -93,16 +92,13 @@ module.exports = {
93
92
} ,
94
93
minKeys : {
95
94
type : 'integer' ,
96
- minimum : 2 ,
97
- default : 2
95
+ minimum : 2
98
96
} ,
99
97
natural : {
100
- type : 'boolean' ,
101
- default : false
98
+ type : 'boolean'
102
99
} ,
103
100
runOutsideVue : {
104
- type : 'boolean' ,
105
- default : true
101
+ type : 'boolean'
106
102
}
107
103
} ,
108
104
additionalProperties : false
@@ -137,7 +133,7 @@ module.exports = {
137
133
( options && options . ignoreChildrenOf ) || [ 'model' ]
138
134
)
139
135
const insensitive = options && options . caseSensitive === false
140
- const minKeys = options && options . minKeys
136
+ const minKeys = options ? .minKeys ?? 2
141
137
const natural = options && options . natural
142
138
const isValidOrder =
143
139
isValidOrders [ order + ( insensitive ? 'I' : '' ) + ( natural ? 'N' : '' ) ]
You can’t perform that action at this time.
0 commit comments