Skip to content

fix(schema): replace single-value enums with const and remove redundant type for better lint compliance#4831

Merged
madskristensen merged 2 commits intoSchemaStore:masterfrom
Karan-Palan:fix-schema-linting
Jul 7, 2025
Merged

fix(schema): replace single-value enums with const and remove redundant type for better lint compliance#4831
madskristensen merged 2 commits intoSchemaStore:masterfrom
Karan-Palan:fix-schema-linting

Conversation

@Karan-Palan
Copy link
Copy Markdown
Contributor

Description

This PR addresses warnings from the JSON schema linter.

  • Replaced all single-value enum properties with const
  • Removed redundant type when used with enum/const

Screenshots

Before and after:

Screencast.from.2025-07-06.23-04-40.webm

Note

I, along with Juan (JSON Schema TSC member) are defining linting rules for JSON Schema as a Part of a GSoC (Google Summer of code) project here - https://github.com/Karan-Palan/JSON-Schema-Linting, and implementing their auto-fixes here - https://github.com/sourcemeta/jsonschema/blob/main/docs/lint.markdown. If beneficial to the project, I suggest integrating the linter with it to write the best schemas and catch any errors and follow best practices.

…nt type for better lint compliance

Signed-off-by: karan-palan <karanpalan007@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 6, 2025

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@madskristensen madskristensen merged commit 20afe70 into SchemaStore:master Jul 7, 2025
4 checks passed
@madskristensen
Copy link
Copy Markdown
Contributor

Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants