Chore: Add codemod and betterer config to make barrel imports explicit (#80913)

* chore: add codemod for highlighting barrel imports

* style(frontend): add no-barrel-files plugin to betterer

* chore(betterer): update betterer file

* ci(frontend-metrics): track occurrences of barrel files being imported

* chore: clean up explicit barrel imports codemod script

* chore(codeowners): add explicit barrel imports script

* Add no-barrel-files plugin to betterer configuration

Co-Authored-By: LeventeBalogh <balogh.levente.hu@gmail.com>

---------

Co-authored-by: LeventeBalogh <balogh.levente.hu@gmail.com>
This commit is contained in:
Jack Westbrook 2024-04-15 16:36:19 +02:00 committed by GitHub
parent 453a75b767
commit 1dfd34ee79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 526 additions and 11 deletions

View File

@ -1151,6 +1151,15 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
],
"public/app/core/actions/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`updateNavIndex\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`updateConfigurationSubtitle\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`notifyApp\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`hideAppNotification\`)", "3"]
],
"public/app/core/components/AccessControl/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/core/components/AppChrome/TopBar/TopSearchBarCommandPaletteTrigger.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@ -1178,6 +1187,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "8"],
[0, 0, 0, "Do not use any type assertions.", "9"]
],
"public/app/core/components/LocalStorageValueProvider/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./LocalStorageValueProvider\`)", "0"]
],
"public/app/core/components/Login/LoginServiceButtons.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
@ -1282,6 +1294,19 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/core/config.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`config\`)", "0"]
],
"public/app/core/core.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`profiler\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`appEvents\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`colors\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`assignModelProperties\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`contextSrv\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`JsonExplorer\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`TimeSeries\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`updateLegendValues\`)", "7"]
],
"public/app/core/navigation/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -1381,6 +1406,11 @@ exports[`better eslint`] = {
"public/app/core/utils/richHistory.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/core/utils/richHistory.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`RichHistorySearchFilters\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`RichHistorySettings\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`SortOrder\`)", "2"]
],
"public/app/core/utils/ticks.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
@ -1696,6 +1726,9 @@ exports[`better eslint`] = {
"public/app/features/alerting/unified/components/expressions/ExpressionStatusIndicator.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/alerting/unified/components/extensions/AlertInstanceExtensionPointMenu.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`app/features/explore/extensions/ToolbarExtensionPointMenu\`)", "0"]
],
"public/app/features/alerting/unified/components/mute-timings/MuteTimingForm.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -2328,9 +2361,20 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "1"],
[0, 0, 0, "Styles should be written using objects.", "2"]
],
"public/app/features/auth-config/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/auth-config/utils/data.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/browse-dashboards/api/browseDashboardsAPI.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`@reduxjs/toolkit/query/react\`)", "0"]
],
"public/app/features/browse-dashboards/state/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/features/canvas/element.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -2338,6 +2382,12 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
],
"public/app/features/canvas/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./frame\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"]
],
"public/app/features/canvas/runtime/element.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
@ -2358,14 +2408,40 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "2"],
[0, 0, 0, "Styles should be written using objects.", "3"]
],
"public/app/features/canvas/types.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`Placement\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`Constraint\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`HorizontalConstraint\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`VerticalConstraint\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`BackgroundImageSize\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`LineConfig\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`BackgroundConfig\`)", "6"]
],
"public/app/features/connections/components/ConnectionsRedirectNotice/ConnectionsRedirectNotice.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
],
"public/app/features/connections/components/ConnectionsRedirectNotice/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/connections/pages/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./AddNewConnectionPage\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./DataSourceDetailsPage\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./DataSourcesListPage\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./DataSourceDashboardsPage\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./EditDataSourcePage\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./NewDataSourcePage\`)", "5"]
],
"public/app/features/connections/tabs/ConnectData/CardGrid/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/connections/tabs/ConnectData/CategoryHeader/CategoryHeader.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
],
"public/app/features/connections/tabs/ConnectData/CategoryHeader/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/connections/tabs/ConnectData/NoAccessModal/NoAccessModal.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@ -2377,6 +2453,15 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "7"],
[0, 0, 0, "Styles should be written using objects.", "8"]
],
"public/app/features/connections/tabs/ConnectData/NoAccessModal/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/connections/tabs/ConnectData/Search/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/connections/tabs/ConnectData/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/correlations/CorrelationsPage.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@ -2398,6 +2483,10 @@ exports[`better eslint`] = {
"public/app/features/correlations/Forms/CorrelationFormNavigation.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/features/correlations/components/Wizard/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
@ -2469,6 +2558,10 @@ exports[`better eslint`] = {
"public/app/features/dashboard-scene/settings/annotations/AnnotationSettingsList.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/features/dashboard-scene/settings/annotations/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsEdit\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsList\`)", "1"]
],
"public/app/features/dashboard-scene/settings/links/DashboardLinkList.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
@ -2481,6 +2574,13 @@ exports[`better eslint`] = {
"public/app/features/dashboard-scene/settings/variables/utils.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/dashboard-scene/settings/version-history/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./HistorySrv\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryTable\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryHeader\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryButtons\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./VersionHistoryComparison\`)", "4"]
],
"public/app/features/dashboard-scene/sharing/ShareExportTab.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
@ -2490,6 +2590,9 @@ exports[`better eslint`] = {
"public/app/features/dashboard-scene/utils/PanelModelCompatibilityWrapper.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/dashboard/components/AddLibraryPanelWidget/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./AddLibraryPanelWidget\`)", "0"]
],
"public/app/features/dashboard/components/AddWidgetModal/AddWidgetModal.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@ -2507,6 +2610,10 @@ exports[`better eslint`] = {
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
],
"public/app/features/dashboard/components/AnnotationSettings/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsEdit\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationSettingsList\`)", "1"]
],
"public/app/features/dashboard/components/DashExportModal/DashboardExporter.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -2527,9 +2634,15 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "8"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"]
],
"public/app/features/dashboard/components/DashExportModal/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DashboardExporter\`)", "0"]
],
"public/app/features/dashboard/components/DashNav/DashNavButton.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/dashboard/components/DashNav/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`DashNav\`)", "0"]
],
"public/app/features/dashboard/components/DashboardLoading/DashboardFailed.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@ -2556,12 +2669,18 @@ exports[`better eslint`] = {
"public/app/features/dashboard/components/DashboardRow/DashboardRow.test.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/dashboard/components/DashboardRow/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DashboardRow\`)", "0"]
],
"public/app/features/dashboard/components/DashboardSettings/ListNewButton.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/dashboard/components/DashboardSettings/VersionsSettings.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/features/dashboard/components/DashboardSettings/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DashboardSettings\`)", "0"]
],
"public/app/features/dashboard/components/DeleteDashboard/DeleteDashboardModal.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@ -2574,6 +2693,10 @@ exports[`better eslint`] = {
"public/app/features/dashboard/components/Inspector/PanelInspector.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/dashboard/components/LinksSettings/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./LinkSettingsEdit\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./LinkSettingsList\`)", "1"]
],
"public/app/features/dashboard/components/PanelEditor/DynamicConfigValueEditor.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@ -2757,6 +2880,10 @@ exports[`better eslint`] = {
"public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/dashboard/components/ShareModal/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./ShareModal\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/dashboard/components/SubMenu/AnnotationPicker.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -2937,6 +3064,10 @@ exports[`better eslint`] = {
"public/app/features/dashboard/state/getPanelPluginToMigrateTo.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/dashboard/state/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DashboardModel\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./PanelModel\`)", "1"]
],
"public/app/features/dashboard/state/initDashboard.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -2953,6 +3084,14 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
],
"public/app/features/dataframe-import/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/datasources/__mocks__/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/datasources/components/BasicSettings.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@ -3006,6 +3145,15 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/features/datasources/state/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "6"]
],
"public/app/features/datasources/state/navModel.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
@ -3092,6 +3240,24 @@ exports[`better eslint`] = {
"public/app/features/dimensions/editors/ValueMappingsEditor/ValueMappingsEditorModal.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/dimensions/editors/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"]
],
"public/app/features/dimensions/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "6"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"]
],
"public/app/features/dimensions/scale.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
@ -3307,6 +3473,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "7"],
[0, 0, 0, "Styles should be written using objects.", "8"]
],
"public/app/features/explore/TraceView/components/TracePageHeader/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./TracePageHeader\`)", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanBarRow.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@ -3444,6 +3613,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "6"],
[0, 0, 0, "Styles should be written using objects.", "7"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/TimelineHeaderRow/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./TimelineHeaderRow\`)", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/VirtualizedTraceView.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@ -3452,6 +3624,9 @@ exports[`better eslint`] = {
"public/app/features/explore/TraceView/components/TraceTimelineViewer/index.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/utils.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`../utils/date\`)", "0"]
],
"public/app/features/explore/TraceView/components/common/BreakableText.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@ -3473,6 +3648,21 @@ exports[`better eslint`] = {
"public/app/features/explore/TraceView/components/demo/trace-generators.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/explore/TraceView/components/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./TraceTimelineViewer\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./TracePageHeader\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./settings/SpanBarSettings\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./TraceTimelineViewer/SpanDetail/DetailState\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`./model/transform-trace-data\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`./utils/filter-spans\`)", "7"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "8"]
],
"public/app/features/explore/TraceView/components/model/ddg/types.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./PathElem\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`PathElem\`)", "1"]
],
"public/app/features/explore/TraceView/components/model/link-patterns.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -3494,9 +3684,24 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
],
"public/app/features/explore/TraceView/components/types/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./trace\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`../settings/SpanBarSettings\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./TTraceTimeline\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./TNil\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./links\`)", "4"]
],
"public/app/features/explore/TraceView/components/types/trace.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/explore/TraceView/components/utils/DraggableManager/demo/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DraggableManagerDemo\`)", "0"]
],
"public/app/features/explore/TraceView/components/utils/DraggableManager/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./EUpdateTypes\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./DraggableManager\`)", "2"]
],
"public/app/features/explore/TraceView/createSpanLink.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
@ -3504,6 +3709,9 @@ exports[`better eslint`] = {
"public/app/features/explore/extensions/ConfirmNavigationModal.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/features/explore/hooks/useStateSync/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./external.utils\`)", "0"]
],
"public/app/features/explore/spec/helper/setup.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
@ -3790,6 +3998,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
],
"public/app/features/migrate-to-cloud/api/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/org/OrgDetailsPage.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
@ -3828,18 +4039,34 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "2"],
[0, 0, 0, "Styles should be written using objects.", "3"]
],
"public/app/features/plugins/admin/__mocks__/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./remotePlugin.mock\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./localPlugin.mock\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/features/plugins/admin/components/Badges/PluginEnterpriseBadge.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/features/plugins/admin/components/Badges/PluginUpdateAvailableBadge.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/plugins/admin/components/Badges/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./PluginDisabledBadge\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginInstallBadge\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginEnterpriseBadge\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginUpdateAvailableBadge\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginAngularBadge\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginDeprecatedBadge\`)", "5"]
],
"public/app/features/plugins/admin/components/Badges/sharedStyles.ts:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/plugins/admin/components/GetStartedWithPlugin/GetStartedWithDataSource.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/plugins/admin/components/GetStartedWithPlugin/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./GetStartedWithPlugin\`)", "0"]
],
"public/app/features/plugins/admin/components/HorizontalGroup.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@ -3853,6 +4080,10 @@ exports[`better eslint`] = {
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
],
"public/app/features/plugins/admin/components/InstallControls/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./InstallControlsWarning\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./InstallControlsButton\`)", "1"]
],
"public/app/features/plugins/admin/components/PluginActions.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"],
@ -4058,6 +4289,10 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/features/search/service/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./searcher\`)", "1"]
],
"public/app/features/search/service/sql.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -4228,6 +4463,10 @@ exports[`better eslint`] = {
"public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/transformers/editors/CalculateFieldTransformerEditor/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`CalculateFieldTransformerEditor\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`calculateFieldTransformRegistryItem\`)", "1"]
],
"public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@ -4422,6 +4661,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/features/variables/pickers/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./OptionsPicker/OptionsPicker\`)", "0"]
],
"public/app/features/variables/pickers/shared/VariableLink.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -4513,11 +4755,13 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
],
"public/app/features/variables/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Do not re-export imported variable (\`@grafana/data\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`VariableHide\`)", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
],
"public/app/features/variables/utils.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
@ -4540,9 +4784,19 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/plugins/datasource/azuremonitor/azureMetadata/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/plugins/datasource/azuremonitor/azure_monitor/azure_monitor_datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/ArgQueryEditor/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./ArgQueryEditor\`)", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./LogsQueryEditor\`)", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/MetricsQueryEditor/DimensionFields.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
@ -4552,12 +4806,37 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/azuremonitor/components/QueryEditor/QueryEditor.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/QueryEditor/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./QueryEditor\`)", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/ResourceField/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./ResourceField\`)", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/ResourcePicker/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./ResourcePicker\`)", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/TracesQueryEditor/Filter.tsx:5381": [
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/TracesQueryEditor/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./TracesQueryEditor\`)", "0"]
],
"public/app/plugins/datasource/azuremonitor/components/VariableEditor/VariableEditor.test.tsx:5381": [
[0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/plugins/datasource/azuremonitor/types/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/plugins/datasource/azuremonitor/types/query.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`AzureQueryType\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "2"]
],
"public/app/plugins/datasource/azuremonitor/types/templateVariables.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "0"]
],
"public/app/plugins/datasource/azuremonitor/utils/messageFromError.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -4587,6 +4866,23 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloud-monitoring/components/VisualMetricQueryEditor.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/plugins/datasource/cloud-monitoring/components/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./Project\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./GroupBy\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./Alignment\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./LabelFilter\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./AnnotationsHelp\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./AlignmentFunction\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`./AliasBy\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`./Aggregation\`)", "7"],
[0, 0, 0, "Do not re-export imported variable (\`./MetricQueryEditor\`)", "8"],
[0, 0, 0, "Do not re-export imported variable (\`./SLOQueryEditor\`)", "9"],
[0, 0, 0, "Do not re-export imported variable (\`./MQLQueryEditor\`)", "10"],
[0, 0, 0, "Do not re-export imported variable (\`./Fields\`)", "11"],
[0, 0, 0, "Do not re-export imported variable (\`./VisualMetricQueryEditor\`)", "12"],
[0, 0, 0, "Do not re-export imported variable (\`./PeriodSelect\`)", "13"],
[0, 0, 0, "Do not re-export imported variable (\`./Preprocessor\`)", "14"]
],
"public/app/plugins/datasource/cloud-monitoring/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -4597,9 +4893,46 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/datasource/cloud-monitoring/types/query.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`QueryType\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "2"]
],
"public/app/plugins/datasource/cloud-monitoring/types/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/cloud-monitoring/webpack.config.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`config\`)", "0"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/cloudwatch-logs-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./empty\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./whitespaceQuery\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./commentOnlyQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./filterQuery\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`./newCommandQuery\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`./sortQuery\`)", "7"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/cloudwatch-sql-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineTwoQueries\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineIncompleteQueryWithoutNamespace\`)", "4"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/dynamic-label-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./afterLabelValue\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./insideLabelValue\`)", "1"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/metric-math-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./afterFunctionQuery\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgAfterSearchQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./thirdArgAfterSearchQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./withinStringQuery\`)", "5"]
],
"public/app/plugins/datasource/cloudwatch/components/CheatSheet/LogsCheatSheet.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -4616,12 +4949,24 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloudwatch/components/QueryEditor/MetricsQueryEditor/MetricsQueryEditor.test.tsx:5381": [
[0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"public/app/plugins/datasource/cloudwatch/components/QueryEditor/MetricsQueryEditor/SQLBuilderEditor/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./SQLBuilderEditor\`)", "0"]
],
"public/app/plugins/datasource/cloudwatch/components/QueryEditor/QueryEditor.test.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./MetricsQueryEditor/SQLCodeEditor\`)", "0"]
],
"public/app/plugins/datasource/cloudwatch/components/shared/LogGroups/LegacyLogGroupNamesSelection.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/plugins/datasource/cloudwatch/components/shared/MetricStatEditor/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./MetricStatEditor\`)", "0"]
],
"public/app/plugins/datasource/cloudwatch/datasource.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/cloudwatch/expressions.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./dataquery.gen\`)", "0"]
],
"public/app/plugins/datasource/cloudwatch/guards.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@ -4631,13 +4976,14 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/plugins/datasource/cloudwatch/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
],
"public/app/plugins/datasource/cloudwatch/utils/datalinks.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
@ -4646,6 +4992,11 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloudwatch/utils/logsRetry.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/dashboard/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./runSharedRequest\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./DashboardQueryEditor\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./types\`)", "2"]
],
"public/app/plugins/datasource/dashboard/runSharedRequest.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
@ -4801,6 +5152,10 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/elasticsearch/test-helpers/render.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/elasticsearch/types.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./dataquery.gen\`)", "1"]
],
"public/app/plugins/datasource/grafana-pyroscope-datasource/QueryEditor/LabelsEditor.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -4830,6 +5185,10 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Styles should be written using objects.", "2"]
],
"public/app/plugins/datasource/grafana-testdata-datasource/components/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./StreamingClientEditor\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./RandomWalkEditor\`)", "1"]
],
"public/app/plugins/datasource/grafana-testdata-datasource/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
@ -4837,6 +5196,9 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/grafana-testdata-datasource/runStreams.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/grafana-testdata-datasource/webpack.config.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`config\`)", "0"]
],
"public/app/plugins/datasource/grafana/components/AnnotationQueryEditor.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@ -5137,6 +5499,9 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/jaeger/_importedDependencies/model/transform-trace-data.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/jaeger/_importedDependencies/types/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./trace\`)", "0"]
],
"public/app/plugins/datasource/jaeger/_importedDependencies/types/trace.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -5244,6 +5609,14 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/loki/streaming.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/loki/types.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`LokiQueryDirection\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`LokiQueryType\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`SupportingQueryType\`)", "2"]
],
"public/app/plugins/datasource/mixed/module.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`MixedDatasource\`)", "0"]
],
"public/app/plugins/datasource/opentsdb/components/OpenTsdbQueryEditor.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -5305,6 +5678,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
],
"public/app/plugins/datasource/parca/webpack.config.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`config\`)", "0"]
],
"public/app/plugins/datasource/prometheus/components/PromExemplarField.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
@ -5571,6 +5947,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
],
"public/app/plugins/datasource/tempo/webpack.config.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`config\`)", "0"]
],
"public/app/plugins/datasource/zipkin/ConfigEditor.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@ -5586,6 +5965,9 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/zipkin/utils/transforms.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/zipkin/webpack.config.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`config\`)", "0"]
],
"public/app/plugins/panel/alertlist/AlertInstances.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -5642,6 +6024,16 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/panel/candlestick/types.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`Options\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`CandlestickColors\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`defaultCandlestickColors\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`CandleStyle\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`ColorStrategy\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`VizDisplayMode\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`CandlestickFieldMap\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`FieldConfig\`)", "7"]
],
"public/app/plugins/panel/canvas/components/CanvasTooltip.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
@ -5752,6 +6144,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/panel/geomap/types.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"]
],
"public/app/plugins/panel/geomap/utils/layers.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -5788,7 +6183,8 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/panel/heatmap/types.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/panel/heatmap/utils.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
@ -5829,6 +6225,9 @@ exports[`better eslint`] = {
"public/app/plugins/panel/logs/LogsPanel.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/panel/logs/types.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"]
],
"public/app/plugins/panel/nodeGraph/Edge.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@ -5883,10 +6282,16 @@ exports[`better eslint`] = {
"public/app/plugins/panel/nodeGraph/editor/ArcOptionsEditor.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/plugins/panel/nodeGraph/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./NodeGraph\`)", "0"]
],
"public/app/plugins/panel/nodeGraph/layout.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/panel/nodeGraph/types.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"]
],
"public/app/plugins/panel/nodeGraph/useContextMenu.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"]
@ -6045,6 +6450,9 @@ exports[`better eslint`] = {
"public/app/plugins/panel/xychart/v2/utils.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/sdk.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`loadPluginCss\`)", "0"]
],
"public/app/store/configureStore.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -6052,6 +6460,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/types/acl.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`OrgRole\`)", "0"]
],
"public/app/types/alerting.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -6086,6 +6497,30 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
[0, 0, 0, "Unexpected any. Specify a different type.", "12"]
],
"public/app/types/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "3"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "4"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "5"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "6"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "8"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "9"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "10"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "11"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "12"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "13"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "14"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "15"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "16"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "17"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "18"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "19"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "20"],
[0, 0, 0, "Do not re-export imported variable (\`CoreEvents\`)", "21"]
],
"public/app/types/jquery/jquery.d.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -6101,6 +6536,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/types/teams.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`TeamDTO\`)", "0"]
],
"public/app/types/unified-alerting-dto.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],

View File

@ -105,6 +105,16 @@ function countEslintErrors() {
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
};
const grafanaRules: Partial<Linter.RulesRecord> = {
...nonTestFilesRules,
'no-barrel-files/no-barrel-files': 'error',
};
const testFilesAndGrafanaRules: Partial<Linter.RulesRecord> = {
...baseRules,
'no-barrel-files/no-barrel-files': 'error',
};
// group files by eslint config file
// this will create two file groups for each eslint config file
// one for test files and one for non-test files
@ -117,10 +127,16 @@ function countEslintErrors() {
filePath.endsWith('.test.ts') ||
filePath.includes('__mocks__') ||
filePath.includes('public/test/');
const isGrafanaFile = filePath.includes('public/app/');
if (isTestFile) {
if (isGrafanaFile && isTestFile) {
configPath += '-test-grafana';
} else if (isGrafanaFile) {
configPath += '-grafana';
} else if (isTestFile) {
configPath += '-test';
}
if (!fileGroups[configPath]) {
fileGroups[configPath] = [];
}
@ -128,7 +144,16 @@ function countEslintErrors() {
}
for (const configPath of Object.keys(fileGroups)) {
const rules = configPath.endsWith('-test') ? baseRules : nonTestFilesRules;
let rules;
if (configPath.endsWith('-test-grafana')) {
rules = testFilesAndGrafanaRules;
} else if (configPath.endsWith('-test')) {
rules = baseRules;
} else if (configPath.endsWith('-grafana')) {
rules = grafanaRules;
} else {
rules = nonTestFilesRules;
}
// this is by far the slowest part of this code. It takes eslint about 2 seconds just to find the config
const linterOptions = (await cli.calculateConfigForFile(fileGroups[configPath][0])) as Linter.Config;
const runner = new ESLint({

View File

@ -1,7 +1,7 @@
{
"extends": ["@grafana/eslint-config"],
"root": true,
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y", "@grafana"],
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y", "@grafana", "no-barrel-files"],
"settings": {
"import/internal-regex": "^(app/)|(@grafana)",
"import/external-module-folders": ["node_modules", ".yarn"]

2
.github/CODEOWNERS vendored
View File

@ -376,7 +376,6 @@
/.levignore.js @grafana/plugins-platform-frontend
playwright.config.ts @grafana/plugins-platform-frontend
# public folder
/public/app/core/ @grafana/grafana-frontend-platform
/public/app/core/components/TimePicker/ @grafana/grafana-frontend-platform
@ -536,6 +535,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
/scripts/generate-icon-bundle.js @grafana/plugins-platform-frontend @grafana/grafana-frontend-platform
/scripts/generate-rtk-apis.ts @grafana/grafana-frontend-platform
/scripts/levitate-parse-json-report.js @grafana/plugins-platform-frontend
/scripts/codemods/explicit-barrel-imports.cjs @grafana/frontend-ops
/scripts/**/generate-transformations* @grafana/dataviz-squad
/scripts/webpack/ @grafana/frontend-ops

View File

@ -173,6 +173,7 @@
"eslint-plugin-jsdoc": "48.2.3",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-lodash": "7.4.0",
"eslint-plugin-no-barrel-files": "^1.1.0",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-scope": "^8.0.0",

View File

@ -11,6 +11,7 @@ ACCESSIBILITY_ERRORS="$(grep -oP '\"errors\":(\d+),' pa11y-ci-results.json | gre
DIRECTIVES="$(grep -r -o directive public/app/ | wc -l)"
CONTROLLERS="$(grep -r -oP 'class .*Ctrl' public/app/ | wc -l)"
LEGACY_FORMS="$(grep -r -oP 'LegacyForms;' public/app | wc -l)"
BARREL_IMPORTS="$(grep -r -oP '@todo: replace barrel import path' public/app | wc -l)"
CLASSNAME_PROP="$(grep -r -o -E --include="*.ts*" "\.*.className=\W.*\W.*" public/app | wc -l)"
EMOTION_IMPORTS="$(grep -r -o -E --include="*.ts*" --exclude="*.test*" "\{.*css.*\} from '@emotion/css'" public/app | wc -l)"
TS_FILES="$(find public/app -type f -name "*.ts*" -not -name "*.test*" | wc -l)"
@ -29,6 +30,7 @@ echo -e "Accessibility errors: $ACCESSIBILITY_ERRORS"
echo -e "Directives: $DIRECTIVES"
echo -e "Controllers: $CONTROLLERS"
echo -e "Legacy forms: $LEGACY_FORMS"
echo -e "Barrel imports: $BARREL_IMPORTS"
echo -e "Total bundle folder size: $TOTAL_BUNDLE"
echo -e "Total outdated dependencies: $OUTDATED_DEPENDENCIES"
echo -e "Low vulnerabilities: $LOW_VULNERABILITIES"

View File

@ -0,0 +1,39 @@
const fs = require('fs');
const path = require('path');
module.exports = function (fileInfo, api) {
const j = api.jscodeshift;
const root = j.withParser('tsx')(fileInfo.source);
const fileDir = path.dirname(fileInfo.path);
// Function to check if the path potentially points to a barrel file
const mightBeBarrelFileImport = (importPath) => {
const fullPath = path.join(fileDir, importPath);
if (fs.existsSync(fullPath) && fs.lstatSync(fullPath).isDirectory()) {
if (fs.existsSync(path.join(fullPath, 'index.ts')) || fs.existsSync(path.join(fullPath, 'index.js'))) {
return true;
}
}
return false;
};
// Udpate import declarations that import from barrel files
root
.find(j.ImportDeclaration)
.filter((path) => mightBeBarrelFileImport(path.node.source.value))
.forEach((path) => {
// Create a comment node
const comment = j.commentLine(' @todo: replace barrel import path');
// Attach the comment as a leading comment to the import declaration
if (!path.node.comments) {
path.node.comments = [];
}
path.node.comments.push(comment);
// Update the import path appending '/index'
path.node.source.value = path.node.source.value + '/index';
});
return root.toSource();
};

View File

@ -10789,7 +10789,7 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:6.21.0, @typescript-eslint/utils@npm:^6.0.0":
"@typescript-eslint/utils@npm:6.21.0, @typescript-eslint/utils@npm:^6.0.0, @typescript-eslint/utils@npm:^6.4.1":
version: 6.21.0
resolution: "@typescript-eslint/utils@npm:6.21.0"
dependencies:
@ -16734,6 +16734,15 @@ __metadata:
languageName: node
linkType: hard
"eslint-plugin-no-barrel-files@npm:^1.1.0":
version: 1.1.0
resolution: "eslint-plugin-no-barrel-files@npm:1.1.0"
dependencies:
"@typescript-eslint/utils": "npm:^6.4.1"
checksum: 10/f8a71fbe38e7af91a078d235b5c52d9eb06f5c0658af24714a684e3c66b60fe37f34ae984c3f23adb0916fd3271730fa149bc18ff528ec73f8bd4c3cfb55b3a1
languageName: node
linkType: hard
"eslint-plugin-react-hooks@npm:4.6.0":
version: 4.6.0
resolution: "eslint-plugin-react-hooks@npm:4.6.0"
@ -18754,6 +18763,7 @@ __metadata:
eslint-plugin-jsdoc: "npm:48.2.3"
eslint-plugin-jsx-a11y: "npm:6.8.0"
eslint-plugin-lodash: "npm:7.4.0"
eslint-plugin-no-barrel-files: "npm:^1.1.0"
eslint-plugin-react: "npm:7.34.1"
eslint-plugin-react-hooks: "npm:4.6.0"
eslint-scope: "npm:^8.0.0"