-
Notifications
You must be signed in to change notification settings - Fork 1
Adds schema validation & coding assistance for .pug-lint.json files #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,38 @@ | |
| "description": "Run the linter on save (onSave) or on type (onType)." | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "languages": [ | ||
| { | ||
| "id": "json", | ||
| "filenames": [ | ||
| ".pug-lintrc", | ||
| ".jade-lintrc" | ||
| ] | ||
| } | ||
| ], | ||
| "jsonValidation": [ | ||
| { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, use one glob-pattern for all files. For example, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately I had to write the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it works for me in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess that's wildcard matching but not necessarily globbing. Or, as you said, it's a limited form of globbing that doesn't support brackets. I tested this morning with brackets and they didn't work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for clarification! 👍 |
||
| "fileMatch": ".pug-lintrc", | ||
| "url": "./schemas/pug-lintrc-schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ".pug-lintrc.json", | ||
| "url": "./schemas/pug-lintrc-schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ".pug-lint.json", | ||
| "url": "./schemas/pug-lintrc-schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ".jade-lintrc", | ||
| "url": "./schemas/pug-lintrc-schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ".jade-lint.json", | ||
| "url": "./schemas/pug-lintrc-schema.json" | ||
| } | ||
| ] | ||
| }, | ||
| "dependencies": { | ||
| "vscode-languageclient": "2.5.0", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, because VS Code uses the schema automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still necessary. For files without a
.jsonextension, VSCode defaults to "Plain Text" language mode, which means it does not use the JSON schema.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap, sounds reasonable 👍