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
pull/81707/head^2
Ivana Huckova 1 year ago committed by GitHub
parent 7f1138dfe6
commit 3251b2e9b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      .eslintrc
  2. 4
      public/app/plugins/datasource/cloud-monitoring/components/Aggregation.test.tsx

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

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

Loading…
Cancel
Save