WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
254 stars 204 forks source link

Automatically wrap admonition code-blocks in linting #1986

Open sarayourfriend opened 1 year ago

sarayourfriend commented 1 year ago

Problem

Prettier skips wrapping code blocks. This becomes a problem for Sphinx admonition directives. See this commit as an example:

https://github.com/WordPress/openverse/pull/1975/commits/4e46865f273f35181d0f8cc71bfbc5fd93e0cae1

Description

~Write a plugin for prettier, as described by https://github.com/WordPress/openverse/issues/2348~. We need to find some other approach for this (see comment below)

sarayourfriend commented 12 months ago

It's not possible to use a prettier plugin without publishing it or without switching to a local hook for prettier like we use for eslint. That's not really an option, it seems, otherwise we'll be adding pnpm as a dev dependency for the entire monorepo, rather than just the frontend (which is currently the case).