SchemaStore / SchemaStore/schemastore

Add "relative path annotations" to schemas

Open
#3,582 0 comments 0 reactions 1 assignee View on GitHub

@hyperupcall is already working on this.

Since Feb 9, 2024.

Build Server
Dominant language
JavaScript
Stars
3.8k
Forks
2.3k
Avg merge
20h 23m
Merged PRs (30d)
124

Description

Description of the feature / enhancement.

In general, popular language servers have a nifty file-renaming feature. If a file is renamed, any corresponding imports in other files are changed to match. This is currently not possible with arbitrary JSON,YAML,TOML files (with a Schema). Consider the following package.json:

{
  "bin": "./bin/somefile.js"
}

The idea is to add an annotation to these types of files:

{
  "bin": {
    "type": "string",
    "x-metadata": {
      "isRelativeFilePath": true
    }
  }
}

That way, any LSPs have the required information to potentially perform a rename.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.