ci: add markdown, website, and image lint checks#882
Conversation
Adds markdownlint for the docs, oxlint + oxfmt for the website (replacing the broken eslint + prettier setup), and an unoptimized-image check, all wired into the Checks workflow. Closes #594
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #882 +/- ##
==========================================
- Coverage 94.52% 94.50% -0.02%
==========================================
Files 48 48
Lines 5079 5079
==========================================
- Hits 4801 4800 -1
- Misses 278 279 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
oxfmt reads `quote_type` from `.editorconfig`; set it to `single` to match apify-docs and apify-core, and reformat the website code accordingly.
There was a problem hiding this comment.
Pull request overview
This PR extends the repository’s CI “Checks” workflow with documentation- and website-focused linting, aligning the repo with the tooling approach used in related Apify projects (markdownlint for Markdown; oxlint/oxfmt for the Docusaurus site) and adds a guardrail to prevent committing unoptimized raster images.
Changes:
- Add CI jobs for Markdown linting, website linting + formatting checks, and image optimization enforcement.
- Replace the website’s ESLint/Prettier setup with oxlint/oxfmt configuration and scripts.
- Adjust Markdown/docs formatting and add markdownlint configuration to satisfy lint rules.
Reviewed changes
Copilot reviewed 14 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/_checks.yaml |
Adds Markdown/website/image lint jobs and Node setup for these checks. |
.markdownlint.yaml |
Introduces markdownlint configuration tailored for docs/MDX (e.g., disables line-length). |
.editorconfig |
Adds an editor configuration option affecting quote style metadata. |
.rules.md |
Markdown formatting tweaks (code fence language + list indentation). |
CONTRIBUTING.md |
Documents how to run the new linting/formatting checks and image optimization locally. |
README.md |
Adjusts Markdown table formatting to satisfy linting rules. |
docs/02_concepts/04_error_handling.mdx |
Adjusts Markdown table formatting to satisfy linting rules. |
docs/02_concepts/10_custom_http_clients.mdx |
Adjusts Markdown table formatting to satisfy linting rules. |
docs/02_concepts/11_timeouts.mdx |
Adjusts Markdown table formatting to satisfy linting rules. |
website/.eslintrc.json |
Removes the previous ESLint configuration. |
website/.oxfmtrc.json |
Adds oxfmt configuration (print width + ignore patterns). |
website/docusaurus.config.js |
Minor formatting changes (inline type-cast style). |
website/oxlint.config.ts |
Adds oxlint configuration using @apify/oxlint-config. |
website/package.json |
Adds markdownlint/oxlint/oxfmt scripts + dependencies; updates lint/format commands and adds image optimization script. |
website/pnpm-lock.yaml |
Updates lockfile to reflect the new lint/format toolchain dependencies. |
website/src/plugins/docusaurus-plugin-segment/segment.js |
Formatting changes consistent with the new formatter. |
website/src/theme/DocItem/Content/index.js |
Fixes a missing semicolon in a JSX return statement. |
website/tools/docs-prettier.config.js |
Removes the old Prettier config used for docs formatting. |
website/tools/utils/externalLink.js |
Updates Node URL import style and applies formatting changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…-image-lint # Conflicts: # website/pnpm-lock.yaml
Adds Markdown, website, and image lint checks to CI, mirroring the setup in
apify-docsandapify-core. The docs and website now go through the same kind of automated checks as the Python code.The website tooling moves from eslint + prettier (which weren't wired into CI) to oxlint and oxfmt, and markdownlint now covers the Markdown files.
Three jobs run in the existing Checks workflow:
markdownlintoverREADME.md,CONTRIBUTING.md, and thedocs/folder.oxlintplus anoxfmt --checkformatting gate for the Docusaurus site.pnpm opt:imagesfirst.Notes:
.editorconfig(quote_type) and.oxfmtrc.json(singleQuote).apify-docs: line length is disabled and inline HTML is allowed.Closes #594