#296 📝 qa | automated pre commit linter enforcement fix#310
Open
Kappa16 wants to merge 2 commits into
Hidden character warning
The head ref may contain hidden characters: "#296-\ud83d\udcdd-QA-|-Automated-Pre-Commit-Linter-Enforcement-FIX"
Open
Conversation
|
@Kappa16 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📝 QA | Automated Pre-Commit Linter Enforcement FIXED
Key Findings
The pre-commit hook was incomplete and only executed npm run style:check via lint-staged. This setup limited checks to staged files and did not run a full ESLint scan across the entire codebase. As a result, 65 existing lint errors across src/, test/, tests/, and scripts/ were not detected during commits. The hook also lacked set -e, meaning failures would not reliably block commits if additional commands were added later. The lint issues included duplicate keys and imports, missing variables, incorrect regex escapes, unused imports, incorrect TypeScript ignore usage, missing Node globals, and overly strict ESLint rules affecting valid patterns such as constants and TypeScript global declarations. Some errors also came from load test and legacy metric directories treated as false positives.
Fix Features
The pre-commit pipeline was upgraded to enforce full codebase quality checks. A full npm run lint step now runs before any staged-file fixes and blocks commits on failure. lint-staged remains in place but now executes only after the full lint pass succeeds. The hook now includes set -e to ensure immediate exit on any error. After fixes, the lint state improved from 65 errors and 63 warnings to 0 errors and 57 warnings. Commit enforcement now covers the entire repository instead of only staged files, preventing previously undetected lint issues from entering the codebase.
CLOSE #296