Skip to content

Fix false-green JSON validation in shared Super-Linter config #463

Description

@IldarMinaev

Problem

The shared Super-Linter configuration enables JSON validation, but its custom ESLint configuration matches JavaScript and TypeScript only. Super-Linter therefore detects a changed malformed JSON file, reports that no matching configuration exists, and still completes run-lint successfully.

This false-green result was reproduced during the Renovate automerge negative-path pilot. It makes run-lint unsuitable as a required merge gate for consumers that expect JSON syntax validation.

Proposed outcome

  • Add regression fixtures that run the supported Super-Linter version with the shared configuration: malformed JSON must fail, valid JSON must pass, and existing JavaScript and TypeScript behavior must remain green.
  • Restore narrowly scoped validation for **/*.json by using the supported Super-Linter JSON configuration or an equivalent shared ESLint configuration.
  • Keep JSONC and JSON5 behavior unchanged unless a separate policy approves them.
  • Fail the regression test if a file type enabled by shared policy is silently ignored because no matching configuration exists.
  • Verify the central fix on representative direct consumers and on a public fork pull request.
  • Inventory local ESLint overrides and different Super-Linter pins; create project follow-ups only for consumers that cannot inherit the shared fix.
  • Document the validation contract used by required CI gates.

Acceptance criteria

  • The exact shared configuration fails on a malformed JSON fixture.
  • Valid JSON and existing JavaScript and TypeScript fixtures pass.
  • The JSON fixture is linted rather than reported as ignored.
  • A representative consumer receives a failed run-lint check for malformed JSON.
  • The same negative path works for a public fork pull request without secrets or elevated permissions.
  • Every consumer exception has a linked project issue or pull request.

Related work

This issue changes shared lint behavior only. Renovate policy, repository rulesets, and unrelated file-format validation remain outside its scope.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions