Skip to content

docs(json-schema): add suggested extends values#41697

Merged
jamietanna merged 1 commit intomainfrom
docs/schema-extends
Mar 5, 2026
Merged

docs(json-schema): add suggested extends values#41697
jamietanna merged 1 commit intomainfrom
docs/schema-extends

Conversation

@jamietanna
Copy link
Contributor

Changes

As noted in #40439, it would be useful to provide editor suggestions for
the possible values of extends, so a user can start their
configuration with recommended presets.

We can do this using a custom anyOf that includes these options as an
enum.

Context

Please select one of the following:

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe): Claude Sonnet 4.5 (GitHub Copilot + crush)

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

As noted in #40439, it would be useful to provide editor suggestions for
the possible values of `extends`, so a user can start their
configuration with recommended presets.

We can do this using a custom `anyOf` that includes these options as an
`enum`.

Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
@github-actions github-actions bot requested a review from viceice March 5, 2026 12:41
@jamietanna
Copy link
Contributor Author

Before:

    "extends": {
      "description": "Configuration presets to use or extend.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "string"
        }
      ]
    },

After:

    "extends": {
      "description": "Configuration presets to use or extend.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "enum": [
                  "config:best-practices",
                  "config:recommended",
                  "mergeConfidence:all-badges",
                  "abandonments:recommended",
                  "group:all",
                  "replacements:all",
                  "security:minimumReleaseAgeNpm",
                  "security:only-security-updates"
                ]
              },
              {
                "type": "string"
              }
            ]
          }
        },
        {
          "type": "string"
        }
      ]
    },

Tested in Neovim and I can see that:

Screenshot 2026-03-05 at 12 42 43

@jamietanna jamietanna enabled auto-merge March 5, 2026 12:43
@jamietanna jamietanna added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit 3ebe3f0 Mar 5, 2026
46 checks passed
@jamietanna jamietanna deleted the docs/schema-extends branch March 5, 2026 12:53
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🎉 This PR is included in version 43.56.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Add common extends values to the JSON Schema suggestions

2 participants