feat(ci): add GitHub Actions for linting and formatting#2
Conversation
- 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)
Summary of ChangesHello @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 Highlights
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| @@ -0,0 +1,4 @@ | |||
| node_modules/ | |||
| package-lock.json | |||
There was a problem hiding this comment.
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.
| "url": "https://github.com/duyet/claude-plugins/issues" | ||
| }, | ||
| "scripts": { | ||
| "lint": "markdownlint '**/*.md' --ignore node_modules", |
There was a problem hiding this comment.
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.
| "lint": "markdownlint '**/*.md' --ignore node_modules", | |
| "lint": "markdownlint '**/*.md'", |
| "format": "prettier --check '**/*.md' --ignore-path .gitignore", | ||
| "format:fix": "prettier --write '**/*.md' --ignore-path .gitignore" |
There was a problem hiding this comment.
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.
| "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.
…hCqSjfwZc523E55y556 feat(ci): add GitHub Actions for linting and formatting
No description provided.