Alerting: Ignore `mocks` files from betterer checks (#103613)

pull/103772/head
Tom Ratcliffe 1 month ago committed by GitHub
parent 53126eb307
commit ddf3e62b8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .betterer.eslint.config.js
  2. 8
      .betterer.results
  3. 4
      public/app/features/alerting/unified/mocks.ts

@ -97,7 +97,7 @@ module.exports = [
},
{
files: ['**/*.{ts,tsx}'],
ignores: ['**/*.{test,spec}.{ts,tsx}', '**/__mocks__/**', '**/public/test/**'],
ignores: ['**/*.{test,spec}.{ts,tsx}', '**/__mocks__/**', '**/public/test/**', '**/mocks.{ts,tsx}'],
rules: {
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
},

@ -1440,14 +1440,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
],
"public/app/features/alerting/unified/mocks.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Do not use any type assertions.", "3"],
[0, 0, 0, "Do not use any type assertions.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
],
"public/app/features/alerting/unified/rule-list/components/AlertRuleListItem.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],

@ -10,7 +10,7 @@ import {
ReducerID,
} from '@grafana/data';
import { config } from '@grafana/runtime';
import { defaultDashboard } from '@grafana/schema';
import { DataQuery, defaultDashboard } from '@grafana/schema';
import { contextSrv } from 'app/core/services/context_srv';
import { MOCK_GRAFANA_ALERT_RULE_TITLE } from 'app/features/alerting/unified/mocks/server/handlers/grafanaRuler';
import { ExpressionQuery, ExpressionQueryType, ReducerMode } from 'app/features/expressions/types';
@ -125,7 +125,7 @@ export const mockRulerGrafanaRule = (
datasourceUid: '123',
refId: 'A',
queryType: 'huh',
model: {} as any,
model: {} as unknown as DataQuery,
},
],
...partialDef,

Loading…
Cancel
Save