内容简介:eslint-plugin-wxml 微信小程序eslint插件 eslint-plugin-wxml 于2021年11月5日发布了新版v0.4.1 1. 新增了规则 wxml/no-wx-if-string,用于校验警告在使用wx:if/wx:elif时必须使用有效的布尔值插值,否则会产生预...

eslint-plugin-wxml
微信小程序eslint插件 eslint-plugin-wxml 于2021年11月5日发布了新版v0.4.1
1. 新增了规则 wxml/no-wx-if-string,用于校验警告在使用wx:if/wx:elif时必须使用有效的布尔值插值,否则会产生预期之外的结果
<view wx:if="{{user}}"> {{user.name}}</view>If you use wx:if/wx:elif as control flow, make sure wx:if/wx:elif's value is a boolean, not a string (or dynamic string), otherwise the value will always be true, your code logic will be broken.
wx:if="{{show}} " => wx:if="true " => true
wx:if="{{show}} " => wx:if="false " => true
wx:if="{{show}}-s" => wx:if="true-s" => true
wx:if="{{show}}-s" => wx:if="false-s" => true
eslint插件使用示例:

官方文档地址: https://eslint-plugin-wxml.js.org
相关代码变更详见 https://github.com/wxmlfile/eslint-plugin-wxml/compare/v0.4.0...v0.4.1
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- 小程序打包插件开发体验
- 程序员的修行-《1.高效chrome插件》
- 米拓 6 端小程序插件已开放免申请使用
- 米拓小程序插件正式发布,免费,调用网站内容,支持微信、百度6端小程序
- 程序员宝典:10个Visual Studio Code插件
- TensorFlow.js 微信小程序插件开始支持模型缓存
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Microformats
John Allsopp / friends of ED / March 26, 2007 / $34.99
In this book, noted web developer and long time WaSP member John Allsop teaches all you need to know about the technology: what Microformats are currently available and how to use them; the general pr......一起来看看 《Microformats》 这本书的介绍吧!