Skip to content

Conversation

@edmundmiller
Copy link
Contributor

@edmundmiller edmundmiller commented Sep 25, 2025

Summary

  • Fix Vale GitHub action configuration to properly display in PR reviews
  • Add MDX format support with mdx2vast
  • Modernize workflow with official Vale action
  • Enhance configuration with comprehensive file patterns
  • vale roll out ops#31

Changes

GitHub Workflow (.github/workflows/linting.yml)

  • Fixed Vale action version: Changed from incorrect @reviewdog to @v2.1.1
  • Added proper permissions: Added pull-requests: write and checks: write for PR interactions
  • Added MDX support: Install mdx2vast globally to enable Vale MDX parsing
  • Simplified file targeting: Use comma-separated format instead of JSON array
  • Added debugging: Verify Vale config and mdx2vast installation

Vale Configuration (.vale.ini)

  • Raised alert level: Changed from "suggestion" to "warning" to reduce noise
  • Enhanced file patterns: Added specific patterns for different content types (blog, docs, events)
  • Added MDX support: Include .mdx files in all patterns
  • Improved organization: Clear comments explaining each section

Custom Vocabulary (.github/styles/config/vocabularies/Docs/accept.txt)

  • Expanded terms: Added 40+ nf-core ecosystem terms including Nextflow, Seqera, containerization platforms, schedulers, and workflow engines

Pre-commit Integration (.pre-commit-config.yaml)

  • Added Vale hook: Enable local Vale linting with latest version (v3.7.1)
  • Configured for markdown: Run on .md and .mdx files

Why These Changes

The original issue was that Vale wasn't showing up in GitHub PR reviews. Root causes:

  1. Wrong action version: @reviewdog is not a valid Vale action version
  2. Missing MDX support: Vale needs mdx2vast to parse .mdx files
  3. Insufficient permissions: Workflow needs explicit PR write permissions
  4. Broken file reference: ${{inputs.DOC_SRC}} was undefined

@netlify /docs/contributing/project_proposals

- Fix Vale action version from @reviewdog to @v2.1.1
- Add proper workflow permissions for PR interactions
- Install mdx2vast globally for MDX format support
- Simplify files parameter to comma-separated format
- Add debug step to verify Vale and mdx2vast setup
- Enhance .vale.ini with better file patterns and warning level
- Expand vocabulary with nf-core ecosystem terms
- Add Vale to pre-commit hooks for local development

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for nf-core-main-site ready!

Name Link
🔨 Latest commit 5606726
🔍 Latest deploy log https://app.netlify.com/projects/nf-core-main-site/deploys/68e480756c29ac000845a311
😎 Deploy Preview https://deploy-preview-3509--nf-core-main-site.netlify.app/docs/contributing/project_proposals
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot deleted a comment from netlify bot Sep 25, 2025
@edmundmiller edmundmiller marked this pull request as draft September 25, 2025 14:22
@edmundmiller edmundmiller self-assigned this Sep 25, 2025
@edmundmiller edmundmiller force-pushed the fix/vale-configuration-improvements branch from a62cdae to 1e6e83d Compare September 25, 2025 15:35
Successfully forked and enhanced mdx2vast to support nf-core's custom
remark directive syntax like :::tip{title='Examples' collapse}.

Changes:
- Fork mdx2vast from jdkato/mdx2vast to edmundmiller/mdx2vast
- Add micromark-extension-directive and mdast-util-directive dependencies
- Implement containerDirective, leafDirective, textDirective handling
- Convert directives to HTML divs with proper classes and data attributes
- Update Vale workflow to use custom fork instead of original package

This resolves the MDX parsing runtime errors that were preventing Vale
from processing .mdx files with custom Astro directive syntax. Vale now
successfully lints MDX content and provides proper style feedback.
@edmundmiller edmundmiller force-pushed the fix/vale-configuration-improvements branch 7 times, most recently from 0191a3a to 12f1e7f Compare September 26, 2025 12:19
@edmundmiller
Copy link
Contributor Author

We can either turn off the "pre-commit run all" or make a follow-up PR, or ignore all of the current errors or fix them. Whatever y'all want to do.

@mashehu
Copy link
Contributor

mashehu commented Oct 3, 2025

@nf-core-bot fix linting

@edmundmiller
Copy link
Contributor Author

4549f1b

I didn't know you could do that! 👀

@christopher-hakkaart
Copy link
Member

This looks good to me... if it's still too noisy, we can roll it back.

nf-core
Nextflow
Seqera
SeqeraLabs

Choose a reason for hiding this comment

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

Suggested change
SeqeraLabs
SeqeraLabs

I'm not sure we need this, but it's not a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh we should actually not accept that.

Maybe in the links to GitHub repos?

Choose a reason for hiding this comment

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

I don't actually know how Vale reconciles code. If we are referring to SeqeraLabs, it's probably as part of a repository, so it should be in seqeralabs. Anything else should be Seqera.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in nf-core infrastructure projects Oct 5, 2025
@edmundmiller edmundmiller force-pushed the fix/vale-configuration-improvements branch from c4f5a6e to 5606726 Compare October 7, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants