Skip to content

Commit 01369e6

Browse files
Chore: fix .eslintignore to only ignore folder paths at the root (grafana#72032)
fix eslintignore to only ignore folder paths at the root
1 parent 892a0d2 commit 01369e6

File tree

14 files changed

+153
-103
lines changed

14 files changed

+153
-103
lines changed

.betterer.results

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,6 +2682,23 @@ exports[`better eslint`] = {
26822682
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
26832683
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
26842684
],
2685+
"public/app/features/live/data/StreamingDataFrame.ts:5381": [
2686+
[0, 0, 0, "Do not use any type assertions.", "0"],
2687+
[0, 0, 0, "Do not use any type assertions.", "1"],
2688+
[0, 0, 0, "Do not use any type assertions.", "2"],
2689+
[0, 0, 0, "Do not use any type assertions.", "3"],
2690+
[0, 0, 0, "Do not use any type assertions.", "4"],
2691+
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
2692+
[0, 0, 0, "Do not use any type assertions.", "6"],
2693+
[0, 0, 0, "Do not use any type assertions.", "7"]
2694+
],
2695+
"public/app/features/live/data/amendTimeSeries.ts:5381": [
2696+
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
2697+
[0, 0, 0, "Do not use any type assertions.", "1"],
2698+
[0, 0, 0, "Do not use any type assertions.", "2"],
2699+
[0, 0, 0, "Do not use any type assertions.", "3"],
2700+
[0, 0, 0, "Do not use any type assertions.", "4"]
2701+
],
26852702
"public/app/features/live/index.ts:5381": [
26862703
[0, 0, 0, "Do not use any type assertions.", "0"]
26872704
],
@@ -4853,6 +4870,26 @@ exports[`better eslint`] = {
48534870
"public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [
48544871
[0, 0, 0, "Do not use any type assertions.", "0"]
48554872
],
4873+
"public/app/plugins/panel/geomap/layers/data/dayNightLayer.tsx:5381": [
4874+
[0, 0, 0, "Do not use any type assertions.", "0"]
4875+
],
4876+
"public/app/plugins/panel/geomap/layers/data/geojsonDynamic.ts:5381": [
4877+
[0, 0, 0, "Do not use any type assertions.", "0"]
4878+
],
4879+
"public/app/plugins/panel/geomap/layers/data/heatMap.tsx:5381": [
4880+
[0, 0, 0, "Do not use any type assertions.", "0"]
4881+
],
4882+
"public/app/plugins/panel/geomap/layers/data/markersLayer.tsx:5381": [
4883+
[0, 0, 0, "Do not use any type assertions.", "0"]
4884+
],
4885+
"public/app/plugins/panel/geomap/layers/data/photosLayer.tsx:5381": [
4886+
[0, 0, 0, "Do not use any type assertions.", "0"]
4887+
],
4888+
"public/app/plugins/panel/geomap/layers/data/routeLayer.tsx:5381": [
4889+
[0, 0, 0, "Do not use any type assertions.", "0"],
4890+
[0, 0, 0, "Do not use any type assertions.", "1"],
4891+
[0, 0, 0, "Do not use any type assertions.", "2"]
4892+
],
48564893
"public/app/plugins/panel/geomap/layers/registry.ts:5381": [
48574894
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
48584895
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]

.eslintignore

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
.yarn
44
build
55
compiled
6-
data
6+
/data
77
deployment_tools_config.json
8-
devenv
8+
/devenv
99
dist
10-
e2e/tmp
10+
/e2e/tmp
1111
node_modules
12-
pkg
13-
public/lib/monaco
14-
scripts/grafana-server/tmp
12+
/pkg
13+
/public/lib/monaco
14+
/scripts/grafana-server/tmp
1515
vendor
1616

1717
# TS generate from cue by cuetsy
1818
**/*.gen.ts
1919

2020
# Auto-generated internationalization files
21-
public/locales/_build/
22-
public/locales/**/*.js
21+
/public/locales/_build/
22+
/public/locales/**/*.js
2323

2424
# Auto-generated icon file
25-
packages/grafana-ui/src/components/Icon/iconBundle.ts
25+
/packages/grafana-ui/src/components/Icon/iconBundle.ts

public/app/features/live/data/StreamingDataFrame.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { DataFrame, DataFrameJSON, FieldType, getFieldDisplayName, reduceField, ReducerID } from '@grafana/data';
22
import { StreamingFrameAction, StreamingFrameOptions } from '@grafana/runtime';
3+
34
import { closestIdx, getStreamingFrameOptions, StreamingDataFrame } from './StreamingDataFrame';
45

56
describe('Streaming JSON', () => {

public/app/features/live/data/StreamingDataFrame.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { AlignedData } from 'uplot';
2+
13
import {
24
DataFrame,
35
DataFrameJSON,
@@ -15,7 +17,6 @@ import {
1517
import { join } from '@grafana/data/src/transformations/transformers/joinDataFrames';
1618
import { StreamingFrameAction, StreamingFrameOptions } from '@grafana/runtime/src/services/live';
1719
import { renderLegendFormat } from 'app/plugins/datasource/prometheus/legend';
18-
import { AlignedData } from 'uplot';
1920

2021
/**
2122
* Stream packet info is attached to StreamingDataFrames and indicate how many

public/app/features/live/data/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { DataQueryResponseData, isDataFrame } from '@grafana/data';
2+
23
import { StreamingDataFrame } from './StreamingDataFrame';
34

45
/**

public/app/plugins/panel/geomap/layers/data/dayNightLayer.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
import Feature from 'ol/Feature';
2+
import Map from 'ol/Map';
3+
import { Coordinate } from 'ol/coordinate';
4+
import { MultiLineString } from 'ol/geom';
5+
import Point from 'ol/geom/Point';
6+
import { Group as LayerGroup } from 'ol/layer';
7+
import VectorLayer from 'ol/layer/Vector';
8+
import { fromLonLat } from 'ol/proj';
9+
import VectorSource from 'ol/source/Vector';
10+
import { Fill, Stroke, Style, Circle } from 'ol/style';
11+
import DayNight from 'ol-ext/source/DayNight';
12+
import { Subscription } from 'rxjs';
13+
114
import {
215
MapLayerRegistryItem,
316
MapLayerOptions,
@@ -7,19 +20,6 @@ import {
720
DataHoverEvent,
821
DataHoverClearEvent,
922
} from '@grafana/data';
10-
import Map from 'ol/Map';
11-
import VectorLayer from 'ol/layer/Vector';
12-
import VectorSource from 'ol/source/Vector';
13-
import { Fill, Stroke, Style, Circle } from 'ol/style';
14-
import { Group as LayerGroup } from 'ol/layer';
15-
import Feature from 'ol/Feature';
16-
import Point from 'ol/geom/Point';
17-
18-
import DayNight from 'ol-ext/source/DayNight';
19-
import { fromLonLat } from 'ol/proj';
20-
import { Subscription } from 'rxjs';
21-
import { MultiLineString } from 'ol/geom';
22-
import { Coordinate } from 'ol/coordinate';
2323

2424
export enum ShowTime {
2525
From = 'from',

public/app/plugins/panel/geomap/layers/data/geojsonDynamic.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
import { FeatureLike } from 'ol/Feature';
2+
import OlMap from 'ol/Map';
3+
import { unByKey } from 'ol/Observable';
4+
import GeoJSON from 'ol/format/GeoJSON';
5+
import VectorLayer from 'ol/layer/Vector';
6+
import VectorSource from 'ol/source/Vector';
7+
import { Fill, Stroke, Style } from 'ol/style';
8+
import { ReplaySubject } from 'rxjs';
9+
import { map as rxjsmap, first } from 'rxjs/operators';
10+
111
import {
212
MapLayerRegistryItem,
313
MapLayerOptions,
@@ -6,25 +16,18 @@ import {
616
PluginState,
717
EventBus,
818
} from '@grafana/data';
9-
import OlMap from 'ol/Map';
10-
import VectorLayer from 'ol/layer/Vector';
11-
import VectorSource from 'ol/source/Vector';
12-
import GeoJSON from 'ol/format/GeoJSON';
13-
import { unByKey } from 'ol/Observable';
14-
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
15-
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
16-
import { Fill, Stroke, Style } from 'ol/style';
17-
import { FeatureLike } from 'ol/Feature';
19+
import { ComparisonOperation } from '@grafana/schema';
20+
import { findField } from 'app/features/dimensions';
21+
22+
import { StyleEditor } from '../../editor/StyleEditor';
23+
import { polyStyle } from '../../style/markers';
1824
import { defaultStyleConfig, StyleConfig, StyleConfigState } from '../../style/types';
1925
import { getStyleConfigState } from '../../style/utils';
20-
import { polyStyle } from '../../style/markers';
21-
import { StyleEditor } from '../../editor/StyleEditor';
22-
import { ReplaySubject } from 'rxjs';
23-
import { map as rxjsmap, first } from 'rxjs/operators';
26+
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
27+
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
2428
import { getLayerPropertyInfo } from '../../utils/getFeatures';
25-
import { findField } from 'app/features/dimensions';
2629
import { getStyleDimension, getPublicGeoJSONFiles } from '../../utils/utils';
27-
import { ComparisonOperation } from '@grafana/schema';
30+
2831

2932
export interface DynamicGeoJSONMapperConfig {
3033
// URL for a geojson file
@@ -87,7 +90,7 @@ export const dynamicGeoJSONLayer: MapLayerRegistryItem<DynamicGeoJSONMapperConfi
8790

8891
const key = source.on('change', () => {
8992
//one geojson loads
90-
if (source.getState() == 'ready') {
93+
if (source.getState() === 'ready') {
9194
unByKey(key);
9295
features.next(source.getFeatures());
9396
}

public/app/plugins/panel/geomap/layers/data/geojsonLayer.ts

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1+
import { FeatureLike } from 'ol/Feature';
2+
import Map from 'ol/Map';
3+
import { unByKey } from 'ol/Observable';
4+
import GeoJSON from 'ol/format/GeoJSON';
5+
import VectorLayer from 'ol/layer/Vector';
6+
import VectorSource from 'ol/source/Vector';
7+
import { Style } from 'ol/style';
8+
import { ReplaySubject } from 'rxjs';
9+
import { map as rxjsmap, first } from 'rxjs/operators';
10+
111
import {
212
MapLayerRegistryItem,
313
MapLayerOptions,
414
GrafanaTheme2,
515
PluginState,
616
EventBus,
717
} from '@grafana/data';
8-
import Map from 'ol/Map';
9-
import VectorLayer from 'ol/layer/Vector';
10-
import VectorSource from 'ol/source/Vector';
11-
import GeoJSON from 'ol/format/GeoJSON';
12-
import { unByKey } from 'ol/Observable';
13-
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
14-
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
15-
import { Style } from 'ol/style';
16-
import { FeatureLike } from 'ol/Feature';
18+
import { ComparisonOperation } from '@grafana/schema';
19+
1720
import { GeomapStyleRulesEditor } from '../../editor/GeomapStyleRulesEditor';
21+
import { StyleEditor } from '../../editor/StyleEditor';
22+
import { polyStyle } from '../../style/markers';
1823
import { defaultStyleConfig, StyleConfig, StyleConfigState } from '../../style/types';
1924
import { getStyleConfigState } from '../../style/utils';
20-
import { polyStyle } from '../../style/markers';
21-
import { StyleEditor } from '../../editor/StyleEditor';
22-
import { ReplaySubject } from 'rxjs';
23-
import { map as rxjsmap, first } from 'rxjs/operators';
25+
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
26+
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
2427
import { getLayerPropertyInfo } from '../../utils/getFeatures';
2528
import { getPublicGeoJSONFiles } from '../../utils/utils';
26-
import { ComparisonOperation } from '@grafana/schema';
29+
2730

2831
export interface GeoJSONMapperConfig {
2932
// URL for a geojson file
@@ -81,7 +84,7 @@ export const geojsonLayer: MapLayerRegistryItem<GeoJSONMapperConfig> = {
8184

8285
const key = source.on('change', () => {
8386
//one geojson loads
84-
if (source.getState() == 'ready') {
87+
if (source.getState() === 'ready') {
8588
unByKey(key);
8689
features.next(source.getFeatures());
8790
}

public/app/plugins/panel/geomap/layers/data/heatMap.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import Map from 'ol/Map';
2+
import { Point } from 'ol/geom';
3+
import * as layer from 'ol/layer';
4+
15
import {
26
EventBus,
37
FieldType,
@@ -7,14 +11,11 @@ import {
711
MapLayerRegistryItem,
812
PanelData,
913
} from '@grafana/data';
10-
import Map from 'ol/Map';
11-
import * as layer from 'ol/layer';
12-
import { getLocationMatchers } from 'app/features/geo/utils/location';
14+
import { ScaleDimensionConfig } from '@grafana/schema';
1315
import { getScaledDimension } from 'app/features/dimensions';
1416
import { ScaleDimensionEditor } from 'app/features/dimensions/editors';
1517
import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource';
16-
import { Point } from 'ol/geom';
17-
import { ScaleDimensionConfig } from '@grafana/schema';
18+
import { getLocationMatchers } from 'app/features/geo/utils/location';
1819

1920
// Configuration options for Heatmap overlays
2021
export interface HeatmapConfig {

public/app/plugins/panel/geomap/layers/data/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { markersLayer } from './markersLayer';
1+
import { dayNightLayer } from './dayNightLayer';
2+
import { dynamicGeoJSONLayer } from './geojsonDynamic';
23
import { geojsonLayer } from './geojsonLayer';
34
import { heatmapLayer } from './heatMap';
45
import { lastPointTracker } from './lastPointTracker';
5-
import { routeLayer } from './routeLayer';
6-
import { dayNightLayer } from './dayNightLayer';
7-
import { dynamicGeoJSONLayer } from './geojsonDynamic';
6+
import { markersLayer } from './markersLayer';
87
import { photosLayer } from './photosLayer';
8+
import { routeLayer } from './routeLayer';
99

1010
/**
1111
* Registry for layer handlers

0 commit comments

Comments
 (0)