Restricted APIs: Remove type assertion from Betterer (#110548)

chore: remove type-assertion from betterer
This commit is contained in:
Levente Balogh
2025-09-04 06:50:09 +02:00
committed by GitHub
parent 4f70b93ca6
commit c7b3662d85
2 changed files with 1 additions and 3 deletions
-3
View File
@@ -31,9 +31,6 @@ exports[`better eslint`] = {
"packages/grafana-alerting/src/grafana/notificationPolicies/utils.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"packages/grafana-data/src/context/plugins/RestrictedGrafanaApis.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"packages/grafana-data/src/dataframe/ArrayDataFrame.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@@ -35,6 +35,7 @@ export function RestrictedGrafanaApisContextProvider(props: PropsWithChildren<Pr
const allowedApis = useMemo(() => {
const allowedApis: RestrictedGrafanaApisContextType = {};
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
for (const api of Object.keys(apis) as Array<keyof RestrictedGrafanaApisContextType>) {
if (
apiAllowList &&