Skip to content

Refactor/config build process#102

Merged
krugazul merged 3 commits into
masterfrom
refactor/config-build-process
Dec 20, 2025
Merged

Refactor/config build process#102
krugazul merged 3 commits into
masterfrom
refactor/config-build-process

Conversation

@krugazul

Copy link
Copy Markdown
Contributor

This pull request introduces a comprehensive development environment setup and streamlines configuration for the TO Specials plugin project. It adds devcontainer support with Docker-based WordPress and MySQL services, enforces code quality and formatting standards, and removes legacy static analysis and code coverage configs. The changes also improve project documentation, build, and distribution hygiene.

Development environment setup:

  • Added a full-featured .devcontainer configuration, including Dockerfile, devcontainer.json, and docker-compose.yml, to enable local development with WordPress, MySQL, phpMyAdmin, Node.js, Composer, Playwright, and VSCode extensions. This supports rapid plugin development and testing in a consistent environment. [1] [2] [3]

Code quality and tooling:

  • Introduced .eslintrc.json with WordPress JavaScript standards and project-specific rules, and added .browserslistrc to define browser support targets for frontend assets. [1] [2]
  • Added .coderabbit.yaml to provide detailed review, linting, and documentation instructions tailored to WordPress and the TO Specials plugin, improving code review automation and consistency.

Project hygiene and distribution:

  • Updated .distignore and .gitattributes to better control which files are included in plugin distributions and archives, ensuring only necessary files are shipped and that line endings are consistent across platforms. [1] [2]

Cleanup of legacy configs:

  • Removed .codeclimate.yml and .codecov.yml, indicating a shift away from legacy static analysis and coverage tools in favor of new linting and review workflows. [1] [2]

Introduces development container setup with Docker, VS Code, and Codespaces support, adds ESLint and Stylelint configuration, and Playwright E2E test config. Removes legacy CI and build files (.travis.yml, .scrutinizer.yml, .codeclimate.yml, .codecov.yml, gulpfile.js, package.json.bak). Updates .gitattributes for improved export and line ending handling. Adds coding standards and review instructions, collection schema, and various GitHub workflow assets. Renames .phpcs.xml to .github/linting/phpcs.xml and adds phpcs.xml.dist for coding standards.
…p formatting; add .prettierignore for better code style management
@krugazul krugazul added this to the v2.1.0 milestone Dec 20, 2025
@krugazul krugazul self-assigned this Dec 20, 2025
@github-project-automation github-project-automation Bot moved this to Needs Triage in Tour Operator Dec 20, 2025
@krugazul krugazul merged commit 63c8619 into master Dec 20, 2025
2 of 6 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Triage to ✅ Done in Tour Operator Dec 20, 2025
@coderabbitai

coderabbitai Bot commented Dec 20, 2025

Copy link
Copy Markdown

Warning

Rate limit exceeded

@krugazul has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 12 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 9e11b8e and c6c3dc4.

⛔ Files ignored due to path filters (2)
  • composer.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (55)
  • .browserslistrc (1 hunks)
  • .codeclimate.yml (0 hunks)
  • .codecov.yml (0 hunks)
  • .coderabbit.yaml (1 hunks)
  • .devcontainer/Dockerfile (1 hunks)
  • .devcontainer/devcontainer.json (1 hunks)
  • .devcontainer/docker-compose.yml (1 hunks)
  • .distignore (1 hunks)
  • .eslintrc.json (1 hunks)
  • .gitattributes (1 hunks)
  • .github/agents/accessibility-auditor.agent.md (1 hunks)
  • .github/agents/block-architect.agent.md (1 hunks)
  • .github/agents/theme-architect.agent.md (1 hunks)
  • .github/chatmodes/accessibility-expert.chatmode.md (1 hunks)
  • .github/chatmodes/block-plugin-developer.chatmode.md (1 hunks)
  • .github/chatmodes/block-theme-developer.chatmode.md (1 hunks)
  • .github/codespaces/devcontainer.json (1 hunks)
  • .github/collections/TEMPLATE.md (1 hunks)
  • .github/instructions/coding-standards.instructions.md (1 hunks)
  • .github/instructions/html-template.instructions.md (1 hunks)
  • .github/instructions/javascript-react.instructions.md (1 hunks)
  • .github/instructions/php-wordpress.instructions.md (1 hunks)
  • .github/instructions/playwright-tests.instructions.md (1 hunks)
  • .github/instructions/theme-json.instructions.md (1 hunks)
  • .github/prompts/accessibility-audit.prompt.md (1 hunks)
  • .github/prompts/accessibility-review.prompt.md (1 hunks)
  • .github/prompts/configure-theme-json.prompt.md (1 hunks)
  • .github/prompts/create-block-patterns.prompt.md (1 hunks)
  • .github/prompts/create-gutenberg-block.prompt.md (1 hunks)
  • .github/prompts/dev-code-review.prompt.md (1 hunks)
  • .github/prompts/pattern-generation.prompt.md (1 hunks)
  • .github/prompts/refactor-theme-types.prompt.md (1 hunks)
  • .github/scripts/fix-line-endings.sh (1 hunks)
  • .gitignore (1 hunks)
  • .npmrc (1 hunks)
  • .prettierignore (1 hunks)
  • .prettierrc.js (1 hunks)
  • .schemas/collection.schema.json (1 hunks)
  • .scrutinizer.yml (0 hunks)
  • .stylelintrc.json (1 hunks)
  • .travis.yml (0 hunks)
  • .vscode/mcp.json (1 hunks)
  • .vscode/settings.json (1 hunks)
  • assets/css/to-specials-admin.scss (1 hunks)
  • assets/css/to-specials.scss (1 hunks)
  • assets/js/to-specials-admin.js (1 hunks)
  • assets/js/to-specials.js (1 hunks)
  • composer.json (1 hunks)
  • gulpfile.js (0 hunks)
  • package.json (2 hunks)
  • package.json.bak (0 hunks)
  • phpcs.xml.dist (1 hunks)
  • playwright.config.js (1 hunks)
  • stylelint.config.js (1 hunks)
  • webpack.config.js (1 hunks)

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'commands', 'linked_issues'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/config-build-process

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@krugazul krugazul deleted the refactor/config-build-process branch December 20, 2025 10:11
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @krugazul, 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 significantly refactors the project's development and build infrastructure. The changes aim to modernize the development workflow, improve code quality, and ensure better project hygiene by introducing a robust Docker-based development environment, implementing new linting and code review tools, and removing legacy configurations. This will lead to a more streamlined and consistent development process for the TO Specials plugin.

Highlights

  • Development Environment Setup: Introduced a comprehensive devcontainer configuration with Docker-based WordPress, MySQL, phpMyAdmin, Node.js, Composer, Playwright, and VSCode extensions for a consistent local development experience.
  • Code Quality and Tooling: Added ESLint with WordPress JavaScript standards, Browserslist for browser support targets, and Coderabbit for automated code review and documentation tailored to the project.
  • Project Hygiene and Distribution: Updated .distignore and .gitattributes to ensure only necessary files are included in plugin distributions and archives, and to standardize line endings.
  • Cleanup of Legacy Configurations: Removed outdated static analysis (.codeclimate.yml) and code coverage (.codecov.yml) configurations, streamlining the project's tooling.
  • New GitHub Workflow and Documentation Assets: Added numerous GitHub agent definitions, chat modes, instructions, and prompts to enhance development workflows, code reviews, and documentation practices within the repository.
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.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request is a significant and valuable refactoring of the project's build process and development environment. The introduction of a devcontainer, standardized linting, formatting, and testing scripts via package.json and composer.json will greatly improve developer experience and code quality. The cleanup of old configuration files is also a welcome change.

My review focuses on a few areas to further refine the new setup:

  • Streamlining the Docker build process to remove redundancy.
  • Improving security by avoiding hardcoded credentials in the docker-compose configuration.
  • Correcting some minor issues in the newly added documentation and prompt files.

Overall, this is an excellent update that modernizes the project's tooling.

Comment thread .devcontainer/Dockerfile
Comment on lines +41 to +47
# Copy package files and install dependencies
COPY package*.json ./
RUN npm install

# Copy composer files and install dependencies
COPY composer.json composer.lock* ./
RUN composer install --no-dev --optimize-autoloader

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

These steps to copy package manager files and install dependencies should be removed from the Dockerfile. They are redundant because devcontainer.json's postCreateCommand already handles npm install and composer install. More importantly, these Dockerfile commands run during the image build, potentially on outdated lock files, and before the actual project workspace is mounted. The composer install --no-dev command is also incorrect for a development container, as development dependencies are essential for tasks like testing and linting. The installation should happen in the postCreateCommand to ensure it uses the latest files from your workspace and includes dev dependencies.

}
},
"forwardPorts": [3000, 8000, 8080, 9000],
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y wget unzip && composer install && npm install",

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 postCreateCommand is a bit redundant. The apt-get update and apt-get install -y wget unzip commands are already executed in the Dockerfile. To streamline the setup and avoid unnecessary steps, this command should be simplified to only install project dependencies.

Suggested change
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y wget unzip && composer install && npm install",
"postCreateCommand": "composer install && npm install",

Comment on lines +8 to +12
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress

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

Hardcoding credentials, even for a local development environment, is not a good practice. It can lead to accidental commits of sensitive information if this pattern is copied elsewhere. It's better to use environment variables sourced from a .env file, with sensible defaults for convenience. This allows each developer to have their own local credentials without committing them to the repository. Remember to add .env to your .gitignore file.

    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wordpress}
      WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:-wordpress}
      WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME:-wordpress}

Comment on lines +21 to +25
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_ROOT_PASSWORD: rootpassword

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

Hardcoding credentials, even for a local development environment, is not a good practice. It can lead to accidental commits of sensitive information if this pattern is copied elsewhere. It's better to use environment variables sourced from a .env file, with sensible defaults for convenience. This allows each developer to have their own local credentials without committing them to the repository. Remember to add .env to your .gitignore file.

    environment:
      MYSQL_DATABASE: ${MYSQL_DATABASE:-wordpress}
      MYSQL_USER: ${MYSQL_USER:-wordpress}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-wordpress}
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword}

Comment on lines +35 to +38
environment:
PMA_HOST: db
PMA_USER: wordpress
PMA_PASSWORD: wordpress

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

Hardcoding credentials, even for a local development environment, is not a good practice. It can lead to accidental commits of sensitive information if this pattern is copied elsewhere. It's better to use environment variables sourced from a .env file, with sensible defaults for convenience. This allows each developer to have their own local credentials without committing them to the repository. Remember to add .env to your .gitignore file.

    environment:
      PMA_HOST: db
      PMA_USER: ${PMA_USER:-wordpress}
      PMA_PASSWORD: ${PMA_PASSWORD:-wordpress}

Comment on lines +2 to +33
title: "Playwr - documentation
- instructions
- guides
version: "1.0.0"
permalink: "/instructions/playwright-tests"
license: "GPL-3.0"
type: "instructions"
mode: "agent"
author: "LightSpeedWP Team"
contributors:
- name: "Ash Shaw"
github: "ashleyshaw"
- name: "LightSpeedWP"
github: "lightspeedwp"
tags:
- playwright
- testing
- automation
- browser
- MCP
- CI/CD
- best-practices
categories:
- documentation
- instructions
- guides
version: "1.0.0"
permalink: "/instructions/playwright-tests"

type: "instructions"
mode: "agent"
---

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 YAML frontmatter in this file appears to be malformed due to duplicated keys (title, categories, version, permalink, type, mode). This was likely a copy-paste error and will cause issues with any tools that parse this frontmatter. Please consolidate the keys to create a valid YAML block.

---
title: "Playwright Test Instructions"
description: "Guidelines for writing, organizing, and maintaining Playwright tests for LightSpeed projects, with a focus on WordPress themes, blocks, and custom patterns."
author: "LightSpeedWP Team"
contributors:
  - name: "Ash Shaw"
    github: "ashleyshaw"
  - name: "LightSpeedWP"
    github: "lightspeedwp"
tags:
    - playwright
    - testing
    - automation
    - browser
    - MCP
    - CI/CD
    - best-practices
categories:
    - documentation
    - instructions
    - guides
version: "1.0.0"
permalink: "/instructions/playwright-tests"
license: "GPL-3.0"
type: "instructions"
mode: "agent"
---

Comment on lines +17 to +27
Refactor the `typography` section in `theme.json`:
- Add named font sizes using slugs (e.g. small, medium, large)
- Include fluid scaling settings where appropriate
- Ensure all typography tokens match the project’s design system
- Provide the updated JSON snippet

Refactor the `typography` section in `theme.json`:
- Add named font sizes using slugs (e.g. small, medium, large)
- Include fluid scaling settings where appropriate
- Ensure all typography tokens match the LSX Design System
- Provide the updated JSON snippet

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

This prompt has duplicated sections. The second section seems to be a more specific version of the first (referencing 'LSX Design System'). Please remove the duplicated and less specific section to improve clarity.

Suggested change
Refactor the `typography` section in `theme.json`:
- Add named font sizes using slugs (e.g. small, medium, large)
- Include fluid scaling settings where appropriate
- Ensure all typography tokens match the project’s design system
- Provide the updated JSON snippet
Refactor the `typography` section in `theme.json`:
- Add named font sizes using slugs (e.g. small, medium, large)
- Include fluid scaling settings where appropriate
- Ensure all typography tokens match the LSX Design System
- Provide the updated JSON snippet
Refactor the `typography` section in `theme.json`:
- Add named font sizes using slugs (e.g. small, medium, large)
- Include fluid scaling settings where appropriate
- Ensure all typography tokens match the LSX Design System
- Provide the updated JSON snippet

Comment thread composer.json
"require": {
"php": ">=7.2",
"composer/installers": "^2.0.0"
"php": ">=8.0",

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

Updating the required PHP version to >=8.0 is a good move. To ensure all developers and the CI environment use a consistent PHP version for dependency resolution, it's a best practice to specify the target PHP version in your composer.json config.platform. This prevents composer from installing packages incompatible with your target production environment.

        "php": ">=8.0"

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

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants