diff --git a/src/commands/addons/addons-auth.ts b/src/commands/addons/addons-auth.ts index 7bd89e2d261..1423e5b08f1 100644 --- a/src/commands/addons/addons-auth.ts +++ b/src/commands/addons/addons-auth.ts @@ -22,7 +22,6 @@ export const addonsAuth = async (addonName: string, options: OptionValues, comma log() log(addon.auth_url) log() - // @ts-expect-error TS(2345) FIXME: Argument of type '{ url: any; }' is not assignable... Remove this comment to see the full error message await openBrowser({ url: addon.auth_url }) exit() } diff --git a/src/commands/functions/functions-create.ts b/src/commands/functions/functions-create.ts index a7ac3c6b8d3..58674e0a939 100644 --- a/src/commands/functions/functions-create.ts +++ b/src/commands/functions/functions-create.ts @@ -38,6 +38,7 @@ import type { HandleOnCompleteParams, HandleAddonDidInstallParams, } from './types.js' +import { $TSFixMe } from '../types.js' const require = createRequire(import.meta.url) @@ -119,7 +120,6 @@ const filterRegistry = function (registry: RegistryElement[], input: string) { * @param {string} lang * @param {'edge' | 'serverless'} funcType */ -//// @ts-expect-error TS(7006) FIXME: Parameter 'lang' implicitly has an 'any' type. const formatRegistryArrayForInquirer = async function (lang: string, funcType: FuncType) { const folders = await readdir(path.join(templatesDir, lang), { withFileTypes: true }) @@ -204,7 +204,7 @@ const pickTemplate = async function ({ language: languageFromFlag }: OptionValue language = languageFromPrompt } - let templatesForLanguage + let templatesForLanguage: $TSFixMe try { templatesForLanguage = await formatRegistryArrayForInquirer(language, funcType) @@ -226,7 +226,6 @@ const pickTemplate = async function ({ language: languageFromFlag }: OptionValue if (!input || input === '') { // show separators - // // @ts-expect-error TS(7005) FIXME: Variable 'templatesForLanguage' implicitly has an ... Remove this comment to see the full error message return [...templatesForLanguage, ...parsedSpecialCommands] } // only show filtered results sorted by score diff --git a/src/commands/integration/deploy.ts b/src/commands/integration/deploy.ts index b4437651cbd..6577f0a5568 100644 --- a/src/commands/integration/deploy.ts +++ b/src/commands/integration/deploy.ts @@ -52,22 +52,23 @@ function logScopeConfirmationMessage(localScopes: LocalTypeScope[], remoteScopes log(chalk.yellow('if you continue. This will only affect future installations of the integration.')) } -function formatScopesToWrite(registeredIntegrationScopes: RegisteredIntegrationScopes[]): ScopePermissions { - let scopesToWrite: ScopeWriter = {} +// @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message +function formatScopesToWrite(registeredIntegrationScopes) { + let scopesToWrite = {} for (const scope of registeredIntegrationScopes) { - const [resource, permission] = scope.split(':') as [ScopeResource | 'all', ScopePermission] + const [resource, permission] = scope.split(':') if (resource === 'all') { scopesToWrite = { all: true } break } else { - const resourceKey = resource - if (!scopesToWrite[resourceKey]) { - scopesToWrite[resourceKey] = [] - } - if (Array.isArray(scopesToWrite[resourceKey])) { - scopesToWrite[resourceKey].push(permission) + // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (!scopesToWrite[resource]) { + // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + scopesToWrite[resource] = [] } + // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + scopesToWrite[resource].push(permission) } } return scopesToWrite diff --git a/src/commands/open/open-admin.ts b/src/commands/open/open-admin.ts index bd34c37b205..68690eb4cc4 100644 --- a/src/commands/open/open-admin.ts +++ b/src/commands/open/open-admin.ts @@ -12,7 +12,6 @@ export const openAdmin = async (options: OptionValues, command: BaseCommand) => log(`Opening "${siteInfo.name}" site admin UI:`) log(`> ${siteInfo.admin_url}`) - // @ts-expect-error TS(2345) FIXME: Argument of type '{ url: any; }' is not assignable... Remove this comment to see the full error message await openBrowser({ url: siteInfo.admin_url }) exit() } diff --git a/src/commands/open/open-site.ts b/src/commands/open/open-site.ts index a4730a096fc..46969c38831 100644 --- a/src/commands/open/open-site.ts +++ b/src/commands/open/open-site.ts @@ -13,7 +13,6 @@ export const openSite = async (options: OptionValues, command: BaseCommand) => { log(`Opening "${siteInfo.name}" site url:`) log(`> ${url}`) - // @ts-expect-error TS(2345) FIXME: Argument of type '{ url: any; }' is not assignable... Remove this comment to see the full error message await openBrowser({ url }) exit() } diff --git a/src/commands/watch/watch.ts b/src/commands/watch/watch.ts index 2bf7a016878..9dcd508229c 100644 --- a/src/commands/watch/watch.ts +++ b/src/commands/watch/watch.ts @@ -36,7 +36,6 @@ const waitForBuildFinish = async function (api, siteId, spinner) { // @TODO implement build error messages into this if (!currentBuilds || currentBuilds.length === 0) { - // @ts-expect-error TS(2345) FIXME: Argument of type '{ spinner: any; }' is not assign... Remove this comment to see the full error message stopSpinner({ spinner }) return true } diff --git a/src/utils/dev.ts b/src/utils/dev.ts index e023152e66e..36bd59b79d4 100644 --- a/src/utils/dev.ts +++ b/src/utils/dev.ts @@ -13,12 +13,10 @@ import { GetAddonsInformationParams, GetAddonsInformationResult, getAddonsParams, - GetSiteAccount, GetSiteAccountParams, GetSiteInformationParams, ValidateSiteInfoParams, } from './types.js' -import { ExtendedNetlifyAPI } from '../types/api/api.js' // Possible sources of environment variables. For the purpose of printing log messages only. Order does not matter. const ENV_VAR_SOURCES = { diff --git a/src/utils/env/index.ts b/src/utils/env/index.ts index dc011c33a04..9a3704ae996 100644 --- a/src/utils/env/index.ts +++ b/src/utils/env/index.ts @@ -65,8 +65,7 @@ export const findValueInValues = (values, context) => * @param {enum} source - The source of the environment variable * @returns {object} The dictionary of env vars that match the given source */ -export const filterEnvBySource = (env: EnviromentVariables, source: EnvironmentVariableSource): ProcessedEnvVars => - // @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'. +export const filterEnvBySource = (env: EnviromentVariables, source: EnvironmentVariableSource) => Object.fromEntries(Object.entries(env).filter(([, variable]) => variable.sources[0] === source)) // Fetches data from Envelope diff --git a/src/utils/gh-auth.ts b/src/utils/gh-auth.ts index 2e6bce40f5b..6065152d99e 100644 --- a/src/utils/gh-auth.ts +++ b/src/utils/gh-auth.ts @@ -81,7 +81,6 @@ export const authWithNetlify = async () => { }) const url = `${webUI}/cli?${urlParams.toString()}` - // @ts-expect-error TS(2345) FIXME: Argument of type '{ url: string; }' is not assigna... Remove this comment to see the full error message await openBrowser({ url }) return deferredPromise