function transform(options = {}) {
  /** @type {import('unified').PluggableList} */
  let plugins = [
    retextEnglish,
    [retextProfanities, {sureness: options.profanitySureness}],
    [retextEquality, {noBinary: options.noBinary}]
  ]

  if (cli.flags.html) {
    plugins = [rehypeParse, [rehypeRetext, unified().use({plugins})]]
  } else if (cli.flags.mdx) {
    // @ts-expect-error: types are having a hard time for bridges.
    plugins = [remarkParse, remarkMdx, [remarkRetext, unified().use({plugins})]]
  } else if (!cli.flags.text) {
    plugins = [
      // @ts-expect-error: hush.
      remarkParse,
      remarkGfm,
      [remarkFrontmatter, ['yaml', 'toml']],
      // @ts-expect-error: types are having a hard time for bridges.
      [remarkRetext, unified().use({plugins})]
    ]
  }

  plugins.push([filter, {allow: options.allow, deny: options.deny}])

  // Hard to check.
  /* c8 ignore next 3 */
  if (cli.flags.diff) {
    plugins.push(unifiedDiff)
  }

  return {plugins}
}
@param {import('./index.js').OptionsObject} [options]