# wxml/event-binding-style
# Motivation
Force using same style for event binding.
- Force everryone use
colon
style event binding.
<!-- ✓ GOOD -->
<view bind:tap="clickhandler" />
<view mut-bind:tap="clickhandler" />
<view catch:tap="clickhandler" />
<view capture-catch:tap="clickhandler" />
<view capture-bind:tap="clickhandler" />
<!-- ✗ BAD -->
<view bindtap="clickhandler" />
<view mut-bindtap="clickhandler" />
<view catchtap="clickhandler" />
<view capture-catchtap="clickhandler" />
<view capture-bindtap="clickhandler" />
- Force everryone use
no-colon
style event binding.
<!-- ✓ GOOD -->
<view bindtap="clickhandler" />
<view mut-bindtap="clickhandler" />
<view catchtap="clickhandler" />
<view capture-catchtap="clickhandler" />
<view capture-bindtap="clickhandler" />
<!-- ✗ BAD -->
<view bind:tap="clickhandler" />
<view mut-bind:tap="clickhandler" />
<view catch:tap="clickhandler" />
<view capture-catch:tap="clickhandler" />
<view capture-bind:tap="clickhandler" />
💡 tips
You can edit code via online editor, it's online REPL, try to fix eslint problem !
# Config
You must set second params as one of ["colon
", "no-colon
"]
{ "wxml/event-binding-style": ["error", "colon"]}
# Version
This rule was introduced in eslint-plugin-wxml v0.7.4