Registry / serialization / ember-template-lint-plugin-tailwindcss

ember-template-lint-plugin-tailwindcss

JSON →
library5.1.0jsnpmunverified

An ember-template-lint plugin that enforces Tailwind CSS best practices in Ember/Glimmer templates. Current stable version is 5.1.0, released regularly with semver versioning. Ships TypeScript definitions. Key differentiators: provides two custom lint rules (class-wrap and class-order) specifically designed for Tailwind CSS utility classes, auto-detects Tailwind classes via configurable matchers, and integrates seamlessly with ember-template-lint's recommended configuration. Unlike generic HTML linters, this plugin understands Tailwind's class naming conventions and ordering preferences.

serializationtesting
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

The plugin is auto-discovered by ember-template-lint via the plugins array; no direct require/import of the plugin itself is needed.

module.exports = { plugins: ['ember-template-lint-plugin-tailwindcss'] };

Rules are configured via .template-lintrc.js, not imported directly. For TypeScript, import types from ember-template-lint.

import type { LintConfig } from 'ember-template-lint';

Full plugin name must be used in extends; ember-template-lint resolves it from the plugins list.

extends: ['ember-template-lint-plugin-tailwindcss:recommended']

Configure ember-template-lint to use the tailwindcss plugin with recommended rules plus custom class-wrap settings.

// .template-lintrc.js module.exports = { plugins: ['ember-template-lint-plugin-tailwindcss'], extends: ['recommended', 'ember-template-lint-plugin-tailwindcss:recommended'], rules: { 'class-order': 'error', 'class-wrap': ['error', { classesPerLine: 5 }], }, };
Debug
Known footguns
breakingPlugin v5 requires ember-template-lint ^4.0.0 || ^5.0.0; previous plugin v4 required ^3.0.0.
deprecatedNode 12 and 14 are no longer supported; updated engine field to require Node >=16.
gotchaclass-wrap rule may conflict with ember-template-lint-plugin-prettier; both attempt to control line wrapping in class attributes.
gotchaCustom matchers and sorters must be functions that return booleans and numbers respectively; configuration is runtime-evaluated, not serializable.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
3
ahrefsbot
3
claudebot
3
Resources