Agoric / documentation

User documentation
https://agoric.com/documentation/
Apache License 2.0
15 stars 39 forks source link

chore: lint inline js snippets #1212

Closed mujahidkay closed 1 month ago

mujahidkay commented 1 month ago

Recently, set up a prettier config to normalize markdown formatting. It enforced no trailing semi colons which resulted in some mismatches if a dev has semis enabled extension wide. So firstly, this PR fixes that by removing that option.

Secondly, not all inline JS snippets were being fixed as such. Neither prettier, not eslint-markdown plugins natively handled that support (there still exists cases of js snippets without trailing semis). Also explored remark-lint but to no success. Concocted a custom linter (s/o claude) to handle all cases that occur in the repo and it should cover almost all use-cases (don't expect it to be perfect, have tried out manual examples generic in nature that do get filtered). Also, normalizes all ''```javascript' usages to '```js' for consistency

cloudflare-workers-and-pages[bot] commented 1 month ago

Deploying documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: fcb738e
Status: ✅  Deploy successful!
Preview URL: https://549739dd.documentation-7tp.pages.dev
Branch Preview URL: https://markdown-lint-config-update.documentation-7tp.pages.dev

View logs