-
Notifications
You must be signed in to change notification settings - Fork 40
chore: cleanup scaffold files #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
.eslintrcto.eslintrc.cjswith additional rules and TypeScript support - Added comprehensive TypeScript configuration (
tsconfig.json) and type checking to CI/CD pipeline - Reorganized and cleaned up
.gitignoreand.gitattributesfor better semantic grouping - Updated
.editorconfigto 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>
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
dkotter
left a comment
There was a problem hiding this 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
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?
.editorconfigis now WPCS (didn't reformat existing files to avoid unnecessary merge conflict noise)..eslintrcto.eslintrc.cjs- where it can itself be linted. Also gains some best practice sniffs..gitattributesand.gitignoreare now sorted semantically and cleaned a bittsconfig.json+ missingnpm run lint:js:fixandnpm run typecheckcommands, and TS checking to our ci/cd.Testing Instructions
See the failing CI from typescript.
Testing Instructions for Keyboard
Screenshots or screencast