From f1470de47879a8f655b6c3915cd4d15e7edb79f2 Mon Sep 17 00:00:00 2001 From: Tom Ratcliffe Date: Mon, 17 Mar 2025 12:54:12 +0000 Subject: [PATCH] Chore: Add eslint rule for empty files and tidy up (#102288) * Add eslint rule for empty files * Remove empty files --- eslint.config.js | 2 ++ public/app/core/context/ModalsProvider.ts | 0 public/app/core/services/SidecarService.ts | 0 .../unified/components/rule-editor/GrafanaRuleInspector.tsx | 0 public/app/features/trails/Breakdown/panelConfigs.ts | 0 public/test/helpers/fieldConfig.ts | 0 6 files changed, 2 insertions(+) delete mode 100644 public/app/core/context/ModalsProvider.ts delete mode 100644 public/app/core/services/SidecarService.ts delete mode 100644 public/app/features/alerting/unified/components/rule-editor/GrafanaRuleInspector.tsx delete mode 100644 public/app/features/trails/Breakdown/panelConfigs.ts delete mode 100644 public/test/helpers/fieldConfig.ts diff --git a/eslint.config.js b/eslint.config.js index 3b29e36521b..6bc4b27d7d3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -73,6 +73,7 @@ module.exports = [ 'jsx-a11y': jsxA11yPlugin, 'no-barrel-files': barrelPlugin, '@grafana': grafanaPlugin, + unicorn: unicornPlugin, }, settings: { @@ -129,6 +130,7 @@ module.exports = [ // Use typescript's no-redeclare for compatibility with overrides 'no-redeclare': 'off', '@typescript-eslint/no-redeclare': ['error'], + 'unicorn/no-empty-file': 'error', }, }, { diff --git a/public/app/core/context/ModalsProvider.ts b/public/app/core/context/ModalsProvider.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/public/app/core/services/SidecarService.ts b/public/app/core/services/SidecarService.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/public/app/features/alerting/unified/components/rule-editor/GrafanaRuleInspector.tsx b/public/app/features/alerting/unified/components/rule-editor/GrafanaRuleInspector.tsx deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/public/app/features/trails/Breakdown/panelConfigs.ts b/public/app/features/trails/Breakdown/panelConfigs.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/public/test/helpers/fieldConfig.ts b/public/test/helpers/fieldConfig.ts deleted file mode 100644 index e69de29bb2d..00000000000