Skip to content

Commit

Permalink
fix(lsp): add schema for JSR related config options (#22497)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato authored Feb 20, 2024
1 parent 54a3eb5 commit 4201f17
Showing 1 changed file with 35 additions and 18 deletions.
53 changes: 35 additions & 18 deletions cli/schemas/config-file.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@
"description": "Specify a set of bundled library declaration files that describe the target runtime environment.",
"type": "array",
"uniqueItems": true,
"default": [
"deno.window"
],
"default": ["deno.window"],
"items": {
"type": "string"
},
Expand Down Expand Up @@ -308,11 +306,7 @@
},
"report": {
"default": "pretty",
"enum": [
"pretty",
"json",
"compact"
],
"enum": ["pretty", "json", "compact"],
"description": "The default report format to use when linting"
}
}
Expand Down Expand Up @@ -377,11 +371,7 @@
"proseWrap": {
"description": "Define how prose should be wrapped in Markdown files.",
"default": "always",
"enum": [
"always",
"never",
"preserve"
]
"enum": ["always", "never", "preserve"]
},
"semiColons": {
"description": "Whether to prefer using semicolons.",
Expand Down Expand Up @@ -414,11 +404,7 @@
"proseWrap": {
"description": "Define how prose should be wrapped in Markdown files.",
"default": "always",
"enum": [
"always",
"never",
"preserve"
]
"enum": ["always", "never", "preserve"]
},
"semiColons": {
"description": "Whether to prefer using semicolons.",
Expand Down Expand Up @@ -557,6 +543,37 @@
"items": {
"type": "string"
}
},
"name": {
"type": "string",
"description": "The name of this JSR package. Must be scoped",
"examples": ["@luca/flag"]
},
"version": {
"type": "string",
"description": "The version of this JSR package.",
"examples": ["0.1.0", "1.0.0"]
},
"exports": {
"oneOf": [
{
"type": "string",
"description": "The path to the main module of this JSR package.",
"examples": ["./mod.ts", "./index.js"],
"pattern": "^\\./.*$"
},
{
"type": "object",
"description": "A map of package exports to files in this JSR package.",
"patternProperties": {
"^\\.(/.*)?$": {
"type": "string",
"pattern": "^\\./.*$"
}
},
"examples": [{ ".": "./mod.ts" }]
}
]
}
}
}

0 comments on commit 4201f17

Please sign in to comment.