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
51 changes: 51 additions & 0 deletions .github/instructions/pr-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
applyTo: '**'
---

# Pull Request Review Guidance

You are reviewing changes for @knighted/develop. Be concise, technical, and specific. Prioritize actionable feedback tied to concrete files and lines.

## Browser support policy

- Target evergreen browsers only (current stable Chrome, Edge, Safari, and Firefox).
- Do not require old-browser compatibility unless the PR explicitly expands support scope.
- Do not request legacy polyfills or fallback-only workarounds by default.

## Focus areas

- CDN-first runtime integrity: imports and fallback behavior should remain compatible with src/modules/cdn.js patterns.
- UI state correctness: drawers, toggles, dialogs, and compact/mobile states should remain synchronized and predictable.
- BYOT safety: token handling must stay browser-local, avoid leakage, and preserve clear user-facing privacy/removal cues.
- Accessibility and semantics: form controls, labels, button types, ARIA relationships, and keyboard interactions should be valid.
- Build and workflow stability: scripts and output behavior should remain consistent unless change is explicitly documented.
- Tests and docs alignment: behavior changes should update tests and relevant docs.

## What to verify

- No generated artifacts are edited (dist/, coverage/, test-results/).
- CDN import/fallback behavior is not bypassed with ad hoc URLs in feature modules.
- Sensitive values (PAT/token) are not logged or exposed in UI/status output.
- New UI behavior is covered in Playwright where appropriate.
- Lint/build expectations still pass for changed areas.

## Validation expectations

- Run npm run lint for code and HTML/a11y checks.
- Run npm run build when touching scripts/, bootstrap/runtime wiring, or import map behavior.
- For interactive UI changes, confirm behavior in compact/mobile layout and at least one non-default mode.

## Review output format

- Present findings first, ordered by severity.
- Label each finding as blocking, important, or nit.
- Include file reference and the minimal fix direction.
- Keep summary brief and secondary to findings.

## Ask for changes when

- Behavior changes ship without corresponding test updates.
- New dependencies are added without clear approval.
- Build/CI/import-map contracts change without docs updates.
- Accessibility regressions or semantic HTML issues are introduced.
- Feedback requests are based on unsupported legacy-browser constraints.
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ Repository structure:
- Maintain graceful fallback behavior when CDN modules fail to load.
- Keep the app usable in local dev without requiring a local bundle step.

## Browser support policy

- Target evergreen browsers only (current stable Chrome, Edge, Safari, and Firefox).
- Prefer platform features available in evergreen browsers without adding legacy polyfills.
- Do not add legacy-browser workarounds unless a task explicitly requires expanded support.
- In code review, treat requests for old-browser compatibility as out-of-scope unless documented.

## Testing and validation expectations

- Run npm run lint after JavaScript edits.
Expand Down
30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import playwright from 'eslint-plugin-playwright'
import tsParser from '@typescript-eslint/parser'
import htmlPlugin from '@html-eslint/eslint-plugin'

const playwrightConfig = playwright.configs['flat/recommended']
const htmlRecommendedConfig = htmlPlugin.configs['flat/recommended']

export default [
{
Expand All @@ -28,4 +30,32 @@ export default [
...playwrightConfig,
files: ['playwright/**/*.{ts,tsx,js,jsx}'],
},
{
...htmlRecommendedConfig,
files: ['src/**/*.html'],
},
{
files: ['src/**/*.html'],
plugins: {
'@html-eslint': htmlPlugin,
},
rules: {
// Formatting is delegated to Prettier; keep html-eslint focused on semantics and a11y.
'@html-eslint/indent': 'off',
'@html-eslint/attrs-newline': 'off',
'@html-eslint/element-newline': 'off',
'@html-eslint/no-extra-spacing-attrs': 'off',
'@html-eslint/require-closing-tags': 'off',
'@html-eslint/use-baseline': 'off',
'@html-eslint/require-input-label': 'error',
'@html-eslint/require-button-type': 'error',
'@html-eslint/no-accesskey-attrs': 'error',
'@html-eslint/no-positive-tabindex': 'error',
'@html-eslint/no-invalid-role': 'error',
'@html-eslint/no-redundant-role': 'error',
'@html-eslint/no-abstract-roles': 'error',
'@html-eslint/no-aria-hidden-body': 'error',
'@html-eslint/no-aria-hidden-on-focusable': 'error',
},
},
]
216 changes: 216 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading