Skip to content

Commit

Permalink
Configure quoted strings rule for yamllint
Browse files Browse the repository at this point in the history
Add a configuration for the `quoted-strings` rule that matches our best
practices. The markdownlint configuration had to be updated to comply
with these new settings.
  • Loading branch information
mcdonnnj committed Dec 4, 2024
1 parent dd102fe commit 6ed0ef0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .mdl_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ default: true
# MD003/heading-style/header-style - Heading style
MD003:
# Enforce the ATX-closed style of header
style: "atx_closed"
style: atx_closed

# MD004/ul-style - Unordered list style
MD004:
# Enforce dashes for unordered lists
style: "dash"
style: dash

# MD013/line-length - Line length
MD013:
Expand All @@ -30,7 +30,7 @@ MD024:
# MD029/ol-prefix - Ordered list item prefix
MD029:
# Enforce the `1.` style for ordered lists
style: "one"
style: one

# MD033/no-inline-html - Inline HTML
MD033:
Expand All @@ -42,19 +42,19 @@ MD033:
# MD035/hr-style - Horizontal rule style
MD035:
# Enforce dashes for horizontal rules
style: "---"
style: ---

# MD046/code-block-style - Code block style
MD046:
# Enforce the fenced style for code blocks
style: "fenced"
style: fenced

# MD049/emphasis-style - Emphasis style should be consistent
MD049:
# Enforce asterisks as the style to use for emphasis
style: "asterisk"
style: asterisk

# MD050/strong-style - Strong style should be consistent
MD050:
# Enforce asterisks as the style to use for strong
style: "asterisk"
style: asterisk
11 changes: 11 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,14 @@ rules:
forbid-explicit-octal: true
# Do not allow implicit octal values (those beginning with a leading 0).
forbid-implicit-octal: true

quoted-strings:
# Allow disallowed quotes (single quotes) for strings that contain allowed quotes
# (double quotes).
allow-quoted-quotes: true
# Apply these rules to keys in mappings as well
check-keys: true
# We prefer double quotes for strings when they are needed
quote-type: double
# Only require quotes when they are necessary for proper processing
required: only-when-needed

0 comments on commit 6ed0ef0

Please sign in to comment.