Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[FEATURE]: Validate config options

オープン
#8,067 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript
領域
tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 10時間
マージ済み PR(30日)
30

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plotly/plotly.js のほかの issue

plotly/plotly.js の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。