cdn-and-caching-strategy: any firebase.json counts as a web-serving surface, also one with no hosting
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- firebase, typescript
- Área
- performance
Línea de trabajo
La lista de archivos está en src/laws/performance/cdn-caching-strategy.ts: WEB_SURFACE_FILES en la línea 18 incluye firebase.json, y hasWebAssets, alrededor de las líneas 33-36, devuelve true siempre que ese archivo exista. Cambia la comprobación para que firebase.json solo cuente cuando su JSON parseado tenga una clave hosting. Está terminado cuando un proyecto cuyo firebase.json solo contiene ajustes de firestore se reporta como no aplicable, y uno con hosting sigue ejecutando la ley.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version: 8.0.1 (tag v8.0.1)
Law: cdn-and-caching-strategy (CDN and Caching Strategy), CdnCachingStrategyLaw.hasWebAssets
What happens
WEB_SURFACE_FILES (src/laws/performance/cdn-caching-strategy.ts:18) lists firebase.json, and hasWebAssets (:33-36) returns true when the file exists. The law then judges the project for CDN configuration, browser caching headers and service-worker caching.
firebase.json configures several products. Only its hosting key declares something served to browsers; firestore, functions, storage and emulators do not.
Reproduction
A Python API (pyproject.toml, api/main.py with FastAPI) whose firebase.json is { "firestore": { "rules": "firestore.rules", "indexes": "firestore.indexes.json" } }, laws.enabled { "CDN and Caching Strategy": true }:
1. CDN and Caching Strategy [5 violations] (Score: 0/100)
• CDN configuration not implemented
• Browser caching headers not configured
• Service worker caching not implemented
Without firebase.json the same project gets "Not applicable — no web assets to serve".
What I ruled out
No other web-surface file and no JS/TS sources in the fixture: firebase.json alone switches the law on.
Why it matters
The law asks a JSON API for a service worker. The only ways out are a waiver or deleting a config the project needs for its database.
Suggested direction
- Count
firebase.jsonas a web surface only when it has ahostingkey. - Apply the same idea to other multi-purpose configs in the list where a key decides it (for example
wrangler.tomlwith[site]/assets).
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 2 h 36 min
- PR fusionados (30 d)
- 168
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Rule-Of-Code/RoC
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Rule-Of-Code/RoC#548 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Rule-Of-Code/RoC#506 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Rule-Of-Code/RoC#501 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
Rule-Of-Code/RoC#563 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
Rule-Of-Code/RoC#562 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Rule-Of-Code/RoC
Issues similares
-
bug done
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
neavo/LinguaGacha#1124 ·
Los mantenedores suelen responder en 1 día
-
[fullsend] E2E: backstage-microsoft-auth — catalogQuery missing error handler for network errorsPosiblemente ocupada @fullsend-ai-coder la tomó hoy. Abiertoe2e-failure ready-to-code
Dificultad 2/5 Menos de una hora Aptitud para principiantes 78/100
redhat-developer/rhdh-plugin-export-overlays#4821 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
brylie/mission-island#225 ·
Los mantenedores suelen responder en 1 día
-
status/need-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
google-gemini/gemini-cli#30412 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día