# Rules Summary

Legend

🔧 Indicates that the rule is fixable, and using --fix option on the command line (opens new window) can automatically fix some of the reported problems.

Attention

⚠️ Current all rules's fixable is null, will write possiable fixer in the future, so it means eslint-plugin-wxml only support lint and doesn't support --fix now.

Rule ID Description Recommended Fixable
no-restricted-syntax disallow specified syntax ⭐️ ⭐️ ⭐️
[Deprecated] wxml/colon-style-event-binding use colon(:) style event binding ⭐️
wxml/empty-tag-self-closing empty tag must be self closing ⭐️ ⭐️ ⭐️
wxml/event-binding-style using same event binding style ⭐️ ⭐️ ⭐️
wxml/forbid-tags disable using special tag in projet ⭐️ ⭐️ ⭐️
wxml/max-depth set maximum wxml tree depth ⭐️ ⭐️
wxml/max-len set maximum length of single line code ⭐️ ⭐️
wxml/max-lines set maximum code lines of .wxml file ⭐️
wxml/no-const-and-let-in-wxs Wechat Miniprogram wxs (opens new window) current not support use let and const to declare variable (opens new window) ⭐️ ⭐️ ⭐️
wxml/no-dot-this-in-wx-key disable using *this (opens new window) as wx:key's value ⭐️
wxml/no-duplicate-attributes not allow exist duplicate attributes in a single tag ⭐️ ⭐️
wxml/no-dynamic-wx-key enforce using static wx:key ⭐️
wxml/no-inconsistent-tagname Found startTag name and endTag name not equal at development stage ⭐️ ⭐️ ⭐️
wxml/no-index-in-wx-key disable using index (opens new window) as wx:key's value ⭐️
wxml/no-inline-wxs force using separate .wxs file ⭐️
wxml/no-unexpected-string-bool not allow using "true" or "false" as attribute's boolean value, official documentation (opens new window) ⭐️ ⭐️ ⭐️
wxml/no-unnecessary-block optimize unnecessary <block /> ⭐️
wxml/no-vue-directive funny muscle memory to write vuejs directive in miniprogram project (e.g. v-if) ⭐️
wxml/no-wx-for-with-wx-else avoid error (opens new window) when you use wx:for with wx:else at same tag ⭐️ ⭐️ ⭐️
[Deprecated] wxml/no-wx-for-with-wx-if avoid error (opens new window) when you use wx:for with wx:if/wx:elif/wx:else at same tag
wxml/no-wx-if-string avoid unexpected result when you use invalid boolean interpolation as wx:if/wx:elif's value ⭐️ ⭐️ ⭐️
wxml/omit-bool-attributes force developer omit true WXAttributes for better coding style and save miniprogram bundle size ⭐️ ⭐️ ⭐️
wxml/quotes force using same quotes style in project, ' or " ⭐️
wxml/report-interpolation-error check interpolation syntax error via @wxml/parser (opens new window) ⭐️ ⭐️ ⭐️
wxml/report-wxml-syntax-error check wxml syntax error via @wxml/parser (opens new window) ⭐️
wxml/report-wxs-syntax-error check inline wxs syntax error via @wxml/parser (opens new window) ⭐️
wxml/required-attributes using custom config to force team member write the required attributes in wxml ⭐️ ⭐️
wxml/required-root-tag Hint required root tag for wxml file ⭐️
wxml/required-tags Hint required tags for wxml file, sometimes we need special tags for some reason. ⭐️
wxml/wx-key hint missing wx:key when you use wx:for loop ⭐️ ⭐️ ⭐️
wxml/wxs-module-prop lint wxs's module property ⭐️ ⭐️ ⭐️
wxml/wxs-must-be-top-level force write top level wxs (opens new window) ⭐️