mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: typing fixes (#76859)
This commit is contained in:
parent
f5758e9f4b
commit
bdae561a2d
@ -689,11 +689,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Styles should be written using objects.", "2"],
|
||||
[0, 0, 0, "Styles should be written using objects.", "3"]
|
||||
],
|
||||
"packages/grafana-plugin-configs/webpack.config.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
],
|
||||
"packages/grafana-runtime/src/analytics/types.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
|
@ -20,7 +20,7 @@ function skipFiles(f: string): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
const config = async (env: any): Promise<Configuration> => {
|
||||
const config = async (env: Record<string, unknown>): Promise<Configuration> => {
|
||||
const pluginJson = getPluginJson();
|
||||
const baseConfig: Configuration = {
|
||||
cache: {
|
||||
@ -70,8 +70,8 @@ const config = async (env: any): Promise<Configuration> => {
|
||||
// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
|
||||
({ request }, callback) => {
|
||||
const prefix = 'grafana/';
|
||||
const hasPrefix = (request: any) => request.indexOf(prefix) === 0;
|
||||
const stripPrefix = (request: any) => request.substr(prefix.length);
|
||||
const hasPrefix = (request?: string) => request?.indexOf(prefix) === 0;
|
||||
const stripPrefix = (request?: string) => request?.substr(prefix.length);
|
||||
|
||||
if (hasPrefix(request)) {
|
||||
return callback(undefined, stripPrefix(request));
|
||||
|
Loading…
Reference in New Issue
Block a user