Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 1.72 KB

quotes.md

File metadata and controls

66 lines (45 loc) · 1.72 KB
pageClass sidebarDepth title description since
rule-details
0
yml/quotes
enforce the consistent use of either double, or single quotes
v0.3.0

yml/quotes

enforce the consistent use of either double, or single quotes

  • ⚙️ This rule is included in "plugin:yml/standard".
  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule enforces the consistent use of either double or single quotes.

# eslint yml/quotes: 'error'

# ✓ GOOD
"GOOD": "foo"

# ✗ BAD
'BAD': 'bar'

🔧 Options

yml/quotes:
  - error
  - prefer: double # or "single"
    avoidEscape: true
  • prefer
    • "double" ... requires the use of double quotes wherever possible. It's default.
    • "single" ... requires the use of single quotes wherever possible.
  • avoidEscape ... If true, allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise.

👫 Related rules

🚀 Version

This rule was introduced in eslint-plugin-yml v0.3.0

🔍 Implementation