redhat-developer / redhat-developer/yaml-language-server

Specify schema from a Node dependency / node_modules

Open
#977 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.5k
Forks
352
Avg merge
2d 7h
Merged PRs (30d)
11

Description

Summary

Is it possible to specify a schema file from a project dependency without a relative path into node_modules?

Relevant information

Something like this:

# yaml-language-server: $schema=my-library/schema.json
my-yaml-content: Goes here

with package.json:

{
  "devDependencies": {
    "my-library": "*"
  }
}

The full relative path looks like this:

# yaml-language-server: $schema=../../../node_modules/my-library/schema.json
my-yaml-content: Goes here

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.

Research direction

Start with the $schema directive example and the dependency declaration in package.json, then trace how schema references are resolved relative to node_modules. Done means a schema can be selected by package name (my-library/schema.json) without a relative path into node_modules, while existing relative references remain valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.