Add coding standards and other dev tools - #7
Merged
Conversation
Closed
Member
Author
Didn't mean to trigger this and cancelled. |
Member
Author
|
@aduth I reviewed the feedback you had on #2 and made these changes in this PR:
Other Notes:
|
Collaborator
|
In my opinion, we should merge this as it is and iterate. At these very early stages, I think it's better that we get some rules and standards in place early, and if we encounter a need to change things later, we can make those changes in smaller, more discrete changes where the reasoning can be more easily followed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds the coding-standards toolchain for the plugin: Composer + PHPCS + PHPStan baseline, EditorConfig/
.nvmrc, ESLint + Stylelint + lint-staged, a Husky pre-commit hook, a CI GitHub Actions workflow, GitHub issue templates (bug report / feature request), a PR template, and a baseCONTRIBUTING.md.Why?
Establishes consistent PHP/JS/CSS style and static analysis across the codebase, and gives contributors structured templates and documentation for filing issues and PRs, ahead of more people working on the plugin.
How?
composer.json,phpcs.xml.dist,phpstan.neon.distpackage.json,eslint.config.js,.stylelintrc.json,.editorconfig,.nvmrc.husky/pre-commit(lint-staged + project-wide PHPStan).github/workflows/ci.yml.github/ISSUE_TEMPLATE/bug_report.yml,.github/ISSUE_TEMPLATE/feature_request.yml,.github/PULL_REQUEST_TEMPLATE.md,CONTRIBUTING.mdTesting Instructions
nvm use && composer install && npm inpm run lint(JS, CSS, PHPCS, PHPStan) andcomposer phpstanto confirm the toolchain executes correctly.workflow_dispatch).Changelog Entry
Checklist
npm run lintpasses locally (JS, CSS, PHPCS, PHPStan) — not yet green repo-wide, see notes belowCONTRIBUTING.md)Notes for Reviewers
workflow_dispatchonly) pending team review of the trigger conditions. See the commented-outon:block inci.ymlfor the intended final config (push tomain+ pull requests). Will flip this once approved.