Skip to content

ci: add markdown, website, and image lint checks#882

Open
vdusek wants to merge 10 commits into
masterfrom
ci/markdown-website-image-lint
Open

ci: add markdown, website, and image lint checks#882
vdusek wants to merge 10 commits into
masterfrom
ci/markdown-website-image-lint

Conversation

@vdusek

@vdusek vdusek commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Adds Markdown, website, and image lint checks to CI, mirroring the setup in apify-docs and apify-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:

  • Markdown lintmarkdownlint over README.md, CONTRIBUTING.md, and the docs/ folder.
  • Website lint and formatoxlint plus an oxfmt --check formatting gate for the Docusaurus site.
  • Image lint — fails when a PR adds unoptimized raster images, which should be converted with pnpm opt:images first.

Notes:

  • The website JS keeps single quotes, set via .editorconfig (quote_type) and .oxfmtrc.json (singleQuote).
  • The markdownlint config matches apify-docs: line length is disabled and inline HTML is allowed.
  • Minor doc and code fixes were applied where needed to pass the new checks.

Closes #594

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
@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Jun 24, 2026
@vdusek vdusek self-assigned this Jun 24, 2026
@github-actions github-actions Bot added this to the 143rd sprint - Tooling team milestone Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.50%. Comparing base (4360695) to head (bb26fd1).

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     
Flag Coverage Δ
integration 92.59% <ø> (-0.32%) ⬇️
unit 83.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

oxfmt reads `quote_type` from `.editorconfig`; set it to `single` to match
apify-docs and apify-core, and reformat the website code accordingly.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread .editorconfig
Comment thread website/package.json Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 19 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/_checks.yaml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 19 changed files in this pull request and generated 1 comment.

Comment thread website/.oxfmtrc.json
@vdusek vdusek requested a review from Copilot June 24, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 21 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add markdownlint validation and eslint for website

3 participants