From 12f83be132271541dd3938cd69dd3b28aa6c6c52 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 30 Jun 2022 04:24:07 -0400 Subject: [PATCH] [v9.0.x] Chore: keep the betterer message generic (#51613) * keep the betterer message generic (#51563) (cherry picked from commit 67802e64e6158b8206401ed916c769902f1031a7) * update betterer Co-authored-by: Ashley Harrison --- .betterer.results | 52 +++++++++++++++++++++++------------------------ .betterer.ts | 9 +------- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/.betterer.results b/.betterer.results index 2f098ca8e1a..1c864159f0e 100644 --- a/.betterer.results +++ b/.betterer.results @@ -12790,82 +12790,82 @@ exports[`better eslint`] = { exports[`no undocumented stories`] = { value: `{ "packages/grafana-ui/src/components/Button/ToolbarButton.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a ToolbarButton.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/ButtonCascader/ButtonCascader.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a ButtonCascader.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a ColorPickerPopover.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a NamedColorsPalette.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/ColorPicker/SpectrumPalette.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a SpectrumPalette.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/DateTimePickers/RelativeTimeRangePicker/RelativeTimeRangePicker.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a RelativeTimeRangePicker.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/DateTimePickers/TimeOfDayPicker.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a TimeOfDayPicker.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a TimeRangePicker.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/DateTimePickers/TimeZonePicker.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a TimeZonePicker.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a WeekStartPicker.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/PageLayout/PageToolbar.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a PageToolbar.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/PanelChrome/PanelChrome.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a PanelChrome.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/PluginSignatureBadge/PluginSignatureBadge.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a PluginSignatureBadge.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/QueryField/QueryField.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a QueryField.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/RefreshPicker/RefreshPicker.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a RefreshPicker.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/SecretInput/SecretInput.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a SecretInput.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/Segment/Segment.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a Segment.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/Segment/SegmentAsync.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a SegmentAsync.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/Segment/SegmentInput.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a SegmentInput.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/StatsPicker/StatsPicker.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a StatsPicker.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/Tabs/Tabs.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a Tabs.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/ThemeDemos/ThemeDemo.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a ThemeDemo.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/Typography/Typography.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a Typography.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/VizLayout/VizLayout.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a VizLayout.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/VizLegend/VizLegend.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a VizLegend.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ], "packages/grafana-ui/src/components/VizTooltip/SeriesTable.story.tsx:5381": [ - [0, 0, 0, "No undocumented stories are allowed, please add a SeriesTable.mdx with some documentation.", "5381"] + [0, 0, 0, "No undocumented stories are allowed, please add an .mdx file with some documentation", "5381"] ] }` }; diff --git a/.betterer.ts b/.betterer.ts index ddcfce74eb8..9553bd4621f 100644 --- a/.betterer.ts +++ b/.betterer.ts @@ -26,14 +26,7 @@ function countUndocumentedStories() { // In this case the file contents don't matter: const file = fileTestResult.addFile(filePath, ''); // Add the issue to the first character of the file: - file.addIssue( - 0, - 0, - `No undocumented stories are allowed, please add a ${filePath.replace( - /^(.*\/)(\w+)\.story\.tsx$/, - '$2.mdx' - )} with some documentation.` - ); + file.addIssue(0, 0, 'No undocumented stories are allowed, please add an .mdx file with some documentation'); } }); });