Skip to content

Rule Proposal: single object in class array #1093

Closed
@privatenumber

Description

@privatenumber

Please describe what the rule should do:

The rule should enforce that only one object is used in an array of classes

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<template>
	<div :class="[{ a: true }, { b: true }, 'c']" />
</template>

Can be fixed to:

<template>
	<div :class="[{ a: true, b: true }, 'c']" />
</template>

Can open a PR if proposal is approved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions