-
Notifications
You must be signed in to change notification settings - Fork 0
chore(tooling): pre-commit, component/a11y tests, bundle budget, dead-code + gated error tracking #623
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
Closed
Closed
chore(tooling): pre-commit, component/a11y tests, bundle budget, dead-code + gated error tracking #623
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
12cf134
chore(tooling): add pre-commit, component/a11y tests, bundle budget, …
BigSimmo 672fffc
chore: begin merge conflict resolution with origin/main
Copilot 06db701
chore: merge origin/main — resolve conflicts in ci.yml, package.json,…
Copilot 6bc52ff
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # EditorConfig — https://editorconfig.org | ||
| # Keeps editor defaults in lockstep with .prettierrc (printWidth 120, 2-space) | ||
| # and .gitattributes (`* text=auto eol=lf`). Editor-only; formatting is still | ||
| # enforced by Prettier — this just stops editors introducing CRLF / tab / stray | ||
| # trailing-whitespace churn before Prettier runs. | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| # Markdown: two trailing spaces are a meaningful hard line break, so do not strip them. | ||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
|
|
||
| # Generated by `supabase gen types`; keep the generator's formatting (also | ||
| # prettier-ignored in .prettierignore) so regeneration stays churn-free. | ||
| [src/lib/supabase/database.types.ts] | ||
| trim_trailing_whitespace = false | ||
| insert_final_newline = false |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/bin/sh | ||
| # Pre-commit hook: auto-format and lint staged files. | ||
| # Installed by scripts/install-git-hooks.mjs via `git config core.hooksPath .githooks`. | ||
| # | ||
| # Set GUARD_PRECOMMIT_DISABLE=1 to bypass (e.g. for emergency commits). | ||
| set -eu | ||
|
|
||
| if [ "${GUARD_PRECOMMIT_DISABLE:-}" = "1" ]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Resolve node; if unavailable, skip gracefully rather than block commits. | ||
| if ! command -v node >/dev/null 2>&1; then | ||
| echo "[pre-commit] node not found on PATH — skipping lint-staged" >&2 | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Resolve npx; likewise skip rather than block. | ||
| if ! command -v npx >/dev/null 2>&1; then | ||
| echo "[pre-commit] npx not found on PATH — skipping lint-staged" >&2 | ||
| exit 0 | ||
| fi | ||
|
|
||
| npx lint-staged | ||
Empty file.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # CODEOWNERS — https://docs.github.com/articles/about-code-owners | ||
| # | ||
| # This repo is currently single-maintainer, so every path resolves to the same | ||
| # owner. The value here is intent + automatic review routing on the high-risk | ||
| # surfaces called out in AGENTS.md (auth, migrations/RLS, RAG/retrieval, source | ||
| # governance, clinical output, production config). As collaborators join, add | ||
| # them to the specific sections below rather than only the catch-all. | ||
| # | ||
| # Later patterns win, so the catch-all comes first and high-risk paths override it. | ||
|
|
||
| # Catch-all | ||
| * @BigSimmo | ||
|
|
||
| # Database / migrations / RLS (destructive-change surface) | ||
| /supabase/ @BigSimmo | ||
|
|
||
| # Environment + security header contract | ||
| /src/lib/env.ts @BigSimmo | ||
| /src/lib/client-env.ts @BigSimmo | ||
| /src/lib/security-headers.ts @BigSimmo | ||
| /src/proxy.ts @BigSimmo | ||
| /src/instrumentation.ts @BigSimmo | ||
| /src/instrumentation-client.ts @BigSimmo | ||
|
|
||
| # RAG / retrieval / search / ranking | ||
| /src/lib/rag.ts @BigSimmo | ||
| /src/lib/rag-*.ts @BigSimmo | ||
| /src/lib/retrieval-*.ts @BigSimmo | ||
| /src/lib/*search*.ts @BigSimmo | ||
| /src/lib/privacy.ts @BigSimmo | ||
| /src/lib/query-privacy.ts @BigSimmo | ||
|
|
||
| # Source governance + clinical output | ||
| /scripts/audit-source-governance.ts @BigSimmo | ||
| /scripts/*governance*.ts @BigSimmo | ||
| /docs/clinical-governance.md @BigSimmo | ||
|
|
||
| # CI / release automation | ||
| /.github/workflows/ @BigSimmo |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}": ["prettier --write --ignore-unknown", "eslint --fix"], | ||
| "*.{json,md,yml,yaml,css,scss}": ["prettier --write --ignore-unknown"] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [ | ||
| { | ||
| "name": "Client JS — all route/chunk bundles (gzip)", | ||
| "path": ".next/static/chunks/**/*.js", | ||
| "limit": "1300 KB", | ||
| "gzip": true | ||
| } | ||
| ] |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/knip@6/schema.json", | ||
| "entry": [ | ||
| "src/instrumentation.ts", | ||
| "src/instrumentation-client.ts", | ||
| "src/proxy.ts", | ||
| "scripts/**/*.{ts,mjs,cjs}", | ||
| "worker/**/*.ts", | ||
| "playwright/**/*.ts", | ||
| "eslint-rules/**/*.mjs", | ||
| "tests/**/*.{test.ts,dom.test.tsx,spec.ts}", | ||
| "*.config.{ts,mts,mjs,cjs}" | ||
| ], | ||
| "project": ["src/**/*.{ts,tsx}", "scripts/**/*.{ts,mjs,cjs}", "worker/**/*.ts", "eslint-rules/**/*.mjs"], | ||
| "ignore": ["src/lib/supabase/database.types.ts", "**/*mockup*", "src/app/mockups/**", "supabase/functions/**"], | ||
| "ignoreDependencies": ["tailwindcss", "server-only"], | ||
| "ignoreBinaries": ["supabase", "semgrep", "gitleaks", "taskkill"], | ||
| "vitest": { "config": ["vitest.config.mts"] }, | ||
| "playwright": { "config": ["playwright.config.ts", "playwright.visual.config.ts"] } | ||
| } |
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
Oops, something went wrong.
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.
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: BigSimmo/Database
Length of output: 246
🏁 Script executed:
Repository: BigSimmo/Database
Length of output: 15456
🌐 Web query:
npm 11 npx --no-install npm exec --no-install local binary missing install from registry behavior💡 Result:
In npm 11 (as well as all versions since npm v7), the behavior of
npxandnpm exechas been standardized around thenpm execcommand [1][2][3]. Regarding your specific query: 1. Deprecation of --no-install: The--no-installoption is deprecated and is automatically converted to--no[1][2][4]. 2. Behavior with --no: When you use--no(or the deprecated--no-install), npm is explicitly instructed not to attempt to install any missing packages from the registry [2][3][5]. 3. Handling of Local Binaries: - By design,npxandnpm execinclude locally installed package executables in thePATHof the executed command [1][6][7]. - If a binary is already present in your project's local dependencies (e.g., innode_modules/.bin), it should be found and executed correctly regardless of the--noflag [1][3]. - If the binary is missing from the local dependencies and you use--no,npm execwill fail because it is prohibited from installing the package from the registry to resolve the command [2][5][8]. If you find that a locally available binary is not being detected when using--no, it may be related to specific configuration issues, such as workspace contexts or how the binary is defined inpackage.json[9]. If the binary is not part of the project's dependency tree,npmcannot execute it without performing an installation, which the--noflag prevents [2][3].Citations:
Prevent
npxfrom installinglint-stagedhere. Usenpx --no lint-staged(ornpm exec --no lint-staged) so a missing local binary fails instead of fetching an unpinned package from the registry.🤖 Prompt for AI Agents