Skip to content

Commit db3119d

Browse files
chore: initialize the project
0 parents  commit db3119d

22 files changed

+1928
-0
lines changed

.commitlintrc.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://json.schemastore.org/commitlintrc.json",
3+
"extends": ["@commitlint/config-conventional"],
4+
"rules": {
5+
"type-enum": [
6+
2,
7+
"always",
8+
[
9+
"feat",
10+
"fix",
11+
"docs",
12+
"style",
13+
"refactor",
14+
"perf",
15+
"test",
16+
"build",
17+
"ci",
18+
"chore",
19+
"revert"
20+
]
21+
],
22+
"subject-case": [2, "never", ["upper-case", "pascal-case", "snake-case"]],
23+
"subject-empty": [2, "never"],
24+
"subject-full-stop": [2, "never", "."],
25+
"header-max-length": [2, "always", 100],
26+
"body-leading-blank": [2, "always"],
27+
"footer-leading-blank": [2, "always"]
28+
}
29+
}

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# This applies to all files
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
charset = utf-8
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.{yml,yaml}]
16+
indent_size = 2

.gitattributes

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Export ignore patterns
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
/.github/ export-ignore
5+
/scripts export-ignore
6+
/.editorconfig export-ignore
7+
/package.json export-ignore
8+
/package-lock.json export-ignore
9+
/.commitlintrc.json export-ignore
10+
/.release-please-manifest.json export-ignore
11+
/release-please-config.json export-ignore
12+
/.husky/ export-ignore
13+
/CHANGELOG.md export-ignore
14+
/CODE_OF_CONDUCT.md export-ignore
15+
/CONTRIBUTING.md export-ignore
16+
/README.md export-ignore
17+
/SECURITY.md export-ignore
18+
19+
# Language detection - mark as PHP project
20+
*.json linguist-vendored
21+
*.md linguist-documentation
22+
package.json linguist-vendored
23+
package-lock.json linguist-vendored
24+
node_modules/* linguist-vendored
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug Report
3+
about: Report a problem with the coding standard
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear description of the bug.
12+
13+
## Code Sample
14+
15+
```php
16+
// PHP code that triggers the issue
17+
```
18+
19+
## Command & Output
20+
21+
```bash
22+
vendor/bin/phpcs --standard=WPTechnixWordPress file.php
23+
```
24+
25+
```
26+
Paste the phpcs output here
27+
```
28+
29+
## Expected Behavior
30+
31+
What you expected to happen.
32+
33+
## Environment
34+
35+
- PHP Version:
36+
- PHPCS Version:
37+
- Package Version:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Description
2+
3+
Summary of changes.
4+
5+
Fixes #(issue)
6+
7+
## Type
8+
9+
- [ ] Bug fix
10+
- [ ] New rule/feature
11+
- [ ] Breaking change
12+
- [ ] Documentation
13+
14+
## Checklist
15+
16+
- [ ] Follows [Conventional Commits](https://www.conventionalcommits.org/)
17+
- [ ] Tested with sample PHP code
18+
- [ ] No conflicts with existing rules

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
updates:
3+
# npm dependencies (commitlint)
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
open-pull-requests-limit: 3
9+
groups:
10+
commitlint:
11+
patterns:
12+
- "@commitlint/*"
13+
dev-dependencies:
14+
patterns:
15+
- "husky"
16+
labels:
17+
- "dependencies"
18+
- "tooling"
19+
commit-message:
20+
prefix: "chore(deps)"
21+
22+
# GitHub Actions
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
open-pull-requests-limit: 2
28+
labels:
29+
- "dependencies"
30+
- "ci"
31+
commit-message:
32+
prefix: "chore(ci)"

.github/workflows/commitlint.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Commitlint
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
push:
7+
branches:
8+
- main
9+
- master
10+
11+
jobs:
12+
commitlint:
13+
name: Validate Commit Messages
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v6
23+
with:
24+
node-version: '20'
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Validate current commit (push)
31+
if: github.event_name == 'push'
32+
run: |
33+
# Check if this is the first commit
34+
if git rev-parse HEAD~1 >/dev/null 2>&1; then
35+
# Not the first commit, validate from previous commit
36+
npx commitlint --from HEAD~1 --to HEAD --verbose
37+
else
38+
# First commit, validate only HEAD
39+
npx commitlint --from HEAD --to HEAD --verbose
40+
fi
41+
42+
- name: Validate PR commits
43+
if: github.event_name == 'pull_request'
44+
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
release-please:
15+
name: Create Release PR
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Run Release Please
19+
uses: googleapis/release-please-action@v4
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
config-file: release-please-config.json
23+
manifest-file: .release-please-manifest.json

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Composer
2+
/vendor/
3+
composer.lock
4+
composer.phar
5+
6+
# IDE
7+
.idea/
8+
.vscode/
9+
*.sublime-project
10+
*.sublime-workspace
11+
12+
# OS
13+
.DS_Store
14+
Thumbs.db
15+
16+
# Node modules (for commitlint)
17+
node_modules/
18+
19+
# Note: package-lock.json is intentionally tracked for reproducible builds
20+
# .npmrc enforces engine-strict for team consistency
21+
22+
# Logs
23+
*.log
24+
25+
# Claude settings
26+
/.claude/

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit ${1}

0 commit comments

Comments
 (0)