Alerting: Fix wrong import (#108581)
* fix wrong import * add eslint rule to no-restricted-imports * eslint config update * eslint config update
This commit is contained in:
@@ -410,4 +410,22 @@ module.exports = [
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'grafana/no-extensions-imports',
|
||||
files: ['**/*.{ts,tsx,js}'],
|
||||
ignores: ['public/app/extensions/**/*'],
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['app/extensions', 'app/extensions/*'],
|
||||
message: 'Importing from app/extensions is not allowed',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
+2
-1
@@ -2,10 +2,11 @@ import { ComponentType, createElement } from 'react';
|
||||
|
||||
import { t } from '@grafana/i18n';
|
||||
import { withErrorBoundary } from '@grafana/ui';
|
||||
import { AIFeedbackOrigin } from 'app/extensions/alerting/AI/feedback/AIFeedbackComponent';
|
||||
|
||||
import { logError } from '../../Analytics';
|
||||
|
||||
export type AIFeedbackOrigin = 'alert-rule' | 'template' | 'triage';
|
||||
|
||||
export interface GenAIFeedbackButtonProps {
|
||||
origin: AIFeedbackOrigin;
|
||||
shouldShowFeedbackButton?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user