Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: lint inline js snippets #1212

Merged
merged 5 commits into from
Sep 30, 2024
Merged

chore: lint inline js snippets #1212

merged 5 commits into from
Sep 30, 2024

Conversation

mujahidkay
Copy link
Member

@mujahidkay mujahidkay commented Sep 24, 2024

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

Copy link

cloudflare-workers-and-pages bot commented Sep 24, 2024

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

@mujahidkay mujahidkay force-pushed the markdown-lint-config-update branch from 78f75e7 to 1f8fa48 Compare September 24, 2024 06:21
@mujahidkay mujahidkay self-assigned this Sep 24, 2024
@mujahidkay mujahidkay marked this pull request as ready for review September 26, 2024 05:52
@mujahidkay mujahidkay changed the title chore: update prettier config to allow semis chore: lint inline js snippets Sep 26, 2024
@mujahidkay mujahidkay force-pushed the markdown-lint-config-update branch 4 times, most recently from 1c8f985 to 4b08d5d Compare September 26, 2024 23:17
Copy link
Contributor

@toliaqat toliaqat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it, but I would recommend moving the linter code to some other repo later.

@mujahidkay mujahidkay force-pushed the markdown-lint-config-update branch from 4b08d5d to bfe586d Compare September 30, 2024 09:46
@mujahidkay mujahidkay force-pushed the markdown-lint-config-update branch from bfe586d to fcb738e Compare September 30, 2024 09:52
@mujahidkay mujahidkay merged commit f45b624 into main Sep 30, 2024
5 of 6 checks passed
@mujahidkay mujahidkay deleted the markdown-lint-config-update branch September 30, 2024 10:02
@mujahidkay mujahidkay mentioned this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants