chore(tsgo): clean up some more types, disable js typechecks
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
// @ts-check
|
||||
// TODO: Migrate to Typescript.
|
||||
// @ts-nocheck
|
||||
const emotionPlugin = require('@emotion/eslint-plugin');
|
||||
const restrictedGlobals = require('confusing-browser-globals');
|
||||
const importPlugin = require('eslint-plugin-import');
|
||||
|
||||
@@ -110,10 +110,9 @@ export function getInheritedProperties<T extends Route>(
|
||||
...propertiesParentInherited,
|
||||
} as const;
|
||||
|
||||
// @ts-expect-error we're using "keyof" for the property so the type checker can help us out but this makes the
|
||||
// reduce function signature unhappy
|
||||
const inherited = reduce(
|
||||
inheritableProperties,
|
||||
// @ts-expect-error we're using "keyof" for the property so the type checker can help us out but this makes the
|
||||
(inheritedProperties: InheritableProperties, parentValue, property: keyof InheritableProperties) => {
|
||||
const parentHasValue = parentValue != null;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { css } from '@emotion/css';
|
||||
import { useMemo, useState } from 'react';
|
||||
import { useMeasure } from 'react-use';
|
||||
import AutoSizer from 'react-virtualized-auto-sizer';
|
||||
import AutoSizer, { type Size } from 'react-virtualized-auto-sizer';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { Trans, t } from '@grafana/i18n';
|
||||
@@ -61,7 +61,7 @@ export function RawEditor({ db, query, onChange, onRunQuery, onValidate, queryTo
|
||||
const renderEditor = (standalone = false) => {
|
||||
return standalone ? (
|
||||
<AutoSizer>
|
||||
{({ width, height }) => {
|
||||
{({ width, height }: Size) => {
|
||||
return renderQueryEditor(width, height);
|
||||
}}
|
||||
</AutoSizer>
|
||||
|
||||
@@ -331,7 +331,7 @@ export function LokiContextUi(props: LokiContextUiProps) {
|
||||
>
|
||||
Widen the search
|
||||
</Label>
|
||||
<MultiSelect
|
||||
<MultiSelect<string>
|
||||
isLoading={loading}
|
||||
options={realLabels.map(contextFilterToSelectFilter)}
|
||||
value={realLabelsEnabled.map(contextFilterToSelectFilter)}
|
||||
@@ -372,7 +372,7 @@ export function LokiContextUi(props: LokiContextUiProps) {
|
||||
>
|
||||
Refine the search
|
||||
</Label>
|
||||
<MultiSelect
|
||||
<MultiSelect<string>
|
||||
isLoading={loading}
|
||||
options={parsedLabels.map(contextFilterToSelectFilter)}
|
||||
value={parsedLabelsEnabled.map(contextFilterToSelectFilter)}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @ts-check
|
||||
// @ts-nocheck
|
||||
const { parse } = require('ini');
|
||||
const { readFileSync, existsSync } = require('node:fs');
|
||||
const path = require('path');
|
||||
|
||||
Reference in New Issue
Block a user