[discussion] To introduce a formatter for Markdown files

2023-02-22 Thread Zhongpu Chen
As I mentioned in FLINK-31177 ( https://issues.apache.org/jira/browse/FLINK-31177): Currently, markdown files in *docs* are maintained and updated by many contributors, and different people have varying code style taste. By the way, as the syntax of markdown is not really strict, the styles tend t

Re: [discussion] To introduce a formatter for Markdown files

2023-02-22 Thread Jing Ge
Hi Zhongpu, Thanks for starting this discussion. I was wondering how we could let every contributor follow the same mk rule. I am not familiar with Prettier. Would you like to help me understand some basic questions? Thanks. Is there any way to integrate the format check into our CI pipeline? Oth

RE: Re: [discussion] To introduce a formatter for Markdown files

2023-02-22 Thread Zhongpu Chen
> I was wondering how we could let every contributor follow the same mk rule. As long as contributors install Prettier with the same version, markdown files can be auto-formatted in the same way without extra working via the `prettier --write **/*.md` command, and this can also be set as a part of

RE: Re: [discussion] To introduce a formatter for Markdown files

2023-02-22 Thread Zhongpu Chen
Hi Jing, Sorry for the last reply in a messed up formatting, as I am not quite familiar with the mail list usage. First, as long as contributors install Prettier with the same version, markdown files can be auto-formatted in the same way without extra working via the `prettier --write **/*.md` co

Re: Re: [discussion] To introduce a formatter for Markdown files

2023-02-22 Thread Jing Ge
Hi Zhongpu, Thanks for the clarification. Prettier looks fine for formatting mk files. Is there any way to validate rules like e.g. only using '*' for listing items in the CI pipeline? Best regards, Jing On Wed, Feb 22, 2023 at 2:28 PM Zhongpu Chen wrote: > Hi Jing, > > Sorry for the last repl

RE: Re: Re: [discussion] To introduce a formatter for Markdown files

2023-02-22 Thread Zhongpu Chen
Hi Jing, Prettier is a versatile formatting tools with very limited options for markdown files. If we need to specify the rules, I think other tools, such as markdownlint [1], can be a better choice. As for markdownlint, we can specify many kinds of rules. Here is an example for `unordered li

Re: Re: Re: [discussion] To introduce a formatter for Markdown files

2023-02-23 Thread Jing Ge
Hi Zhongpu, Thanks for sharing. That sounds good to me. Once we get consensus in the community, please don't forget to update the content at [1] wrt mk guide and format guide. Best regards, Jing On Thu, Feb 23, 2023 at 4:54 AM Zhongpu Chen wrote: > Hi Jing, > > Prettier is a versatile formatt