Skip to content

vue/multiline-ternary

<template> 中强制在三元表达式的操作数之间使用换行符

  • 🔧 command line 上的 --fix 选项可以自动修复此规则报告的一些问题。

此规则与 @stylistic/multiline-ternary 规则相同,但适用于 <template><style> 中的表达式。

¥This rule is the same rule as @stylistic/multiline-ternary rule but it applies to the expressions in <template> and <style>.

此规则扩展了 @stylistic/eslint-plugin 所具有的规则,但如果未安装 @stylistic/eslint-plugin,则此规则从 ESLint 核心中提取并扩展相同的规则。但是,如果两者都未找到,则无法使用该规则。

¥This rule extends the rule that @stylistic/eslint-plugin has, but if @stylistic/eslint-plugin is not installed, this rule extracts and extends the same rule from ESLint core. However, if neither is found, the rule cannot be used.

📖 规则详情

Now loading...

📚扩展阅读

¥📚 Further Reading

🚀版本

¥🚀 Version

此规则是在 eslint-plugin-vue v9.7.0 中引入的

¥This rule was introduced in eslint-plugin-vue v9.7.0

🔍代码实现

¥🔍 Implementation

使用 ❤️ 来自 ESLint Stylistic

¥Taken with ❤️ from ESLint Stylistic

eslint-plugin-vue v10.0 中文网 - 粤ICP备13048890号