# no-multiple-objects-in-class

Rule `vue/no-multiple-objects-in-class`. Disallow passing multiple objects in an array to class

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1828 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-multiple-objects-in-class` | no | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-multiple-objects-in-class.html) |
| Biome | `nursery/noVueMultipleObjectsInClass` | no | no | group nursery, since 2.6.5 | [docs](https://biomejs.dev/linter/rules/no-vue-multiple-objects-in-class/) |

## Code examples

### Incorrect: the rule reports this

```vue
    <div :class="[{ foo: isFoo }, { bar: isBar }]" />
  </div>
</template>
```

### Correct: the rule accepts this

```vue
<div :class="[{ foo: isFoo, bar: isBar }]" />
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/no-multiple-objects-in-class": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noVueMultipleObjectsInClass": "error"
      }
    }
  }
}
```

## Related rules

- [vue/no-implicit-coercion](https://lintradar.dev/rules/vue/no-implicit-coercion.md): Disallow shorthand type conversions in `<template>`
- [vue/no-negated-condition](https://lintradar.dev/rules/vue/no-negated-condition.md): Disallow negated conditions in `<template>`
- [vue/no-define-model-default](https://lintradar.dev/rules/vue/no-define-model-default.md): Disallow default values in `defineModel`
- [vue/no-negated-v-if-condition](https://lintradar.dev/rules/vue/no-negated-v-if-condition.md): Disallow negated conditions in v-if/v-else
- [vue/no-content-outside-block](https://lintradar.dev/rules/vue/no-content-outside-block.md): Disallow content outside of the top-level blocks
- [vue/no-ref-object-reactivity-loss](https://lintradar.dev/rules/vue/no-ref-object-reactivity-loss.md): Disallow usages of ref objects that can lead to loss of reactivity

---

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