3

I have read the answer to this similar question: Do I need quotes for strings in YAML?

However, there was no answer for whether we can escape quotes with strings containing forward slashes /.

For example, do we need to add quotes to the following eslint rule 'react/no-deprecated': off?

mancristiana
  • 1,486
  • 1
  • 14
  • 25

1 Answers1

4

No, / is not a special character in YAML. YAML allows the escape sequence \/ in double-quoted scalars to resolve to / for JSON compatibility, but there is no requirement to use this escape sequence and no requirement to use quotes at all to use / as content character.

flyx
  • 29,987
  • 6
  • 79
  • 110