7

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,896
  • 3
  • 18
  • 28

1 Answers1

9

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
  • 35,506
  • 7
  • 89
  • 126