Search code examples
commentsprettier

How can I comment on prettierrc file


I know json file cannot add comments unless I have “_comment”:”comment content”.

However, with .prettierrc file having this is going to interfere with prettier configuration.

Is there any good way of commenting?


Solution

  • Prettier's configurations file doesn't have to be JSON. It can be written in JavaScript too (.prettierrc.js or prettier.config.js), with as many comments as you want.

    See https://prettier.io/docs/en/configuration.html