HomeElementl

[docs-infra] set up mdx prettier `yarn format`

Description

[docs-infra] set up mdx prettier yarn format

Summary:
set up lint rules:

  1. proseWrap: "never": use prettier to ensure we don't break one paragraph into multiple lines in mdx
  1. use remark-lint for the other rules, because prettier's mdx support is relatively limited, which makes it hard for us to keep the formatted result consistent with remark-processed result - so i use remark lint to enable more sophisticated formatting - we can add more rules to the .remarkrc.js file in the future if needed.
    • require("remark-gfm"), { tablePipeAlign: true }: turned on GitHub Flavored Markdown's table pipe alignment (details) so cells can get auto aligned

note: i included the yarn format inside the yarn snapshot so we can ensure all the mdx files are formatted in the same way every time. this will be helpful for diffs like D7138

Test Plan: yarn snapshot

Reviewers: sashank, rexledesma

Reviewed By: sashank

Differential Revision: https://dagster.phacility.com/D7207

Details

Provenance
yuhanAuthored on Mar 30 2021, 4:24 AM
Reviewer
sashank
Differential Revision
D7207: [docs-infra] set up mdx prettier `yarn format`
Parents
R1:ef27a0366ac4: Sort docs versions by latest
Branches
Unknown
Tags
Unknown