# static-class-names-order

Rule `vue/static-class-names-order`. Enforce static class names order

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2088 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/static-class-names-order` | no | safe | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/static-class-names-order.html) |

## Code examples

### Incorrect: the rule reports this

```vue
  <div class="b a"></div>
</template>
```

### Correct: the rule accepts this

```vue
<div class="a b"></div>
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import vue from "eslint-plugin-vue";

export default [
  {
    plugins: { vue },
    rules: {
      "vue/static-class-names-order": "error",
    },
  },
];
```

## Related rules

- [vue/sort-keys](https://lintradar.dev/rules/vue/sort-keys.md): Enforce sort-keys in a manner that is compatible with order-in-components
- [vue/v-if-else-key](https://lintradar.dev/rules/vue/v-if-else-key.md): Require key attribute for conditionally rendered repeated components
- [vue/script-indent](https://lintradar.dev/rules/vue/script-indent.md): Enforce consistent indentation in `<script>`
- [vue/restricted-component-names](https://lintradar.dev/rules/vue/restricted-component-names.md): Enforce using only specific component names
- [vue/require-prop-comment](https://lintradar.dev/rules/vue/require-prop-comment.md): Require props to have a comment
- [vue/require-name-property](https://lintradar.dev/rules/vue/require-name-property.md): Require a name property in Vue components

---

Web page: https://lintradar.dev/rules/vue/static-class-names-order. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
