Skip to content

feat(ci): add GitHub Actions for linting and formatting#2

Merged
duyet merged 4 commits into
masterfrom
claude/add-github-actions-lint-01XddhCqSjfwZc523E55y556
Nov 17, 2025
Merged

feat(ci): add GitHub Actions for linting and formatting#2
duyet merged 4 commits into
masterfrom
claude/add-github-actions-lint-01XddhCqSjfwZc523E55y556

Conversation

@duyet
Copy link
Copy Markdown
Owner

@duyet duyet commented Nov 17, 2025

No description provided.

- Add package.json with markdownlint and prettier dependencies
- Configure markdownlint with sensible defaults for markdown files
- Configure prettier for consistent markdown formatting
- Create GitHub Actions workflow to run lint and format checks on push and PR
- Add .gitignore to exclude node_modules and build artifacts

The workflow runs on:
- Push to main and claude/** branches
- Pull requests to main branch
- Add repository URL pointing to github.com/duyet/claude-plugins
- Add homepage and bugs URLs
- Set author to duyet
- Add additional keywords (automation, workflow)
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Sorry @duyet, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @duyet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes foundational tooling for maintaining code quality and consistency within the project. By integrating markdownlint for Markdown files and prettier for general code formatting, it aims to standardize the codebase's appearance and structure. These tools are managed through npm scripts, providing an easy way to run checks and apply fixes, ultimately streamlining the development workflow and ensuring a high standard of code hygiene.

Highlights

  • Linting Configuration: Introduced markdownlint with a .markdownlint.json configuration to enforce consistent Markdown style across the project. Specific rules (MD013, MD033, MD041) have been disabled to allow for more flexibility.
  • Formatting Setup: Added prettier for automatic code formatting, configured via .prettierrc.json to ensure consistent code style. A .prettierignore file was also included to exclude specific directories and files from formatting.
  • Development Dependencies and Scripts: A new package.json file has been created, defining markdownlint-cli and prettier as development dependencies. It also includes convenient npm scripts (lint, format, format:fix) to easily run these tools.
  • Git Ignore Rules: A .gitignore file was added to prevent common development artifacts like node_modules/, package-lock.json, .DS_Store, and log files from being committed to the repository.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/lint.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces linting and formatting for markdown files using markdownlint and prettier, which is a great step for maintaining code quality. The configuration is mostly solid, but I have a few suggestions to improve consistency, remove redundancy in the npm scripts, and align with best practices for dependency management by tracking the package-lock.json file.

Comment thread .gitignore Outdated
@@ -0,0 +1,4 @@
node_modules/
package-lock.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

For applications and private projects (as indicated by "private": true in package.json), it's a best practice to commit package-lock.json. This ensures that every developer and the CI environment uses the exact same dependency versions, which guarantees reproducible builds and helps prevent "it works on my machine" issues.

Comment thread package.json Outdated
"url": "https://github.com/duyet/claude-plugins/issues"
},
"scripts": {
"lint": "markdownlint '**/*.md' --ignore node_modules",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The markdownlint-cli tool respects .gitignore by default, where node_modules/ is already listed. Therefore, the --ignore node_modules flag is redundant and can be removed to simplify the script.

Suggested change
"lint": "markdownlint '**/*.md' --ignore node_modules",
"lint": "markdownlint '**/*.md'",

Comment thread package.json Outdated
Comment on lines +16 to +17
"format": "prettier --check '**/*.md' --ignore-path .gitignore",
"format:fix": "prettier --write '**/*.md' --ignore-path .gitignore"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

These scripts are configured to use .gitignore for ignoring files, which makes the newly added .prettierignore file unused. Prettier automatically finds and uses .prettierignore by default. To keep configuration files dedicated to their tools, it's better to let Prettier use its own ignore file. Please remove the --ignore-path .gitignore flag from both scripts.

Suggested change
"format": "prettier --check '**/*.md' --ignore-path .gitignore",
"format:fix": "prettier --write '**/*.md' --ignore-path .gitignore"
"format": "prettier --check '**/*.md'",
"format:fix": "prettier --write '**/*.md'"

- Replace npm-based linting with super-linter GitHub Action
- Remove package.json and all npm dependencies
- Remove markdownlint, prettier, and related config files
- Update workflow to use super-linter@v7.2.0 with full git history
- Simplify .gitignore (no longer need node_modules)
- Add required permissions for super-linter (contents, packages, statuses)

Benefits:
- Simpler setup with no npm dependencies
- Comprehensive linting for all file types in one action
- Maintained by GitHub super-linter team
- Add H1 heading to commit-commands.md (MD041 compliance)
- Capitalize "git" to "Git" and "markdown" to "Markdown" (natural language linting)
- Fix prettier formatting for YAML (use double quotes)
- Fix markdown formatting and line wrapping

All linting checks should now pass.
@duyet duyet changed the base branch from claude/init-plugin-marketplace-01Fjcfp7sqiQSnwf4oCmMiKt to master November 17, 2025 10:49
@duyet duyet merged commit 1af55a2 into master Nov 17, 2025
12 checks passed
duyet added a commit that referenced this pull request Jan 5, 2026
…hCqSjfwZc523E55y556

feat(ci): add GitHub Actions for linting and formatting
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