Chore: Add no-duplicate-case eslint rule and fix violations (#97537)

* Add `no-duplicate-case` rule

* Fix basic duplicated cases

* Fix duplicated translations case

* Fix alerting case
This commit is contained in:
Tom Ratcliffe 2024-12-11 17:33:31 +00:00 committed by GitHub
parent c5e8e71ee3
commit 084aad0b84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 2 additions and 10 deletions

View File

@ -85,6 +85,7 @@ module.exports = [
},
rules: {
'no-duplicate-case': 'error',
'@grafana/no-border-radius-literal': 'error',
'@grafana/no-unreduced-motion': 'error',
'react/prop-types': 'off',

View File

@ -153,8 +153,6 @@ export function getNavTitle(navId: string | undefined) {
return t('nav.slo.title', 'SLO');
case 'plugin-page-k6-app':
return t('nav.k6.title', 'Performance');
case 'monitoring':
return t('nav.observability.title', 'Observability');
case 'plugin-page-grafana-k8s-app':
return t('nav.kubernetes.title', 'Kubernetes');
case 'plugin-page-grafana-dbo11y-app':

View File

@ -44,7 +44,7 @@ function useExpressionsCache() {
// We want to use the same value for Reduce, Resample and Threshold
case ExpressionQueryType.reduce:
case ExpressionQueryType.resample:
case ExpressionQueryType.resample:
case ExpressionQueryType.threshold:
expressionCache.current.reduce = value;
expressionCache.current.resample = value;
expressionCache.current.threshold = value;

View File

@ -82,7 +82,6 @@ function parseKeyValuePairs(raw: string): Record<string, string> {
case `'`:
// whitespace
case ` `:
case `\n`:
case `\t`:
case `\r`:
case `\n`:

View File

@ -2203,9 +2203,6 @@
"new-folder": {
"title": "New folder"
},
"observability": {
"title": "Observability"
},
"oncall": {
"title": "OnCall"
},

View File

@ -2203,9 +2203,6 @@
"new-folder": {
"title": "Ńęŵ ƒőľđęř"
},
"observability": {
"title": "Øþşęřväþįľįŧy"
},
"oncall": {
"title": "ØʼnCäľľ"
},