@@ -10,7 +10,7 @@ exports[`cli should not override config with cli defaults 1`] = `
10
10
"import * as React from 'react'
11
11
12
12
const SvgFile = () => (
13
- <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" role =\\"img\\" >
13
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\">
14
14
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
15
15
</svg>
16
16
)
@@ -35,13 +35,7 @@ exports[`cli should support --prettier-config as file 1`] = `
35
35
"import * as React from 'react'
36
36
37
37
const SvgFile = (props) => (
38
- <svg
39
- width = { 48 }
40
- height = { 1 }
41
- xmlns =\\"http://www.w3.org/2000/svg\\"
42
- role =\\"img\\"
43
- { ... props }
44
- >
38
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
45
39
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
46
40
</svg >
47
41
)
@@ -55,13 +49,7 @@ exports[`cli should support --prettier-config as json 1`] = `
55
49
"import * as React from 'react'
56
50
57
51
const SvgFile = (props) => (
58
- <svg
59
- width = { 48 }
60
- height = { 1 }
61
- xmlns =\\"http://www.w3.org/2000/svg\\"
62
- role =\\"img\\"
63
- { ... props }
64
- >
52
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
65
53
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
66
54
</svg >
67
55
)
@@ -75,13 +63,7 @@ exports[`cli should support --svgo-config as file 1`] = `
75
63
"import * as React from 'react'
76
64
77
65
const SvgFile = (props) => (
78
- <svg
79
- width = { 48 }
80
- height = { 1 }
81
- xmlns =\\"http://www.w3.org/2000/svg\\"
82
- role =\\"img\\"
83
- { ... props }
84
- >
66
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
85
67
<title >{ ' Rectangle 5' } </title >
86
68
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
87
69
</svg >
@@ -96,13 +78,7 @@ exports[`cli should support --svgo-config as json 1`] = `
96
78
"import * as React from 'react'
97
79
98
80
const SvgFile = (props) => (
99
- <svg
100
- width = { 48 }
101
- height = { 1 }
102
- xmlns =\\"http://www.w3.org/2000/svg\\"
103
- role =\\"img\\"
104
- { ... props }
105
- >
81
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
106
82
<title >{ ' Rectangle 5' } </title >
107
83
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
108
84
</svg >
@@ -169,13 +145,7 @@ exports[`cli should support stdin filepath 1`] = `
169
145
"import * as React from 'react'
170
146
171
147
const SvgFile = (props) => (
172
- <svg
173
- width = { 48 }
174
- height = { 1 }
175
- xmlns =\\"http://www.w3.org/2000/svg\\"
176
- role =\\"img\\"
177
- { ... props }
178
- >
148
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
179
149
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
180
150
</svg >
181
151
)
@@ -193,7 +163,6 @@ const SvgFile = ({ desc, descId, ...props }) => (
193
163
width = { 48 }
194
164
height = { 1 }
195
165
xmlns =\\"http://www.w3.org/2000/svg\\"
196
- role =\\"img\\"
197
166
aria-describedby = { descId }
198
167
{ ... props }
199
168
>
@@ -211,7 +180,7 @@ exports[`cli should support various args: --expand-props none 1`] = `
211
180
"import * as React from 'react'
212
181
213
182
const SvgFile = () => (
214
- <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" role =\\"img\\" >
183
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\">
215
184
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
216
185
</svg>
217
186
)
@@ -225,13 +194,7 @@ exports[`cli should support various args: --expand-props start 1`] = `
225
194
"import * as React from 'react'
226
195
227
196
const SvgFile = (props) => (
228
- <svg
229
- { ... props }
230
- width = { 48 }
231
- height = { 1 }
232
- xmlns =\\"http://www.w3.org/2000/svg\\"
233
- role =\\"img\\"
234
- >
197
+ <svg { ... props } width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\">
235
198
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
236
199
</svg>
237
200
)
@@ -250,7 +213,6 @@ const SvgFile = (props) => (
250
213
height =\\"1em\\"
251
214
viewBox =\\"0 0 48 1\\"
252
215
xmlns =\\"http://www.w3.org/2000/svg\\"
253
- role =\\"img\\"
254
216
{ ... props }
255
217
>
256
218
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
@@ -271,7 +233,6 @@ const SvgFile = (props) => (
271
233
height =\\"2em\\"
272
234
viewBox =\\"0 0 48 1\\"
273
235
xmlns =\\"http://www.w3.org/2000/svg\\"
274
- role =\\"img\\"
275
236
{ ... props }
276
237
>
277
238
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
@@ -292,7 +253,6 @@ const SvgFile = (props) => (
292
253
height = { 24 }
293
254
viewBox =\\"0 0 48 1\\"
294
255
xmlns =\\"http://www.w3.org/2000/svg\\"
295
- role =\\"img\\"
296
256
{ ... props }
297
257
>
298
258
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
@@ -306,13 +266,7 @@ export default SvgFile
306
266
307
267
exports [` cli should support various args: --jsx-runtime automatic 1` ] = `
308
268
"const SvgFile = (props) => (
309
- <svg
310
- width = { 48 }
311
- height = { 1 }
312
- xmlns =\\"http://www.w3.org/2000/svg\\"
313
- role =\\"img\\"
314
- { ... props }
315
- >
269
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
316
270
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
317
271
</svg >
318
272
)
@@ -326,13 +280,7 @@ exports[`cli should support various args: --jsx-runtime classic-preact 1`] = `
326
280
"import { h } from 'preact'
327
281
328
282
const SvgFile = (props) => (
329
- <svg
330
- width = { 48 }
331
- height = { 1 }
332
- xmlns =\\"http://www.w3.org/2000/svg\\"
333
- role =\\"img\\"
334
- { ... props }
335
- >
283
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
336
284
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
337
285
</svg >
338
286
)
@@ -347,7 +295,7 @@ exports[`cli should support various args: --native --expand-props none 1`] = `
347
295
import Svg, { Path } from 'react-native-svg'
348
296
349
297
const SvgFile = () => (
350
- <Svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" role =\\"img\\" >
298
+ <Svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\">
351
299
<Path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
352
300
</Svg>
353
301
)
@@ -367,7 +315,6 @@ const SvgFile = (props) => (
367
315
height = { 24 }
368
316
viewBox =\\"0 0 48 1\\"
369
317
xmlns =\\"http://www.w3.org/2000/svg\\"
370
- role =\\"img\\"
371
318
{ ... props }
372
319
>
373
320
<Path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
@@ -389,7 +336,6 @@ const SvgFile = (props, ref) => (
389
336
width = { 48 }
390
337
height = { 1 }
391
338
xmlns =\\"http://www.w3.org/2000/svg\\"
392
- role =\\"img\\"
393
339
ref = { ref }
394
340
{ ... props }
395
341
>
@@ -408,13 +354,7 @@ exports[`cli should support various args: --native 1`] = `
408
354
import Svg, { Path } from 'react-native-svg'
409
355
410
356
const SvgFile = (props) => (
411
- <Svg
412
- width = { 48 }
413
- height = { 1 }
414
- xmlns =\\"http://www.w3.org/2000/svg\\"
415
- role =\\"img\\"
416
- { ... props }
417
- >
357
+ <Svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
418
358
<Path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
419
359
</Svg >
420
360
)
@@ -428,12 +368,7 @@ exports[`cli should support various args: --no-dimensions 1`] = `
428
368
"import * as React from 'react'
429
369
430
370
const SvgFile = (props) => (
431
- <svg
432
- viewBox =\\"0 0 48 1\\"
433
- xmlns =\\"http://www.w3.org/2000/svg\\"
434
- role =\\"img\\"
435
- { ... props }
436
- >
371
+ <svg viewBox =\\"0 0 48 1\\" xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
437
372
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
438
373
</svg >
439
374
)
@@ -446,7 +381,7 @@ export default SvgFile
446
381
exports [` cli should support various args: --no-prettier 1` ] = `
447
382
"import * as React from \\ "react\\ ";
448
383
449
- const SvgFile = props => <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" role =\\"img\\" { ... props } ><path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" /></svg >;
384
+ const SvgFile = props => <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } ><path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" /></svg >;
450
385
451
386
export default SvgFile;
452
387
"
@@ -462,7 +397,6 @@ const SvgFile = (props) => (
462
397
viewBox =\\"0 0 48 1\\"
463
398
xmlns =\\"http://www.w3.org/2000/svg\\"
464
399
xmlnsXlink =\\"http://www.w3.org/1999/xlink\\"
465
- role =\\"img\\"
466
400
{ ... props }
467
401
>
468
402
<title >{ ' Rectangle 5' } </title >
@@ -502,7 +436,6 @@ const SvgFile = (props, ref) => (
502
436
width = { 48 }
503
437
height = { 1 }
504
438
xmlns =\\"http://www.w3.org/2000/svg\\"
505
- role =\\"img\\"
506
439
ref = { ref }
507
440
{ ... props }
508
441
>
@@ -520,13 +453,7 @@ exports[`cli should support various args: --replace-attr-values "#063855=current
520
453
"import * as React from 'react'
521
454
522
455
const SvgFile = (props) => (
523
- <svg
524
- width = { 48 }
525
- height = { 1 }
526
- xmlns =\\"http://www.w3.org/2000/svg\\"
527
- role =\\"img\\"
528
- { ... props }
529
- >
456
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
530
457
<path d =\\"M0 0h48v1H0z\\" fill =\\"currentColor\\" fillRule =\\"evenodd\\" />
531
458
</svg >
532
459
)
@@ -544,7 +471,6 @@ const SvgFile = (props) => (
544
471
width = { 48 }
545
472
height = { 1 }
546
473
xmlns =\\"http://www.w3.org/2000/svg\\"
547
- role =\\"img\\"
548
474
hidden = { true }
549
475
id =\\"hello\\"
550
476
{ ... props }
@@ -566,7 +492,6 @@ const SvgFile = ({ title, titleId, ...props }) => (
566
492
width = { 48 }
567
493
height = { 1 }
568
494
xmlns =\\"http://www.w3.org/2000/svg\\"
569
- role =\\"img\\"
570
495
aria-labelledby = { titleId }
571
496
{ ... props }
572
497
>
@@ -596,7 +521,6 @@ const SvgFile = (
596
521
width = { 48 }
597
522
height = { 1 }
598
523
xmlns =\\"http://www.w3.org/2000/svg\\"
599
- role =\\"img\\"
600
524
ref = { ref }
601
525
aria-describedby = { descId }
602
526
{ ... props }
@@ -628,7 +552,6 @@ const SvgFile = (
628
552
width = { 48 }
629
553
height = { 1 }
630
554
xmlns =\\"http://www.w3.org/2000/svg\\"
631
- role =\\"img\\"
632
555
ref = { ref }
633
556
aria-labelledby = { titleId }
634
557
{ ... props }
@@ -653,7 +576,6 @@ const SvgFile = (props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) => (
653
576
width = { 48 }
654
577
height = { 1 }
655
578
xmlns =\\"http://www.w3.org/2000/svg\\"
656
- role =\\"img\\"
657
579
ref = { ref }
658
580
{ ... props }
659
581
>
@@ -672,13 +594,7 @@ exports[`cli should support various args: --typescript 1`] = `
672
594
import { SVGProps } from 'react'
673
595
674
596
const SvgFile = (props: SVGProps<SVGSVGElement >) => (
675
- <svg
676
- width = { 48 }
677
- height = { 1 }
678
- xmlns =\\"http://www.w3.org/2000/svg\\"
679
- role =\\"img\\"
680
- { ... props }
681
- >
597
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
682
598
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
683
599
</svg >
684
600
)
@@ -732,13 +648,7 @@ exports[`cli should work with a simple file 1`] = `
732
648
"import * as React from 'react'
733
649
734
650
const SvgFile = (props) => (
735
- <svg
736
- width = { 48 }
737
- height = { 1 }
738
- xmlns =\\"http://www.w3.org/2000/svg\\"
739
- role =\\"img\\"
740
- { ... props }
741
- >
651
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
742
652
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
743
653
</svg >
744
654
)
@@ -752,13 +662,7 @@ exports[`cli should work with stdin 1`] = `
752
662
"import * as React from 'react'
753
663
754
664
const SvgComponent = (props) => (
755
- <svg
756
- width = { 48 }
757
- height = { 1 }
758
- xmlns =\\"http://www.w3.org/2000/svg\\"
759
- role =\\"img\\"
760
- { ... props }
761
- >
665
+ <svg width = { 48 } height = { 1 } xmlns =\\"http://www.w3.org/2000/svg\\" { ... props } >
762
666
<path d =\\"M0 0h48v1H0z\\" fill =\\"#063855\\" fillRule =\\"evenodd\\" />
763
667
</svg >
764
668
)
0 commit comments