eslint-doc-generator icon indicating copy to clipboard operation
eslint-doc-generator copied to clipboard

Support generating tables without alignment markers

Open G-Rath opened this issue 3 years ago • 1 comments

It looks like JetBrain IDEs have a bug in their markdown plugin as they only consider a table a table if its got at least three dashes, so the tables generated by this tool don't render properly as they've got :--:

image

I've opened IDEA-306736 but don't expect it to be actioned anytime soon - would you be open to an option to have tables generated without the alignment marker to allow us to workaround this in the meantime?

G-Rath avatar Nov 24 '22 20:11 G-Rath

I'd be open to a new option (e.g. --rule-list-align) as a pass-thru to the markdown-table align option we're using. While I generally prefer to have good default behavior and not bloat this tool with unnecessary/obscure options, I could imagine there being some user interest in controlling the table column alignment for consistency with their other tables (thus a legitimate use case and not just as a workaround for one IDE).

https://github.com/bmish/eslint-doc-generator/blob/8852f34dae2c9b763e8aecd9972c16bb82463f58/lib/rule-list.ts#L201

bmish avatar Nov 24 '22 20:11 bmish