UNPKG

stylelint-no-unresolved-module

Version:

Ensures that module (import-like or `url`) can be resolved to a module on the file system.

60 lines 1.87 kB
export default NodeResolver; export namespace postcss { type Root = import('postcss').Root; type ChildNode = import('postcss').ChildNode; } export type TsconfigOptions = import('oxc-resolver').TsconfigOptions; export type NodeResolverOptions = { cssRoot: postcss.Root | null; cwd: string; alias: Record<string, (string | string[])>; roots: string[]; extensions: string[]; conditionNames: string[]; mainFields: string[]; mainFiles: string[]; modules: string[]; tsconfig?: 'auto' | TsconfigOptions; }; declare class NodeResolver { /** * @param {NodeResolverOptions} options */ constructor(options: NodeResolverOptions); cwd: string; alias: Record<string, string | string[]>; roots: string[]; extensions: string[]; conditionNames: string[]; mainFields: string[]; mainFiles: string[]; modules: string[]; cssRoot: import("postcss/lib/root").default | null; tsconfig: "auto" | import("oxc-resolver").TsconfigOptions | undefined; context: string; importAtRules: string[]; enhancedResolve: ResolverFactory; /** * @param {string} entry */ resolvePath(entry: string): Promise<string>; /** * @param {string} value * @param {postcss.ChildNode} rootNode */ resolve(value: string, rootNode: postcss.ChildNode): false | { promise: Promise<string>; message: (resource: string, rootNode: postcss.ChildNode) => string; }; /** * @param {string} resource * @param {postcss.ChildNode} rootNode */ message(resource: string, rootNode: postcss.ChildNode): string; /** * @param {postcss.ChildNode} rootNode */ isGenericUrlImport(rootNode: postcss.ChildNode): boolean; } import { ResolverFactory } from "oxc-resolver"; //# sourceMappingURL=node.d.ts.map