#4007·unocss

Eslint plugin isn't working with attributify

Author: zummCreated Jul 23, 2024Updated Jul 2, 2026
Labelsenhancementhelp wantedpr welcomeeslint-plugin

UnoCSS version

0.61.5

Describe the bug

Eslint plugin isn't working with attributify. Utility classes are sorting inside class attribute, but not inside other attributes. See reproduction, in App.vue wrong order classes order inside class and un-before attributes, but eslint warns only about class.

xml
<template>
  <h1
    class="text-center font-sans color-gray"
    un-before="text-center font-sans color-gray"
  >
    Hello World
  </h1>
</template>

Reproduction

https://stackblitz.com/edit/unocss-unocss-cfjwep?file=uno.config.ts

Go to terminal and execute: eslint ./src/App.vue

❯ eslint ./src/App.vue

/home/projects/unocss-unocss-cfjwep/src/App.vue
  3:11  warning  UnoCSS utilities are not ordered  unocss/order

✖ 1 problem (0 errors, 1 warning)
  0 errors and 1 warning potentially fixable with the `--fix` option.

System Info

No response

Validations