Decouple: Make eslint rules stricter and don't allow import of anything from public (#81711)

Decouple: Make eslint rules stronger and don't allow import of anything from public
This commit is contained in:
Ivana Huckova 2024-02-01 16:37:29 +01:00 committed by GitHub
parent 7f1138dfe6
commit 3251b2e9b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -129,8 +129,8 @@
"zones": [
{
"target": "./public/app/plugins",
"from": "./public/app",
"except": ["./plugins"],
"from": "./public",
"except": ["./app/plugins"],
"message": "Core plugins are not allowed to depend on Grafana core packages"
}
]

View File

@ -2,7 +2,6 @@ import { render, screen } from '@testing-library/react';
import React from 'react';
import { openMenu } from 'react-select-event';
import { TemplateSrvStub } from '../../../../../test/specs/helpers';
import { MetricKind, ValueTypes } from '../types/query';
import { MetricDescriptor } from '../types/types';
@ -10,8 +9,6 @@ import { Aggregation, Props } from './Aggregation';
const props: Props = {
onChange: () => {},
// @ts-ignore
templateSrv: new TemplateSrvStub(),
metricDescriptor: {
valueType: '',
metricKind: '',
@ -19,6 +16,7 @@ const props: Props = {
crossSeriesReducer: '',
groupBys: [],
templateVariableOptions: [],
refId: 'A',
};
describe('Aggregation', () => {