diff --git a/global.d.ts b/global.d.ts deleted file mode 100644 index a30910afe5..0000000000 --- a/global.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright 2021, SumUp Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -declare module '*.module.css' { - const classes: Record; - // biome-ignore lint/style/noDefaultExport: - export default classes; -} diff --git a/packages/circuit-ui/types/global.d.ts b/packages/circuit-ui/types/global.d.ts index d057a4069e..42e36234c5 100644 --- a/packages/circuit-ui/types/global.d.ts +++ b/packages/circuit-ui/types/global.d.ts @@ -13,6 +13,8 @@ * limitations under the License. */ +/// + import type { Theme as CircuitTheme } from '@sumup-oss/design-tokens'; import 'react'; diff --git a/packages/circuit-ui/util/i18n.ts b/packages/circuit-ui/util/i18n.ts index 5bc764c1ab..faca7c4a05 100644 --- a/packages/circuit-ui/util/i18n.ts +++ b/packages/circuit-ui/util/i18n.ts @@ -114,7 +114,8 @@ export function transformModulesToTranslations< const { default: unused, ...strings } = exports; const matches = importPath.match(/[a-z]{2}-[A-Z]{2}/); - // @ts-expect-error This environment variable is set by Vite. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore This is fine, but ESLint complains because it's configured for CJS at the project root. if (import.meta.env.DEV && !matches) { throw new Error( `Failed to extract a locale from the import path: ${importPath}`, @@ -124,7 +125,8 @@ export function transformModulesToTranslations< // biome-ignore lint/style/noNonNullAssertion: const locale = matches![0] as SupportedLocale; - // @ts-expect-error This environment variable is set by Vite. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore This is fine, but ESLint complains because it's configured for CJS at the project root. if (import.meta.env.DEV && !SUPPORTED_LOCALES.includes(locale)) { throw new Error(`Unsupported locale: ${importPath}`); } @@ -134,8 +136,8 @@ export function transformModulesToTranslations< }, {} as Translations, ); - - // @ts-expect-error This environment variable is set by Vite. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore This is fine, but ESLint complains because it's configured for CJS at the project root. if (import.meta.env.DEV) { SUPPORTED_LOCALES.forEach((locale) => { if (!translations[locale]) {