import type { Rule, Scope } from 'eslint'; import type { CallExpression } from 'estree'; type Callee = CallExpression['callee']; type Reference = Scope.Reference; export type ImportSource = string; export type SupportedNameChecker = (nodeToCheck: Callee, referencesInScope: Reference[], importSources: ImportSource[]) => boolean; /** * By default all known import sources are checked against. */ export declare const DEFAULT_IMPORT_SOURCES: ImportSource[]; /** * Given the ESLint rule context, extract and parse the value of the importSources rule option. * The importSources option is used to override which libraries an ESLint rule applies to. * * @param context The rule context. * @returns An array of strings representing what CSS-in-JS packages that should be checked, based * on the rule options configuration. */ export declare const getImportSources: (context: Rule.RuleContext) => ImportSource[]; export declare const isCss: SupportedNameChecker; export declare const isCxFunction: SupportedNameChecker; export declare const isCssMap: SupportedNameChecker; export declare const isKeyframes: SupportedNameChecker; export declare const isStyled: SupportedNameChecker; export declare const isXcss: SupportedNameChecker; export declare const hasStyleObjectArguments: SupportedNameChecker; export declare const isImportedFrom: (moduleName: string, exactMatch?: boolean) => (nodeToCheck: Callee, referencesInScope: Reference[], /** * If we strictly have specific import sources in the config scope, pass them to make this more performant. * Pass `null` if you don't care if its configured or not. */ importSources?: ImportSource[] | null) => boolean; /** * Determine if this node is specifically from a `'styled-components'` import. * This is because `styled-components@3.4` APIs are not consistent with Emotion and Compiled, * we need to handle them differently in a few scenarios. * * This can be cleaned up when `'styled-components'` is no longer a valid ImportSource. */ export declare const isStyledComponents: (nodeToCheck: Callee, referencesInScope: Reference[], importSources?: ImportSource[] | null) => boolean; export declare const isCompiled: (nodeToCheck: Callee, referencesInScope: Reference[], importSources?: ImportSource[] | null) => boolean; export declare const isEmotion: (nodeToCheck: Callee, referencesInScope: Reference[], importSources?: ImportSource[] | null) => boolean; export declare const isAtlasKitCSS: (nodeToCheck: Callee, referencesInScope: Reference[], importSources?: ImportSource[] | null) => boolean; export { CSS_IN_JS_IMPORTS } from './css-in-js-imports';