Alerting: Ignore mocks files from betterer checks (#103613)
This commit is contained in:
@@ -97,7 +97,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
files: ['**/*.{ts,tsx}'],
|
files: ['**/*.{ts,tsx}'],
|
||||||
ignores: ['**/*.{test,spec}.{ts,tsx}', '**/__mocks__/**', '**/public/test/**'],
|
ignores: ['**/*.{test,spec}.{ts,tsx}', '**/__mocks__/**', '**/public/test/**', '**/mocks.{ts,tsx}'],
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
|
'@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, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
|
[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": [
|
"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"]
|
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
ReducerID,
|
ReducerID,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
import { config } from '@grafana/runtime';
|
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 { contextSrv } from 'app/core/services/context_srv';
|
||||||
import { MOCK_GRAFANA_ALERT_RULE_TITLE } from 'app/features/alerting/unified/mocks/server/handlers/grafanaRuler';
|
import { MOCK_GRAFANA_ALERT_RULE_TITLE } from 'app/features/alerting/unified/mocks/server/handlers/grafanaRuler';
|
||||||
import { ExpressionQuery, ExpressionQueryType, ReducerMode } from 'app/features/expressions/types';
|
import { ExpressionQuery, ExpressionQueryType, ReducerMode } from 'app/features/expressions/types';
|
||||||
@@ -125,7 +125,7 @@ export const mockRulerGrafanaRule = (
|
|||||||
datasourceUid: '123',
|
datasourceUid: '123',
|
||||||
refId: 'A',
|
refId: 'A',
|
||||||
queryType: 'huh',
|
queryType: 'huh',
|
||||||
model: {} as any,
|
model: {} as unknown as DataQuery,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
...partialDef,
|
...partialDef,
|
||||||
|
|||||||
Reference in New Issue
Block a user