oxlint-plugin-twl
v0.4.3
Published
Oxlint JS plugin for twl class name templates: Tailwind class sorting within comment groups, and the compiler's constraints caught in the editor
Maintainers
Readme
oxlint-plugin-twl
Oxlint JS plugin for
twl class name templates. It runs the rules of
eslint-plugin-twl, unchanged.
pnpm add -D oxlint-plugin-twl// oxlint.config.ts
import { defineConfig } from 'oxlint'
import twl from 'oxlint-plugin-twl'
export default defineConfig({
extends: [twl.configs.recommended],
settings: { twl: { stylesheet: './src/app.css' } },
})In .oxlintrc.json, list the plugin and the rules yourself:
{
"jsPlugins": ["oxlint-plugin-twl"],
"settings": { "twl": { "stylesheet": "./src/app.css" } },
"rules": {
"twl/sort-classes": "warn",
"twl/no-interpolation-in-comment": "error",
"twl/no-namespace-import": "error",
"twl/no-shadowed-macro": "error"
}
}twl/sort-classes needs settings.twl.stylesheet, a Tailwind CSS v4 entry
file, and @tailwindcss/node installed. Oxlint's JS plugin support is alpha;
this plugin is tested against Oxlint 1.85 and later.
See the docs, one page per rule.
