diff --git a/eslint.config.js b/eslint.config.js
index 7c1b5d23fb4..17be1ebc4e0 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -249,6 +249,7 @@ module.exports = [
name: 'grafana/alerting-overrides',
plugins: {
unicorn: unicornPlugin,
+ react: reactPlugin,
},
files: ['public/app/features/alerting/**/*.{ts,tsx,js,jsx}'],
rules: {
@@ -256,6 +257,7 @@ module.exports = [
'dot-notation': 'error',
'prefer-const': 'error',
'react/no-unused-prop-types': 'error',
+ 'react/self-closing-comp': 'error',
'unicorn/no-unused-properties': 'error',
},
},
diff --git a/public/app/features/alerting/unified/components/permissions/ManagePermissions.tsx b/public/app/features/alerting/unified/components/permissions/ManagePermissions.tsx
index 6bbe527fafd..aa82b4b794c 100644
--- a/public/app/features/alerting/unified/components/permissions/ManagePermissions.tsx
+++ b/public/app/features/alerting/unified/components/permissions/ManagePermissions.tsx
@@ -30,7 +30,7 @@ export const ManagePermissionsDrawer = ({
const defaultTitle = t('alerting.manage-permissions.title', 'Manage permissions');
return (
-
+
);
};
diff --git a/public/app/features/alerting/unified/components/receivers/TemplateForm.tsx b/public/app/features/alerting/unified/components/receivers/TemplateForm.tsx
index d9304ae90c6..96ca2dedd46 100644
--- a/public/app/features/alerting/unified/components/receivers/TemplateForm.tsx
+++ b/public/app/features/alerting/unified/components/receivers/TemplateForm.tsx
@@ -324,7 +324,7 @@ export const TemplateForm = ({ originalTemplate, prefill, alertmanager }: Props)
{isGrafanaAlertManager && (
<>
-
+
{
- |
+ |
Template group |
{isExpanded && (
- |
+ |
>
-
+
{alerts.length > 0 && (
Review alert data to add to the payload:
diff --git a/public/app/features/alerting/unified/components/receivers/form/fields/KeyValueMapInput.tsx b/public/app/features/alerting/unified/components/receivers/form/fields/KeyValueMapInput.tsx
index 0bd18538cf1..5a1bccdd34e 100644
--- a/public/app/features/alerting/unified/components/receivers/form/fields/KeyValueMapInput.tsx
+++ b/public/app/features/alerting/unified/components/receivers/form/fields/KeyValueMapInput.tsx
@@ -47,7 +47,7 @@ export const KeyValueMapInput = ({ value, onChange, readOnly = false }: Props) =
| Name |
Value |
- {!readOnly && | }
+ {!readOnly && | }
|
diff --git a/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/simplifiedRouting/AlertManagerRouting.tsx b/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/simplifiedRouting/AlertManagerRouting.tsx
index 521a4c8e7c5..1d6b7c0b3f3 100644
--- a/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/simplifiedRouting/AlertManagerRouting.tsx
+++ b/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/simplifiedRouting/AlertManagerRouting.tsx
@@ -40,13 +40,13 @@ export function AlertManagerManualRouting({ alertManager }: AlertManagerManualRo
return (
-
+
Alertmanager:

{alertManagerName}
-
+
diff --git a/public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationPreviewByAlertManager.tsx b/public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationPreviewByAlertManager.tsx
index 813187556cb..ddf78bef3fe 100644
--- a/public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationPreviewByAlertManager.tsx
+++ b/public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationPreviewByAlertManager.tsx
@@ -49,13 +49,13 @@ function NotificationPreviewByAlertManager({
{!onlyOneAM && (
-
+
Alertmanager:

{alertManagerSource.name}
-
+
)}
diff --git a/public/app/features/alerting/unified/components/rules/Filter/RulesFilter.v2.tsx b/public/app/features/alerting/unified/components/rules/Filter/RulesFilter.v2.tsx
index 7faa69f1f83..1c682cc689e 100644
--- a/public/app/features/alerting/unified/components/rules/Filter/RulesFilter.v2.tsx
+++ b/public/app/features/alerting/unified/components/rules/Filter/RulesFilter.v2.tsx
@@ -84,7 +84,7 @@ const FilterOptions = () => {
-
+