@@ -39,220 +39,220 @@ export type PropTypesSnippet = SnippetMapping<PropTypesMapping>;
39
39
const propTypeArray : PropTypesSnippet = {
40
40
key : 'propTypeArray' ,
41
41
prefix : 'pta' ,
42
- body : [ 'PropTypes.array, ' ] ,
42
+ body : [ 'PropTypes.array' ] ,
43
43
description : 'Array prop type' ,
44
44
} ;
45
45
46
46
const propTypeArrayRequired : PropTypesSnippet = {
47
47
key : 'propTypeArrayRequired' ,
48
48
prefix : 'ptar' ,
49
- body : [ 'PropTypes.array.isRequired, ' ] ,
49
+ body : [ 'PropTypes.array.isRequired' ] ,
50
50
description : 'Array prop type required' ,
51
51
} ;
52
52
53
53
const propTypeBool : PropTypesSnippet = {
54
54
key : 'propTypeBool' ,
55
55
prefix : 'ptb' ,
56
- body : [ 'PropTypes.bool, ' ] ,
56
+ body : [ 'PropTypes.bool' ] ,
57
57
description : 'Bool prop type' ,
58
58
} ;
59
59
60
60
const propTypeBoolRequired : PropTypesSnippet = {
61
61
key : 'propTypeBoolRequired' ,
62
62
prefix : 'ptbr' ,
63
- body : [ 'PropTypes.bool.isRequired, ' ] ,
63
+ body : [ 'PropTypes.bool.isRequired' ] ,
64
64
description : 'Bool prop type required' ,
65
65
} ;
66
66
67
67
const propTypeFunc : PropTypesSnippet = {
68
68
key : 'propTypeFunc' ,
69
69
prefix : 'ptf' ,
70
- body : [ 'PropTypes.func, ' ] ,
70
+ body : [ 'PropTypes.func' ] ,
71
71
description : 'Func prop type' ,
72
72
} ;
73
73
74
74
const propTypeFuncRequired : PropTypesSnippet = {
75
75
key : 'propTypeFuncRequired' ,
76
76
prefix : 'ptfr' ,
77
- body : [ 'PropTypes.func.isRequired, ' ] ,
77
+ body : [ 'PropTypes.func.isRequired' ] ,
78
78
description : 'Func prop type required' ,
79
79
} ;
80
80
81
81
const propTypeNumber : PropTypesSnippet = {
82
82
key : 'propTypeNumber' ,
83
83
prefix : 'ptn' ,
84
- body : [ 'PropTypes.number, ' ] ,
84
+ body : [ 'PropTypes.number' ] ,
85
85
description : 'Number prop type' ,
86
86
} ;
87
87
88
88
const propTypeNumberRequired : PropTypesSnippet = {
89
89
key : 'propTypeNumberRequired' ,
90
90
prefix : 'ptnr' ,
91
- body : [ 'PropTypes.number.isRequired, ' ] ,
91
+ body : [ 'PropTypes.number.isRequired' ] ,
92
92
description : 'Number prop type required' ,
93
93
} ;
94
94
95
95
const propTypeObject : PropTypesSnippet = {
96
96
key : 'propTypeObject' ,
97
97
prefix : 'pto' ,
98
- body : [ 'PropTypes.object, ' ] ,
98
+ body : [ 'PropTypes.object' ] ,
99
99
description : 'Object prop type' ,
100
100
} ;
101
101
102
102
const propTypeObjectRequired : PropTypesSnippet = {
103
103
key : 'propTypeObjectRequired' ,
104
104
prefix : 'ptor' ,
105
- body : [ 'PropTypes.object.isRequired, ' ] ,
105
+ body : [ 'PropTypes.object.isRequired' ] ,
106
106
description : 'Object prop type required' ,
107
107
} ;
108
108
109
109
const propTypeString : PropTypesSnippet = {
110
110
key : 'propTypeString' ,
111
111
prefix : 'pts' ,
112
- body : [ 'PropTypes.string, ' ] ,
112
+ body : [ 'PropTypes.string' ] ,
113
113
description : 'String prop type' ,
114
114
} ;
115
115
116
116
const propTypeStringRequired : PropTypesSnippet = {
117
117
key : 'propTypeStringRequired' ,
118
118
prefix : 'ptsr' ,
119
- body : [ 'PropTypes.string.isRequired, ' ] ,
119
+ body : [ 'PropTypes.string.isRequired' ] ,
120
120
description : 'String prop type required' ,
121
121
} ;
122
122
123
123
const propTypeNode : PropTypesSnippet = {
124
124
key : 'propTypeNode' ,
125
125
prefix : 'ptnd' ,
126
- body : [ 'PropTypes.node, ' ] ,
126
+ body : [ 'PropTypes.node' ] ,
127
127
description :
128
128
'Anything that can be rendered: numbers, strings, elements or an array' ,
129
129
} ;
130
130
131
131
const propTypeNodeRequired : PropTypesSnippet = {
132
132
key : 'propTypeNodeRequired' ,
133
133
prefix : 'ptndr' ,
134
- body : [ 'PropTypes.node.isRequired, ' ] ,
134
+ body : [ 'PropTypes.node.isRequired' ] ,
135
135
description :
136
136
'Anything that can be rendered: numbers, strings, elements or an array required' ,
137
137
} ;
138
138
139
139
const propTypeElement : PropTypesSnippet = {
140
140
key : 'propTypeElement' ,
141
141
prefix : 'ptel' ,
142
- body : [ 'PropTypes.element, ' ] ,
142
+ body : [ 'PropTypes.element' ] ,
143
143
description : 'React element prop type' ,
144
144
} ;
145
145
146
146
const propTypeElementRequired : PropTypesSnippet = {
147
147
key : 'propTypeElementRequired' ,
148
148
prefix : 'ptelr' ,
149
- body : [ 'PropTypes.element.isRequired, ' ] ,
149
+ body : [ 'PropTypes.element.isRequired' ] ,
150
150
description : 'React element prop type required' ,
151
151
} ;
152
152
153
153
const propTypeInstanceOf : PropTypesSnippet = {
154
154
key : 'propTypeInstanceOf' ,
155
155
prefix : 'pti' ,
156
- body : [ 'PropTypes.instanceOf($0), ' ] ,
156
+ body : [ 'PropTypes.instanceOf($0)' ] ,
157
157
description : 'Is an instance of a class prop type' ,
158
158
} ;
159
159
160
160
const propTypeInstanceOfRequired : PropTypesSnippet = {
161
161
key : 'propTypeInstanceOfRequired' ,
162
162
prefix : 'ptir' ,
163
- body : [ 'PropTypes.instanceOf($0).isRequired, ' ] ,
163
+ body : [ 'PropTypes.instanceOf($0).isRequired' ] ,
164
164
description : 'Is an instance of a class prop type required' ,
165
165
} ;
166
166
167
167
const propTypeEnum : PropTypesSnippet = {
168
168
key : 'propTypeEnum' ,
169
169
prefix : 'pte' ,
170
- body : [ "PropTypes.oneOf(['$0']), " ] ,
170
+ body : [ "PropTypes.oneOf(['$0'])" ] ,
171
171
description : 'Prop type limited to specific values by treating it as an enum' ,
172
172
} ;
173
173
174
174
const propTypeEnumRequired : PropTypesSnippet = {
175
175
key : 'propTypeEnumRequired' ,
176
176
prefix : 'pter' ,
177
- body : [ "PropTypes.oneOf(['$0']).isRequired, " ] ,
177
+ body : [ "PropTypes.oneOf(['$0']).isRequired" ] ,
178
178
description :
179
179
'Prop type limited to specific values by treating it as an enum required' ,
180
180
} ;
181
181
182
182
const propTypeOneOfType : PropTypesSnippet = {
183
183
key : 'propTypeOneOfType' ,
184
184
prefix : 'ptet' ,
185
- body : [ 'PropTypes.oneOfType([' , ' $0' , ']), ' ] ,
185
+ body : [ 'PropTypes.oneOfType([' , ' $0' , '])' ] ,
186
186
description : 'An object that could be one of many types' ,
187
187
} ;
188
188
189
189
const propTypeOneOfTypeRequired : PropTypesSnippet = {
190
190
key : 'propTypeOneOfTypeRequired' ,
191
191
prefix : 'ptetr' ,
192
- body : [ 'PropTypes.oneOfType([' , ' $0' , ']).isRequired, ' ] ,
192
+ body : [ 'PropTypes.oneOfType([' , ' $0' , ']).isRequired' ] ,
193
193
description : 'An object that could be one of many types required' ,
194
194
} ;
195
195
196
196
const propTypeArrayOf : PropTypesSnippet = {
197
197
key : 'propTypeArrayOf' ,
198
198
prefix : 'ptao' ,
199
- body : [ 'PropTypes.arrayOf($0), ' ] ,
199
+ body : [ 'PropTypes.arrayOf($0)' ] ,
200
200
description : 'An array of a certain type' ,
201
201
} ;
202
202
203
203
const propTypeArrayOfRequired : PropTypesSnippet = {
204
204
key : 'propTypeArrayOfRequired' ,
205
205
prefix : 'ptaor' ,
206
- body : [ 'PropTypes.arrayOf($0).isRequired, ' ] ,
206
+ body : [ 'PropTypes.arrayOf($0).isRequired' ] ,
207
207
description : 'An array of a certain type required' ,
208
208
} ;
209
209
210
210
const propTypeObjectOf : PropTypesSnippet = {
211
211
key : 'propTypeObjectOf' ,
212
212
prefix : 'ptoo' ,
213
- body : [ 'PropTypes.objectOf($0), ' ] ,
213
+ body : [ 'PropTypes.objectOf($0)' ] ,
214
214
description : 'An object with property values of a certain type' ,
215
215
} ;
216
216
217
217
const propTypeObjectOfRequired : PropTypesSnippet = {
218
218
key : 'propTypeObjectOfRequired' ,
219
219
prefix : 'ptoor' ,
220
- body : [ 'PropTypes.objectOf($0).isRequired, ' ] ,
220
+ body : [ 'PropTypes.objectOf($0).isRequired' ] ,
221
221
description : 'An object with property values of a certain type required' ,
222
222
} ;
223
223
224
224
const propTypeShape : PropTypesSnippet = {
225
225
key : 'propTypeShape' ,
226
226
prefix : 'ptsh' ,
227
- body : [ 'PropTypes.shape({' , ' $0' , '}), ' ] ,
227
+ body : [ 'PropTypes.shape({' , ' $0' , '})' ] ,
228
228
description : 'An object taking on a particular shape' ,
229
229
} ;
230
230
231
231
const propTypeShapeRequired : PropTypesSnippet = {
232
232
key : 'propTypeShapeRequired' ,
233
233
prefix : 'ptshr' ,
234
- body : [ 'PropTypes.shape({' , ' $0' , '}).isRequired, ' ] ,
234
+ body : [ 'PropTypes.shape({' , ' $0' , '}).isRequired' ] ,
235
235
description : 'An object taking on a particular shape required' ,
236
236
} ;
237
237
238
238
const propTypeExact : PropTypesSnippet = {
239
239
key : 'propTypeExact' ,
240
240
prefix : 'ptex' ,
241
- body : [ 'PropTypes.exact({' , ' $0' , '}), ' ] ,
241
+ body : [ 'PropTypes.exact({' , ' $0' , '})' ] ,
242
242
description : 'An object with warnings on extra properties' ,
243
243
} ;
244
244
245
245
const propTypeExactRequired : PropTypesSnippet = {
246
246
key : 'propTypeExactRequired' ,
247
247
prefix : 'ptexr' ,
248
- body : [ 'PropTypes.exact({' , ' $0' , '}).isRequired, ' ] ,
248
+ body : [ 'PropTypes.exact({' , ' $0' , '}).isRequired' ] ,
249
249
description : 'An object with warnings on extra properties required' ,
250
250
} ;
251
251
252
252
const propTypeAny : PropTypesSnippet = {
253
253
key : 'propTypeAny' ,
254
254
prefix : 'ptany' ,
255
- body : [ 'PropTypes.any, ' ] ,
255
+ body : [ 'PropTypes.any' ] ,
256
256
description : 'Any prop type' ,
257
257
} ;
258
258
0 commit comments