Skip to content

Commit cd43308

Browse files
authored
Betterer: improve the deprecated layout components usage tracking (#85648)
1 parent 3294411 commit cd43308

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

.betterer.results

+55
Original file line numberDiff line numberDiff line change
@@ -823,10 +823,17 @@ exports[`better eslint`] = {
823823
"packages/grafana-ui/src/components/Alert/Toast.story.tsx:5381": [
824824
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
825825
],
826+
"packages/grafana-ui/src/components/Button/Button.story.tsx:5381": [
827+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
828+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "1"]
829+
],
826830
"packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx:5381": [
827831
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
828832
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
829833
],
834+
"packages/grafana-ui/src/components/ConfirmModal/ConfirmModal.tsx:5381": [
835+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
836+
],
830837
"packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx:5381": [
831838
[0, 0, 0, "Do not use any type assertions.", "0"]
832839
],
@@ -844,6 +851,15 @@ exports[`better eslint`] = {
844851
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
845852
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
846853
],
854+
"packages/grafana-ui/src/components/Dropdown/Dropdown.story.tsx:5381": [
855+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
856+
],
857+
"packages/grafana-ui/src/components/FilterPill/FilterPill.story.tsx:5381": [
858+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
859+
],
860+
"packages/grafana-ui/src/components/Forms/Checkbox.story.tsx:5381": [
861+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
862+
],
847863
"packages/grafana-ui/src/components/Forms/FieldArray.story.tsx:5381": [
848864
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
849865
],
@@ -873,12 +889,21 @@ exports[`better eslint`] = {
873889
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
874890
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"]
875891
],
892+
"packages/grafana-ui/src/components/Link/TextLink.story.tsx:5381": [
893+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
894+
],
876895
"packages/grafana-ui/src/components/MatchersUI/FieldValueMatcher.tsx:5381": [
877896
[0, 0, 0, "Do not use any type assertions.", "0"]
878897
],
879898
"packages/grafana-ui/src/components/MatchersUI/fieldMatchersUI.ts:5381": [
880899
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
881900
],
901+
"packages/grafana-ui/src/components/Menu/Menu.story.tsx:5381": [
902+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
903+
],
904+
"packages/grafana-ui/src/components/Modal/Modal.tsx:5381": [
905+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
906+
],
882907
"packages/grafana-ui/src/components/Modal/ModalsContext.tsx:5381": [
883908
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
884909
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@@ -888,13 +913,19 @@ exports[`better eslint`] = {
888913
"packages/grafana-ui/src/components/PageLayout/PageToolbar.story.tsx:5381": [
889914
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
890915
],
916+
"packages/grafana-ui/src/components/PanelChrome/PanelChrome.story.tsx:5381": [
917+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
918+
],
891919
"packages/grafana-ui/src/components/PanelChrome/PanelContext.ts:5381": [
892920
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
893921
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
894922
],
895923
"packages/grafana-ui/src/components/PanelChrome/index.ts:5381": [
896924
[0, 0, 0, "Do not use any type assertions.", "0"]
897925
],
926+
"packages/grafana-ui/src/components/SecretTextArea/SecretTextArea.tsx:5381": [
927+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
928+
],
898929
"packages/grafana-ui/src/components/Segment/SegmentSelect.tsx:5381": [
899930
[0, 0, 0, "Do not use any type assertions.", "0"]
900931
],
@@ -961,6 +992,9 @@ exports[`better eslint`] = {
961992
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
962993
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
963994
],
995+
"packages/grafana-ui/src/components/Table/CellActions.tsx:5381": [
996+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
997+
],
964998
"packages/grafana-ui/src/components/Table/Filter.tsx:5381": [
965999
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
9661000
],
@@ -1007,6 +1041,23 @@ exports[`better eslint`] = {
10071041
"packages/grafana-ui/src/components/Tags/Tag.tsx:5381": [
10081042
[0, 0, 0, "Do not use any type assertions.", "0"]
10091043
],
1044+
"packages/grafana-ui/src/components/TagsInput/TagsInput.story.tsx:5381": [
1045+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
1046+
],
1047+
"packages/grafana-ui/src/components/Text/Text.story.tsx:5381": [
1048+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
1049+
],
1050+
"packages/grafana-ui/src/components/ThemeDemos/EmotionPerfTest.tsx:5381": [
1051+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
1052+
],
1053+
"packages/grafana-ui/src/components/ThemeDemos/ThemeDemo.tsx:5381": [
1054+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
1055+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "1"]
1056+
],
1057+
"packages/grafana-ui/src/components/ToolbarButton/ToolbarButton.story.tsx:5381": [
1058+
[0, 0, 0, "\'HorizontalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
1059+
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "1"]
1060+
],
10101061
"packages/grafana-ui/src/components/ValuePicker/ValuePicker.tsx:5381": [
10111062
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"]
10121063
],
@@ -1024,6 +1075,10 @@ exports[`better eslint`] = {
10241075
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
10251076
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
10261077
],
1078+
"packages/grafana-ui/src/components/index.ts:5381": [
1079+
[0, 0, 0, "\'HorizontalGroup\' import from \'./Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
1080+
[0, 0, 0, "\'VerticalGroup\' import from \'./Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "1"]
1081+
],
10271082
"packages/grafana-ui/src/components/uPlot/Plot.tsx:5381": [
10281083
[0, 0, 0, "Do not use any type assertions.", "0"],
10291084
[0, 0, 0, "Do not use any type assertions.", "1"]

.betterer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function countEslintErrors() {
9191
{
9292
patterns: [
9393
{
94-
group: ['@grafana/ui*'],
94+
group: ['@grafana/ui*', '*/Layout/*'],
9595
importNames: ['Layout', 'HorizontalGroup', 'VerticalGroup'],
9696
message: 'Use Stack component instead.',
9797
},

0 commit comments

Comments
 (0)