Skip to content

fix(lint): resolve JSON blocking errors (39 of 53)#7170

Open
jstirnaman wants to merge 2 commits intomasterfrom
fix/lint-json-blocking-errors
Open

fix(lint): resolve JSON blocking errors (39 of 53)#7170
jstirnaman wants to merge 2 commits intomasterfrom
fix/lint-json-blocking-errors

Conversation

@jstirnaman
Copy link
Copy Markdown
Contributor

Summary

Fixes 39 of 53 JSON blocking errors flagged by yarn lint-codeblocks on content/. The remaining 14 are all in generated content/telegraf/v1/{input,output,processor}-plugins/** files (per content/telegraf/CLAUDE.md) and need to be fixed upstream in influxdata/telegraf first.

Content fixes by pattern

Pattern Files Fix
Multi-document JSON output (JSONL) 2 Relabel jsonjsonl (linter already supports JSONL mode)
Apache Arrow RECORD BATCH output (Go FlightSQL) 4 Relabel jsontext
Single-property fragments (config to add to header / request body) 5 Wrap in { ... } to produce valid JSON objects
Trailing commas 9 errors across 6 files Remove the trailing comma
Missing comma 1 (kapacitor api.md) Add the comma
Bare placeholder integer (XXXXXXXXX) 1 Replace with sample value (987654321)
Multi-line string with literal newlines 1 Join into a single string with \n escapes
Wrong fence language (Go syntax tagged json) 1 Relabel jsongo
Illustrative templates with comments / placeholders / elision 8 errors across 6 files Relabel jsontext

Deferred to upstream influxdata/telegraf (14 errors)

  • content/telegraf/v1/input-plugins/bind/_index.md (1)
  • content/telegraf/v1/input-plugins/ctrlx_datalayer/_index.md (3)
  • content/telegraf/v1/input-plugins/docker/_index.md (2)
  • content/telegraf/v1/output-plugins/azure_data_explorer/_index.md (1)
  • content/telegraf/v1/output-plugins/clarify/_index.md (1)
  • content/telegraf/v1/output-plugins/elasticsearch/_index.md (2)
  • content/telegraf/v1/output-plugins/zabbix/_index.md (2)
  • content/telegraf/v1/processor-plugins/lookup/_index.md (2)

These docs are generated from influxdata/telegraf plugin READMEs (per content/telegraf/CLAUDE.md). Any fix in docs-v2 would be reverted on the next sync; they need upstream PRs first. Will file an issue/PR upstream after this lands.

Verification

  • yarn test:lint-codeblocks: 59/59 pass
  • Re-running yarn lint-codeblocks on the affected files: 0 JSON errors remain in editable files
  • All other \``json` blocks across the repo continue to parse (no regressions)

Test plan

  • CI passes
  • Spot-check rendered output on the changed files (JSON syntax highlighting preserved on the still-json blocks; text/go/jsonl highlighting on the relabeled blocks)

Content fixes by pattern:

JSONL relabel — 2 files
  shared/influxdb3-admin/databases/list.md
  shared/influxdb3-query-guides/execute-queries/influxdb3-cli.md
  Multi-document JSON output (one object per line) was tagged `json`,
  which only parses a single document. Relabel as `jsonl`, which the
  linter validates with the JSONL mode of the JSON validator.

Apache Arrow output — 4 files (Go FlightSQL guides)
  shared/influxdb-client-libraries-reference/flight/go-flight.md
  influxdb3/{cloud-dedicated,cloud-serverless,clustered}/reference/client-libraries/flight/go-flight.md
  Blocks contained `RECORD BATCH\n[...]` — Apache Arrow Go reader
  output, not JSON. Relabel as `text` since `RECORD BATCH` is a
  literal heading printed by `fmt.Println`, and stripping it would
  destroy fidelity to the actual program output.

Wrap partial property fragments in {} — 5 files
  shared/influxdb-client-libraries-reference/flight/java-flightsql.md
  influxdb3/{cloud-dedicated,cloud-serverless,clustered}/reference/client-libraries/flight/java-flightsql.md
  shared/influxdb-v2/monitor-alert/notification-endpoints/create.md
  influxdb/cloud/query-data/parameterized-queries.md
  Single-key fragments like `"database": "DATABASE_NAME"` are not
  valid JSON. The blocks document configuration to add to a metadata
  header / request body, so wrapping in `{ ... }` produces a valid
  JSON object users can copy-paste verbatim.

Trailing-comma fixes — kapacitor/v1/working/api.md (4 errors),
  enterprise_influxdb/.../authorization-api.md, the two influxdb3
  databases/list.md files, the cloud-dedicated tokens list.md, and
  the clustered prerequisites.md. JSON disallows trailing commas;
  removed them.

Missing comma — kapacitor/v1/working/api.md (1)
  `"name": "slack"` was followed by a property without a separating
  comma. Added it.

Replace bare placeholder values
  kapacitor/v1/reference/event_handlers/telegram.md
  `"update_id":XXXXXXXXX` was a bare placeholder for an integer.
  Replaced with `987654321` (parallels the format of other IDs in
  the same example).

Multi-line string with literal newlines (1)
  shared/influxdb3-write-guides/troubleshoot-distributed.md
  `"message"` value spanned multiple lines with literal newlines —
  not valid JSON. Joined into a single string with `\n` escapes.

Wrong fence language
  telegraf/v1/data_formats/input/prometheus-remote-write.md
  Block was Go syntax (`prompb.WriteRequest{...}`). Relabel as `go`.

Relabel non-JSON illustrations as `text` — 8 errors across 4 files
  shared/influxdb-v2/process-data/task-options.md (4)
  shared/influxdb-v2/process-data/get-started.md (3)
  kapacitor/v1/working/api.md (1)
  kapacitor/v1/reference/cli/kapacitor/vars.md (1)
  influxdb/cloud/api-guide/api-invokable-scripts/_index.md (2)
  enterprise_influxdb/.../replacing-nodes.md (1)
  telegraf/v1/data_formats/output/msgpack.md (1)
  Each block contained one or more of: bare ellipsis (`...`)
  indicating elided properties, JS-style `// comments` (JSON has no
  comment syntax), bare `<PLACEHOLDER>` values, multi-line strings
  with literal newlines, or unescaped embedded `"` characters. These
  are illustrative templates / partial program output, not values
  users would copy verbatim. Relabel preserves readability without
  blocking CI.

Deferred to upstream telegraf README sync (14 errors):
  input-plugins/bind, ctrlx_datalayer, docker
  output-plugins/azure_data_explorer, clarify, elasticsearch, zabbix
  processor-plugins/lookup
  These docs are generated from influxdata/telegraf README files per
  content/telegraf/CLAUDE.md. Any fix here would be reverted on the
  next sync; they need to be filed and fixed upstream first.

Test coverage: 59/59 lint-codeblocks tests still pass.
@jstirnaman jstirnaman requested a review from a team as a code owner April 29, 2026 18:55
@jstirnaman jstirnaman requested review from sanderson and removed request for a team April 29, 2026 18:55
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

Vale Style Check Results

Metric Count
Errors 20
Warnings 5
Suggestions 60

Errors (blocking)

File Line Rule Message
content/influxdb3/cloud-serverless/reference/client-libraries/flight/java-flightsql.md 20 Vale.Repetition 'location' is repeated!
content/influxdb3/cloud-serverless/reference/client-libraries/flight/java-flightsql.md 23 Google.Spacing 'g.M' should have one space.
content/influxdb3/cloud-serverless/reference/client-libraries/flight/java-flightsql.md 25 Google.Spacing 'e.F' should have one space.
content/influxdb3/cloud-serverless/reference/client-libraries/flight/java-flightsql.md 36 Vale.Repetition 'flightInfo' is repeated!
content/influxdb3/clustered/reference/client-libraries/flight/java-flightsql.md 20 Vale.Repetition 'location' is repeated!
content/influxdb3/clustered/reference/client-libraries/flight/java-flightsql.md 23 Google.Spacing 'g.M' should have one space.
content/influxdb3/clustered/reference/client-libraries/flight/java-flightsql.md 25 Google.Spacing 'e.F' should have one space.
content/influxdb3/clustered/reference/client-libraries/flight/java-flightsql.md 36 Vale.Repetition 'flightInfo' is repeated!
content/influxdb3/cloud-dedicated/reference/client-libraries/flight/java-flightsql.md 20 Vale.Repetition 'location' is repeated!
content/influxdb3/cloud-dedicated/reference/client-libraries/flight/java-flightsql.md 23 Google.Spacing 'g.M' should have one space.
content/influxdb3/cloud-dedicated/reference/client-libraries/flight/java-flightsql.md 25 Google.Spacing 'e.F' should have one space.
content/influxdb3/cloud-dedicated/reference/client-libraries/flight/java-flightsql.md 36 Vale.Repetition 'flightInfo' is repeated!
content/influxdb3/core/reference/client-libraries/flight/java-flightsql.md 20 Vale.Repetition 'location' is repeated!
content/influxdb3/core/reference/client-libraries/flight/java-flightsql.md 23 Google.Spacing 'g.M' should have one space.
content/influxdb3/core/reference/client-libraries/flight/java-flightsql.md 25 Google.Spacing 'e.F' should have one space.
content/influxdb3/core/reference/client-libraries/flight/java-flightsql.md 36 Vale.Repetition 'flightInfo' is repeated!
content/influxdb3/enterprise/reference/client-libraries/flight/java-flightsql.md 20 Vale.Repetition 'location' is repeated!
content/influxdb3/enterprise/reference/client-libraries/flight/java-flightsql.md 23 Google.Spacing 'g.M' should have one space.
content/influxdb3/enterprise/reference/client-libraries/flight/java-flightsql.md 25 Google.Spacing 'e.F' should have one space.
content/influxdb3/enterprise/reference/client-libraries/flight/java-flightsql.md 36 Vale.Repetition 'flightInfo' is repeated!
Warnings (5)
File Line Rule Message
content/influxdb3/cloud-serverless/reference/client-libraries/flight/java-flightsql.md 3 Cloud-Serverless.Branding Did you mean 'bucket' instead of 'database'
content/influxdb3/core/admin/databases/list.md 22 InfluxDataDocs.WordList Use 'administrator' instead of 'admin'.
content/influxdb3/enterprise/admin/databases/list.md 22 InfluxDataDocs.WordList Use 'administrator' instead of 'admin'.
content/telegraf/v1/data_formats/input/prometheus-remote-write.md 69 InfluxDataDocs.Spelling Did you really mean 'fieldname'?
content/telegraf/v1/data_formats/input/prometheus-remote-write.md 69 InfluxDataDocs.Spelling Did you really mean 'fieldname'?

Check failed — fix 20 error(s) before merging.

@github-actions github-actions Bot added product:kapacitor Kapacitor documentation product:shared Shared content across products product:telegraf Telegraf documentation product:v1-enterprise InfluxDB Enterprise v1 product:v2 InfluxDB v2 (Cloud TSM, OSS) product:v2-cloud InfluxDB Cloud (TSM) product:v3-distributed InfluxDB 3 Cloud Serverless, Cloud Dedicated, Clustered product:v3-monolith InfluxDB 3 Core and Enterprise (single-node / clusterable) labels Apr 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

PR Preview Action v1.4.8
🚀 Deployed preview to https://influxdata.github.io/docs-v2/pr-preview/pr-7170/
on branch gh-pages at 2026-05-01 17:45 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

📦 PR Preview — Preview Bot

Status Details
Result ✅ DEPLOYED
Preview View preview
Pages 36 page(s) deployed
Build time 72s
Last updated 2026-05-01 17:46:01 UTC
Pages included in this preview
  • /enterprise_influxdb/v1/administration/manage/clusters/replacing-nodes/
  • /enterprise_influxdb/v1/administration/manage/users-and-permissions/authorization-api/
  • /influxdb/cloud/api-guide/api-invokable-scripts/
  • /influxdb/cloud/query-data/parameterized-queries/
  • /influxdb3/cloud-dedicated/admin/databases/list/
  • /influxdb3/cloud-dedicated/admin/tokens/database/list/
  • /influxdb3/cloud-dedicated/reference/client-libraries/flight/go-flight/
  • /influxdb3/cloud-dedicated/reference/client-libraries/flight/java-flightsql/
  • /influxdb3/cloud-serverless/reference/client-libraries/flight/go-flight/
  • /influxdb3/cloud-serverless/reference/client-libraries/flight/java-flightsql/
  • /influxdb3/clustered/admin/databases/list/
  • /influxdb3/clustered/install/set-up-cluster/prerequisites/
  • /influxdb3/clustered/reference/client-libraries/flight/go-flight/
  • /influxdb3/clustered/reference/client-libraries/flight/java-flightsql/
  • /kapacitor/v1/reference/cli/kapacitor/vars/
  • /kapacitor/v1/reference/event_handlers/telegram/
  • /kapacitor/v1/working/api/
  • /telegraf/v1/data_formats/input/prometheus-remote-write/
  • /telegraf/v1/data_formats/output/msgpack/
  • /influxdb3/enterprise/reference/client-libraries/flight/go-flight/
  • ... and 16 more

Preview auto-deploys on push. Will be cleaned up when PR closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:kapacitor Kapacitor documentation product:shared Shared content across products product:telegraf Telegraf documentation product:v1-enterprise InfluxDB Enterprise v1 product:v2-cloud InfluxDB Cloud (TSM) product:v2 InfluxDB v2 (Cloud TSM, OSS) product:v3-distributed InfluxDB 3 Cloud Serverless, Cloud Dedicated, Clustered product:v3-monolith InfluxDB 3 Core and Enterprise (single-node / clusterable)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant