eslint-plugin-better-tailwindcss
Version:
auto-wraps tailwind classes after a certain print width or class count into multiple lines to improve readability.
426 lines • 20.3 kB
TypeScript
export declare const enforceConsistentImportantPosition: {
category: "stylistic";
messages: {
readonly position: "Incorrect important position. '{{ className }}' should be '{{ fix }}'.";
} | undefined;
name: "enforce-consistent-important-position";
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;
})[];
} & {
position?: "recommended" | "legacy" | undefined;
};
recommended: false;
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;
})[];
} & {
position?: "recommended" | "legacy" | undefined;
}>];
Node: import("eslint").JSSyntaxElement;
MessageIds: "position";
}>) => import("eslint").Rule.RuleListener;
meta: {
messages?: {
readonly position: "Incorrect important position. '{{ className }}' should be '{{ fix }}'.";
};
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-important-position.d.ts.map