Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[FEATURE]: Validate config options

Abierto
#8,067 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
tooling

Línea de trabajo

Look at the config object definition in src/plot_api/plot_config.js and the configAttributes schema. Use Lib.validate and Lib.warn from lib/index.js to check incoming config keys and values against the schema, skipping valType: 'any'. Test by creating a plot with an invalid config key like 'shapePositon' and verifying a warning appears in the console.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement feature P3 plotly-internal size: 3
Description

Validate the config object against configAttributes and warn on anything that does not match. Do not change the value.

Why should this feature be added?

Config is the only user-facing input plotly.js never checks. Plotly.validate takes data and layout only. A typo like edits: { shapePositon: true } does nothing, reports nothing, and costs the user an afternoon.

plotly.py already wants this. plotly/offline/offline.py warns on unknown keys from a hardcoded tuple, with the comment: "we don't have code generation logic in place yet to guarantee that the config options in plotly.py are up to date". Schema-driven validation in plotly.js gives every port the list.

Notes
  • An unknown key gets dropped with no notice
  • A value that fails its valType doesn't get stopped
  • We should warn on invalid values. Coercion would replace bad values with defaults and silently change charts that work today.
  • Utilize the existing Lib.validate and Lib.warn
  • Skip the five attributes whose valType is any. Lib.validate accepts anything for them.
  • This should only validate the incoming config, not the resolved _context
  • This might be noisy for users until configs are corrected
Lenguaje dominante
JavaScript
Estrellas
18.3k
Forks
2k
Merge medio
2 d 10 h
PR fusionados (30 d)
30

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de plotly/plotly.js

Todos los issues de plotly/plotly.js

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.