mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #227] Add $schema to schema #2042
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2042
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @moltar on GitHub (Oct 12, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/227
Adding the "$schema" prop would allow IDE support for IntelliSense.
One can add it to the config file themselves, but then IDE throws a little warning that "Property $schema is not allowed." Not a big deal, but it'd be nice to do away without the warning.
@moltar commented on GitHub (Oct 12, 2019):
@DavidAnson commented on GitHub (Oct 12, 2019):
VS Code with the
markdownlintextension installed should already offer schema-based hints and completion without any changes required. What editor are you using above? And what would be necessary to prevent it from complaining about the$schemaproperty?@DavidAnson commented on GitHub (Oct 12, 2019):
What I’m finding on the web suggests that the
$schemakeyword only belongs in the schema itself, and not in the data - which is what.markdownlint.jsonrepresents in your example above.https://json-schema.org/understanding-json-schema/basics.html
If you could please include a link to some documentation explaining the scenario you show, that would be greatly appreciated!
@moltar commented on GitHub (Oct 14, 2019):
Maybe it's just VS Code specific, but it is documented here, and I can confirm it works.
https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings
Even without the
markdownlintVS Code extension, I get IntelliSense.Here's a video demo of that: https://drive.google.com/file/d/14TvQkNnwSFo80upePXA-oUudln-qIWMP/view?usp=drivesdk
I renamed
$schemato_$schemafirst to disable the behavior, which then produces meaningless IntelliSense suggestions. After I renamed it back, the IS came back.@DavidAnson commented on GitHub (Oct 14, 2019):
Thanks. This should be fine to add.