Fix manifest icon references and add file reference linter

Manifest fixes:
- Updated all icon references from .png to .svg files
- Changed MIME types from image/png to image/svg+xml
- Removed missing screenshots section
- Fixed HTML favicon references to use SVG files

New reference linter (lint-references.py):
- Validates all file references in HTML and manifest files
- Checks that referenced files actually exist
- Prevents broken links and missing assets
- Integrated into justfile as 'validate-references'
- Added to check-all command for comprehensive validation

Justfile enhancements:
- Added validate-references command
- Updated check-all to include reference validation
- Enhanced validate command with reference checking

Documentation updates:
- Updated CLAUDE.md with reference validation info
- Added file reference checking to code quality standards

This prevents issues where manifest/HTML reference non-existent files,
improving PWA reliability and catching asset mismatches early.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-18 20:18:51 +02:00
commit 35c7d0bdc9
5 changed files with 179 additions and 31 deletions

View file

@ -55,8 +55,8 @@ lint-all: lint-js lint-python
format-all: format-python format
@echo "✓ All formatting completed"
# Check everything (linting + formatting)
check-all: lint-all check-format
# Check everything (linting + formatting + references)
check-all: lint-all check-format validate-references
@echo "✓ All checks passed"
# PWA icon generation
@ -97,8 +97,12 @@ validate-html:
validate-manifest:
python3 -m json.tool app/manifest.json > /dev/null && echo "✓ Manifest is valid JSON"
# Check file references (HTML, manifest)
validate-references:
python3 lint-references.py
# Run all validations
validate: validate-html validate-manifest check-all
validate: validate-html validate-manifest validate-references check-all
@echo "✓ All validations passed"
# Git helpers