Skip to content

Conversation

@justlevine
Copy link
Contributor

@justlevine justlevine commented Jan 10, 2026

What?

Closes

This PR aligns our scaffolding with those from abilities-api (which underwent a lot more code review ) and other WordPress/* plugins.

Why?

More broadly, standardization (and WPCS) remove friction and make it easier to contribute, especially on a relative small team working on several isolated codebases.

More practically, better harnesses prevent issues from slipping through.

How?

  1. .editorconfig is now WPCS (didn't reformat existing files to avoid unnecessary merge conflict noise).
  2. .eslintrc to .eslintrc.cjs - where it can itself be linted. Also gains some best practice sniffs.
  3. .gitattributes and .gitignore are now sorted semantically and cleaned a bit
  4. Adds a basic tsconfig.json + missing npm run lint:js:fix and npm run typecheck commands, and TS checking to our ci/cd.

Testing Instructions

See the failing CI from typescript.

Testing Instructions for Keyboard

Screenshots or screencast

Before After
Open WordPress Playground Preview

Copy link
Contributor

Copilot AI left a comment

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 standardizes scaffold and configuration files to align with WordPress Coding Standards and best practices from other WordPress plugins. The changes focus on linting, type checking, and build configuration without affecting runtime code.

Changes:

  • Migrated ESLint configuration from .eslintrc to .eslintrc.cjs with additional rules and TypeScript support
  • Added comprehensive TypeScript configuration (tsconfig.json) and type checking to CI/CD pipeline
  • Reorganized and cleaned up .gitignore and .gitattributes for better semantic grouping
  • Updated .editorconfig to align with WPCS standards
  • Added missing npm scripts (lint:js:fix, typecheck) and corrected PHP script references

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.eslintrc.cjs New ESLint config with enhanced rules, TypeScript support, and best practices from Gutenberg
.eslintrc Removed old JSON-format ESLint config
tsconfig.json New TypeScript configuration with strict type checking and project-specific settings
package.json Added typecheck script, lint:js:fix script, and corrected phpstan script reference
.editorconfig Updated to match WPCS with separate rules for different file types
.gitignore Reorganized with semantic grouping and added AI-related files, cache, and TypeScript artifacts
.gitattributes Restructured with better organization and linguist annotations for documentation
.github/workflows/test.yml Added TypeScript typechecking step to CI/CD pipeline
phpunit.xml.dist Updated schema version from 9.2 to 9.3
phpstan.neon.dist Simplified vendor exclusion path from vendor/**/* to vendor/
phpcs.xml.dist Removed unused dist directory exclusion pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@justlevine justlevine marked this pull request as ready for review January 10, 2026 14:23
@github-actions
Copy link

github-actions bot commented Jan 10, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: justlevine <justlevine@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

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

Overall looks fine to me though noting there is an eslint error to resolve first

@justlevine
Copy link
Contributor Author

@dkotter - 45c3c25 manually remediates the typescript to get the ci passing, but if it's too large of a footprint I can kick it into a separate PR.

@justlevine justlevine requested a review from dkotter January 12, 2026 20:14
@jeffpaul jeffpaul merged commit 64dbc13 into develop Jan 13, 2026
21 of 22 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in WordPress AI Planning & Roadmap Jan 13, 2026
@jeffpaul jeffpaul deleted the chore/scaffold-cleanup branch January 13, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants