Skip to content

このページは翻訳です。英語版と内容が異なる場合は、英語版が正しい内容です。 English

vue-pug/attribute-equals-spacing ​

Pug の属性の = と != の前後のスペースを禁止します。

✅ configs.recommended で有効です(warn)。🔧 --fix で修正できます。

Pug テンプレートの中では、vue/no-spaces-around-equal-signs-in-attribute の代わりに動きます。

Rule の詳細 ​

属性名とその = / != の間、および演算子と値の間の空白は、空でなければなりません。fix はそれを削除します。改行を含む隙間は、そのまま残されます。

正しくない例 ​

vue
<template lang="pug">
a(href = "/") Home
</template>
vue
<template lang="pug">
input(:value= "query" @input ="update")
</template>

正しい例 ​

vue
<template lang="pug">
a(href="/") Home
</template>
vue
<template lang="pug">
div(v-html!="html" :title="title")
</template>

オプション ​

なし。

MIT License のもとで公開されています。