-
Notifications
You must be signed in to change notification settings - Fork 2
chore(yarn): upgrade deps #185
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1 @@ | ||
| #!/usr/bin/env sh | ||
| . "$(dirname -- "$0")/_/husky.sh" | ||
|
|
||
| npx --no -- commitlint --edit ${1} | ||
| npx --no -- commitlint --edit ${1} | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1 @@ | ||||||||||
| #!/usr/bin/env sh | ||||||||||
| . "$(dirname "$0")/_/husky.sh" | ||||||||||
|
|
||||||||||
| npx lint-staged | ||||||||||
| npx lint-staged | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainUse npx with --no, add a shebang, and restore a trailing newline for portability and reliability
Apply this diff: -npx lint-staged
+#!/usr/bin/env sh
+set -euo pipefail
+npx --no -- lint-stagedRun this to confirm hooks are executable and won’t hit the network: 🏁 Script executed: #!/bin/bash
set -euo pipefail
# 1) Ensure the hook is executable
if [ ! -x .husky/pre-commit ]; then
echo "ERROR: .husky/pre-commit is not executable. Run: chmod +x .husky/pre-commit"
exit 1
fi
# 2) Verify lint-staged is a local devDependency (prevents npx from installing from the network)
jq -r '.devDependencies["lint-staged"] // empty' package.json | grep -qE '^[0-9]' \
&& echo "OK: lint-staged is in devDependencies" \
|| { echo "WARNING: lint-staged not found in devDependencies"; exit 1; }
# 3) Check the hook content
echo "Hook content:"
nl -ba .husky/pre-commitLength of output: 256 Fix .husky/pre-commit: add shebang, safety flags, use Verification output: "WARNING: lint-staged not found in devDependencies" — using plain Files to change:
Suggested diff: -npx lint-staged
+#!/usr/bin/env sh
+set -euo pipefail
+npx --no -- lint-stagedActions:
📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1 @@ | ||||||
| { "*.ts": "yarn lint:fix" } | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainPattern will miss files in subfolders; include tsx and prefer direct eslint invocation
Apply this diff: -{ "*.ts": "yarn lint:fix" }
+{ "**/*.{ts,tsx}": "eslint --fix --max-warnings=0" }If you must keep the script, at least fix the pattern: -{ "*.ts": "yarn lint:fix" }
+{ "**/*.{ts,tsx}": "yarn lint:fix" }Verify your lint script can accept file arguments (lint-staged appends them): 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Show the configured script
jq -r '.scripts["lint:fix"] // empty' package.json
# Heuristic check: ensure it calls eslint
jq -r '.scripts["lint:fix"] // empty' package.json | grep -qi 'eslint' \
&& echo "OK: lint:fix appears to run ESLint" \
|| echo "WARNING: lint:fix may not run ESLint; ensure it forwards file args"Length of output: 283 Fix lint-staged pattern and ensure lint script accepts staged file args Verified: package.json -> scripts.lint:fix =
Files to change:
Recommended change (preferred: call eslint directly from lint-staged): -{ "*.ts": "yarn lint:fix" }
+{ "**/*.{ts,tsx}": "eslint --fix --max-warnings=0" }If you must keep the package script, at minimum fix the pattern so nested files are matched: -{ "*.ts": "yarn lint:fix" }
+{ "**/*.{ts,tsx}": "yarn lint:fix" }Also ensure 📝 Committable suggestion
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,11 @@ | ||||||||||||||||||
| import tseslint from "typescript-eslint"; | ||||||||||||||||||
|
|
||||||||||||||||||
| export default [ | ||||||||||||||||||
| ...tseslint.configs.recommended, | ||||||||||||||||||
| { | ||||||||||||||||||
| files: ["src/**/*.ts"], | ||||||||||||||||||
| rules: { | ||||||||||||||||||
| "@typescript-eslint/no-explicit-any": "off", | ||||||||||||||||||
| }, | ||||||||||||||||||
|
Comment on lines
+6
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainWiden file globs to include all TS/TSX files across the repo The current Apply this diff: - files: ["src/**/*.ts"],
+ files: ["**/*.{ts,tsx}"],Optional: If you want to be explicit about parser options or ignore build artifacts, you can extend: // Example additions (outside the changed lines)
languageOptions: {
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
},
ignores: ["dist/**"],Please confirm you’re using ESLint v9+ and the 🏁 Script executed: #!/bin/bash
set -euo pipefail
# ESLint version
jq -r '.devDependencies.eslint // empty' package.json
# typescript-eslint meta package presence
jq -r '.devDependencies["typescript-eslint"] // empty' package.jsonLength of output: 161 Widen ESLint file globs to include all .ts/.tsx files across the repo The current
- files: ["src/**/*.ts"],
+ files: ["**/*.{ts,tsx}"],Verified: ESLint v^9.33.0 and 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| }, | ||||||||||||||||||
| ]; | ||||||||||||||||||
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.
💡 Verification agent
🧩 Analysis chain
Quote the path argument, use --no, and add a shebang for robustness
$1to handle paths with spaces.--noto avoid network resolution.Apply this diff:
Confirm the hook is executable and consistent with pre-commit:
🏁 Script executed:
Length of output: 175
🏁 Script executed:
Length of output: 1081
Add a shebang + strict mode and quote the commit message path in .husky/commit-msg
Short: .husky/commit-msg is executable and already uses
--no, but it lacks a shebang/strict mode and uses an unquoted${1}. .husky/pre-commit also lacks a shebang — make hooks consistent.Files to update:
npx --no -- commitlint --edit ${1}(executable). Apply below patch.npx lint-staged(executable). Consider adding the same shebang/strict-mode for consistency.Apply this diff for .husky/commit-msg:
Optional, for consistency, update .husky/pre-commit similarly:
📝 Committable suggestion
🤖 Prompt for AI Agents