# wxml/quotes

# Backgroud

Quotes

Both <view attr='singleQuotes'> and <view attr="doubleQuotes"> are valid in wxml.

# Motivation

This rule enforce developer use same quote style in all wxml code base.

# Config Example 1

{ "wxml/quotes": ["error", "double"] }
<!-- ✓ GOOD --> <component attr="{{data}}" /> <view v-if="{{show}}"> {{title}}</view> <!-- ✗ BAD --> <component attr='{{data}}' /> <view v-if='{{show}}'> {{title}}</view>
Now loading...

# Config Example 2

{ "wxml/quotes": ["error", "single"] }
<!-- ✓ GOOD --> <component attr='{{data}}' /> <view v-if='{{show}}'> {{title}}</view> <!-- ✗ BAD --> <component attr="{{data}}" /> <view v-if="{{show}}"> {{title}}</view>
Now loading...

💡 tips

You can edit code via online editor, it's online REPL, try to fix eslint problem !

# Config

config enum is ["single", "double"]

{ "wxml/quotes": ["error", "single"] }

config

wxml/quotes only accept single or double as config params currently.

# Version

This rule was introduced in eslint-plugin-wxml v0.2.1

# Implementation