eslint-plugin-perfectionist
Version:
ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
21 lines (20 loc) • 728 B
TypeScript
import { ReadClosestTsConfigByPathValue } from './read-closest-ts-config-by-path.js'
/**
* Checks if an import matches any of the path mappings in tsconfig.json.
*
* Path mappings allow custom module resolution (e.g., '@/_' → './src/_'). This
* function determines if an import uses such a mapped path.
*
* @param options - Configuration options.
* @param options.tsConfigOutput - Parsed TypeScript configuration with path
* mappings.
* @param options.name - Import module specifier to check.
* @returns True if the import matches a tsconfig path mapping.
*/
export declare function matchesTsconfigPaths({
tsConfigOutput,
name,
}: {
tsConfigOutput: ReadClosestTsConfigByPathValue
name: string
}): boolean