json-schema-to-typescript icon indicating copy to clipboard operation
json-schema-to-typescript copied to clipboard

Escape `/*` `*/` in comments

Open sledorze opened this issue 7 years ago • 2 comments

This is sometimes used in comments to refer to some Paths and make Prettier fail, resulting in a log message and an empty file. It would be very handy to be able to escape those.

ex: */foo becoming *\/foo

sledorze avatar Aug 14 '18 14:08 sledorze

@sledorze That's a great idea! The best place to do this is in a new normalizer rule.

bcherny avatar Sep 17 '18 03:09 bcherny

I'm affected by this.

It generates something like following for me:

/**
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^(?:\S+|/.*/[a-z]*)$".
 */

Shinigami92 avatar Oct 01 '21 11:10 Shinigami92