Skip to content

Commit 10e63c4

Browse files
authored
Add !importants count to complexity output (#74)
1 parent 5d3cdad commit 10e63c4

File tree

9 files changed

+12
-0
lines changed

9 files changed

+12
-0
lines changed

src/components/complexity.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ const Complexity = ({stats, verbose}) => (
7070
</Red>
7171
</Tr>
7272

73+
<Tr>
74+
<RowSpan>!importants</RowSpan>
75+
<FormatInteger value={stats['declarations.importants.total']} />
76+
</Tr>
77+
7378
<Tr marginTop={1}>
7479
<React.Fragment />
7580
<Th>Total</Th>

test/no-options/snapshots/spec.js.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Generated by [AVA](https://ava.li).
2626
‣ Selectors 1 1.00 1␊
2727
‣ Identifiers 1 1.00 1␊
2828
‣ Declarations 0 0.00 0␊
29+
‣ !importants 0␊
2930
3031
Total Unique Unique %␊
3132
‣ Browser hacks 0 0 0.0%␊
@@ -86,6 +87,7 @@ Generated by [AVA](https://ava.li).
8687
‣ Selectors 1 1.00 1␊
8788
‣ Identifiers 1 1.00 1␊
8889
‣ Declarations 0 0.00 0␊
90+
‣ !importants 0␊
8991
9092
Total Unique Unique %␊
9193
‣ Browser hacks 0 0 0.0%␊
10 Bytes
Binary file not shown.

test/option-format/snapshots/spec.js.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Generated by [AVA](https://ava.li).
3535
‣ Selectors 1 1.00 1␊
3636
‣ Identifiers 1 1.00 1␊
3737
‣ Declarations 0 0.00 0␊
38+
‣ !importants 0␊
3839
3940
Total Unique Unique %␊
4041
‣ Browser hacks 0 0 0.0%␊
8 Bytes
Binary file not shown.

test/option-verbose/snapshots/spec.js.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Generated by [AVA](https://ava.li).
1717
‣ Selectors 1 1.00 1␊
1818
‣ Identifiers 1 1.00 1␊
1919
‣ Declarations 1 1.00 1␊
20+
‣ !importants 0␊
2021
2122
Total Unique Unique %␊
2223
‣ Browser hacks 0 0 0.0%␊
@@ -113,6 +114,7 @@ Generated by [AVA](https://ava.li).
113114
‣ Selectors 1 1.00 1␊
114115
‣ Identifiers 1 1.00 1␊
115116
‣ Declarations 1 1.00 1␊
117+
‣ !importants 0␊
116118
117119
Total Unique Unique %␊
118120
‣ Browser hacks 0 0 0.0%␊
@@ -209,6 +211,7 @@ Generated by [AVA](https://ava.li).
209211
‣ Selectors 1 1.00 1␊
210212
‣ Identifiers 1 1.00 1␊
211213
‣ Declarations 0 0.00 0␊
214+
‣ !importants 0␊
212215
213216
Total Unique Unique %␊
214217
‣ Browser hacks 0 0 0.0%␊
-4 Bytes
Binary file not shown.

test/options-format-and-verbose/snapshots/spec.js.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Generated by [AVA](https://ava.li).
2323
‣ Selectors 1 1.00 1␊
2424
‣ Identifiers 1 1.00 1␊
2525
‣ Declarations 1 1.00 1␊
26+
‣ !importants 0␊
2627
2728
Total Unique Unique %␊
2829
‣ Browser hacks 0 0 0.0%␊
8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)