Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/hooks/task-completed.sh → .claude/hooks/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -e
cd "$CLAUDE_PROJECT_DIR" 2>/dev/null || cd "$(git rev-parse --show-toplevel)" 2>/dev/null || exit 0
bun run format:fix && bun run lint && bun run test && bun run build
bun run format:fix && bun run ci
6 changes: 3 additions & 3 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"hooks": [
{
"type": "command",
"command": ".claude/hooks/session-start.sh"
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/session-start.sh"
}
]
}
],
"TaskCompleted": [
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/task-completed.sh",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/stop.sh",
"timeout": 30
}
]
Expand Down
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**Package**

Which package is affected?

- [ ] `@webq/eslint` — ESLint plugin
- [ ] `@webq/cli` — CLI / MCP server

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior. Include a minimal example where possible:

```html
<!-- Example HTML being validated -->
```

```js
// eslint.config.js (if applicable)
```

```bash
# CLI command (if applicable)
webq validate-html ...
```

**Expected behavior**

A clear and concise description of what you expected to happen.

**Actual behavior**

What actually happened, including any error output or incorrect rule messages.

**Environment**

- Package version: [e.g. 1.0.0]
- Node / Bun version: [e.g. Node 22, Bun 1.2]
- OS: [e.g. macOS 15, Ubuntu 24]
- ESLint version (if applicable): [e.g. 9.x]
- CEM file source: [e.g. generated by `@custom-elements-manifest/analyzer`]

**Additional context**

Add any other context about the problem here, such as your `webq.config.json` or relevant parts of your Custom Elements Manifest.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---

**Package**

Which package would this feature apply to?

- [ ] `@webq/eslint` — ESLint plugin
- [ ] `@webq/cli` — CLI / MCP server
- [ ] Both

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. For example: "I want to validate `my-attr` values but there is no rule for..."

**Describe the solution you'd like**

A clear and concise description of what you want to happen. If this involves a new validation rule, describe the rule behavior and what CEM field(s) it would check.

**Example**

If applicable, provide an example of the HTML, CEM definition, or CLI usage that would benefit from this feature:

```html
<!-- HTML that should be validated -->
```

```json
// Relevant CEM definition
```

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or workarounds you've considered.

**Additional context**

Add any other context or references here, such as links to related Custom Elements Manifest spec sections or similar tools.
22 changes: 0 additions & 22 deletions .github/workflows/build.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
48 changes: 48 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'

# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'
13 changes: 13 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Build
on: pull_request

jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- uses: google/wireit@setup-github-actions-caching/v2
- run: bun install
- run: bun run ci
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release
on:
push:
branches:
- main

jobs:
release:
name: Release
timeout-minutes: 20
runs-on: ubuntu-latest
permissions:
issues: write
deployments: write
pull-requests: write
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- uses: google/wireit@setup-github-actions-caching/v2
- run: bun install
- run: bun run ci
- name: Release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: WIREIT_PARALLEL=1 WIREIT_LOGGER=metrics bun run release
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
days-before-stale: 60
stale-pr-label: 'flag:stale'
stale-issue-label: 'flag:stale'
days-before-close: 180
stale-issue-message: 'Hello there 👋. This is an automated message to let you know that in order to keep the repository running smoothly, we automatically close issues and pull requests that have not been active for a while. If you would like to continue discussing this topic, please look for another open issue or create a new one with updated information, and include a reference to this issue as needed.'
stale-pr-message: 'Hello there 👋. This is an automated message to let you know that in order to keep the repository running smoothly, we automatically close issues and pull requests that have not been active for a while. If you would like to continue discussing this topic, please look for another open issue or create a new one with updated information, and include a reference to this issue as needed.'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
dist
.DS_Store
.crush
.wireit
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
.wireit
.coverage
CHANGELOG.md
bun.lock
*.bun-build
Loading
Loading