Skip to content

本页为译文。如与英文页面有出入,以英文页面为准。 English

规则 ​

vue-pug/* rules 负责格式化和检查 <template lang="pug"> 中的 Pug。你在 eslint-plugin-vue 中使用的 vue/* rules 会继续和它们并行工作;参见 Pug 上的 vue/* rules。

✅ enabled in configs.recommended (at warn). 🔧 fixable with --fix.

RuleDescription✅🔧
vue-pug/attribute-commasrequire or disallow commas between attributes in Pug attribute blocks✅🔧
vue-pug/attribute-equals-spacingdisallow spaces around the = and != of Pug attributes✅🔧
vue-pug/attribute-parens-newlineenforce line breaks after ( and before ) of multiline Pug attribute blocks✅🔧
vue-pug/attribute-parens-spacingenforce consistent spacing inside the parentheses of Pug attribute blocks✅🔧
vue-pug/attribute-quotesenforce a consistent quote style for Pug attribute values✅🔧
vue-pug/implicit-divenforce or forbid the tag name div before class and id shorthands✅🔧
vue-pug/indentenforce consistent indentation in Pug templates✅🔧
vue-pug/max-attributes-per-lineenforce a maximum number of attributes per line in Pug attribute blocks✅🔧
vue-pug/no-multi-spacesdisallow multiple spaces between attributes in Pug attribute blocks✅🔧
vue-pug/no-pug-control-flowdisallow Pug compile-time constructs (control flow, code, mixins, #{} interpolation, includes)
vue-pug/prefer-shorthandenforce or forbid .class / #id shorthands for static class and id attributes✅🔧
vue-pug/self-closingenforce or forbid the self-closing / of a tag✅🔧

基于 MIT 许可证发布。