Created
April 27, 2024 12:18
-
-
Save heyajulia/13b5d929de17f2a53d02f0ac43cf24d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Grab all Ruff rule categories from the Ruff docs. | |
// Run this in the browser console on https://docs.astral.sh/ruff/rules/. | |
const R = await import("https://esm.sh/ramda@0.29.1"); | |
R.pipe( | |
R.tail, | |
R.pluck("innerText"), | |
R.map(R.match(/\(([A-Z0-9]+(?:, *[A-Z0-9]+)*)\)/)), | |
R.map(R.last), | |
R.chain(R.split(", ")), | |
R.map(R.trim) | |
)([...document.querySelectorAll("h2")]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment