Restricted APIs: Remove type assertion from Betterer (#110548)
chore: remove type-assertion from betterer
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user