UNPKG

eslint-plugin-better-tailwindcss

Version:

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

434 lines 20.7 kB
export declare const enforceConsistentClassOrder: { category: "stylistic"; messages: { readonly order: "Incorrect class order. Expected\n\n{{ notSorted }}\n\nto be\n\n{{ sorted }}"; } | undefined; name: "enforce-consistent-class-order"; readonly options: { cwd?: string | undefined; rootFontSize?: number | undefined; detectComponentClasses: boolean; tsconfig?: string | undefined; tailwindConfig?: string | undefined; messageStyle: "visual" | "compact" | "raw"; entryPoint?: string | undefined; tags?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; variables?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; attributes?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; callees?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; selectors: ({ callTarget?: number | "all" | "first" | "last" | undefined; kind: import("../types/rule.js").SelectorKind.Callee; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; path?: string | undefined; targetArgument?: number | "all" | "first" | "last" | undefined; targetCall?: number | "all" | "first" | "last" | undefined; } | { callTarget?: number | "all" | "first" | "last" | undefined; kind: import("../types/rule.js").SelectorKind.Callee; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name?: string | undefined; path: string; targetArgument?: number | "all" | "first" | "last" | undefined; targetCall?: number | "all" | "first" | "last" | undefined; } | { kind: import("../types/rule.js").SelectorKind.Tag; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; path?: string | undefined; } | { kind: import("../types/rule.js").SelectorKind.Tag; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name?: string | undefined; path: string; } | { kind: import("../types/rule.js").SelectorKind.Attribute; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; } | { kind: import("../types/rule.js").SelectorKind.Variable; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; })[]; } & { componentClassOrder: "asc" | "desc" | "preserve"; componentClassPosition: "start" | "end"; order: "asc" | "desc" | "official" | "strict"; unknownClassOrder: "asc" | "desc" | "preserve"; unknownClassPosition: "start" | "end"; }; recommended: true; rule: { create: (ctx: import("node_modules/@eslint/core/dist/cjs/types.cjs").RuleContext<{ LangOptions: import("eslint").Linter.LanguageOptions; Code: import("eslint").SourceCode; RuleOptions: [Required<{ cwd?: string | undefined; rootFontSize?: number | undefined; detectComponentClasses: boolean; tsconfig?: string | undefined; tailwindConfig?: string | undefined; messageStyle: "visual" | "compact" | "raw"; entryPoint?: string | undefined; tags?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; variables?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; attributes?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; callees?: (string | [string, ({ match: import("../types/rule.js").MatcherType.String; } | { match: import("../types/rule.js").MatcherType.ObjectKey; pathPattern?: string | undefined; } | { match: import("../types/rule.js").MatcherType.ObjectValue; pathPattern?: string | undefined; })[]])[] | undefined; selectors: ({ callTarget?: number | "all" | "first" | "last" | undefined; kind: import("../types/rule.js").SelectorKind.Callee; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; path?: string | undefined; targetArgument?: number | "all" | "first" | "last" | undefined; targetCall?: number | "all" | "first" | "last" | undefined; } | { callTarget?: number | "all" | "first" | "last" | undefined; kind: import("../types/rule.js").SelectorKind.Callee; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name?: string | undefined; path: string; targetArgument?: number | "all" | "first" | "last" | undefined; targetCall?: number | "all" | "first" | "last" | undefined; } | { kind: import("../types/rule.js").SelectorKind.Tag; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; path?: string | undefined; } | { kind: import("../types/rule.js").SelectorKind.Tag; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name?: string | undefined; path: string; } | { kind: import("../types/rule.js").SelectorKind.Attribute; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; } | { kind: import("../types/rule.js").SelectorKind.Variable; match?: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; } | { match: ({ type: import("../types/rule.js").MatcherType.String; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectKey; } | { path?: string | undefined; type: import("../types/rule.js").MatcherType.ObjectValue; })[]; type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn; })[] | undefined; name: string; })[]; } & { componentClassOrder: "asc" | "desc" | "preserve"; componentClassPosition: "start" | "end"; order: "asc" | "desc" | "official" | "strict"; unknownClassOrder: "asc" | "desc" | "preserve"; unknownClassPosition: "start" | "end"; }>]; Node: import("eslint").JSSyntaxElement; MessageIds: "order"; }>) => import("eslint").Rule.RuleListener; meta: { messages?: { readonly order: "Incorrect class order. Expected\n\n{{ notSorted }}\n\nto be\n\n{{ sorted }}"; }; docs: { description: string; recommended: boolean; url: string; }; fixable: "code" | undefined; schema: { additionalProperties: false; properties: Record<string, boolean | import("@valibot/to-json-schema").JsonSchema> | undefined; type: "object"; }[]; type: "problem" | "layout"; }; }; }; //# sourceMappingURL=enforce-consistent-class-order.d.ts.map