fix: resolve architecture validation errors and warnings
- Fix JS-008: Replace raw fetch() with apiClient in letzshop-vendor-directory.js - Fix JS-005: Add init guard to letzshop-vendor-directory.js - Fix JS-004: Increase search region in validator (800→2000 chars) to detect currentPage in files with setup code before return statement - Fix JS-001: Use centralized logger in media-picker.js - Fix API-002: Move database query from onboarding.py to order_service.py - Fix FE-001: Add noqa comment to search.html (shop uses custom themed pagination) - Add audit validator to validate_all.py script - Update frontend.yaml with vendor exclusion pattern Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -615,7 +615,8 @@ class ArchitectureValidator:
|
||||
line_num = content[:func_start].count("\n") + 1
|
||||
|
||||
# Check if currentPage is set in the return object
|
||||
search_region = content[func_start : func_start + 800]
|
||||
# Use larger region to handle functions with setup code before return
|
||||
search_region = content[func_start : func_start + 2000]
|
||||
if "return {" in search_region:
|
||||
return_match = re.search(
|
||||
r"return\s*\{([^}]{0,500})", search_region, re.DOTALL
|
||||
@@ -2913,10 +2914,11 @@ class ArchitectureValidator:
|
||||
self.result.files_checked += len(js_files)
|
||||
|
||||
for file_path in js_files:
|
||||
# Skip third-party vendor libraries
|
||||
if "/vendor/" in str(file_path) and file_path.suffix == ".js":
|
||||
if any(x in file_path.name for x in [".min.js", "chart.", "alpine."]):
|
||||
continue
|
||||
# Skip third-party libraries in static/shared/js/lib/
|
||||
# Note: static/vendor/js/ is our app's vendor dashboard code (NOT third-party)
|
||||
file_path_str = str(file_path)
|
||||
if "/shared/js/lib/" in file_path_str or "\\shared\\js\\lib\\" in file_path_str:
|
||||
continue
|
||||
|
||||
content = file_path.read_text()
|
||||
lines = content.split("\n")
|
||||
|
||||
Reference in New Issue
Block a user