UNPKG

eslint-plugin-readable-tailwind

Version:

auto-wraps tailwind classes after a certain print width or class count into multiple lines to improve readability.

43 lines 1.76 kB
import type { Rule } from "eslint"; import type { BracesMeta, Literal, QuoteMeta } from "../types/ast.js"; export declare function getCommonOptions(ctx: Rule.RuleContext): { attributes: any; callees: any; tags: any; tailwindConfig: any; variables: any; }; export declare function getWhitespace(classes: string): { leadingWhitespace: string | undefined; trailingWhitespace: string | undefined; }; export declare function getQuotes(raw: string): QuoteMeta; export declare function getContent(raw: string, quotes?: QuoteMeta, braces?: BracesMeta): string; export declare function splitClasses(classes: string): string[]; export declare function display(classes: string): string; export interface Warning<Options extends Record<string, any> = Record<string, any>> { option: keyof Options; title: string; url: string; } export declare function augmentMessageWithWarnings(message: string, warnings?: Warning[]): string; export declare function splitWhitespaces(classes: string): string[]; export declare function getIndentation(line: string): number; export declare function escapeForRegex(word: string): string; export declare function getExactClassLocation(literal: Literal, className: string, lastIndex?: boolean): { end: { column: number; line: number; }; start: { column: number; line: number; }; }; export declare function matchesName(pattern: string, name: string | undefined): boolean; export declare function deduplicateLiterals(literals: Literal[]): Literal[]; export interface GenericNodeWithParent { parent: GenericNodeWithParent; } export declare function isGenericNodeWithParent(node: unknown): node is GenericNodeWithParent; //# sourceMappingURL=utils.d.ts.map