-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add new djLint JSON schema * add JSON schema * add catalog * add test cases * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f725c82
commit fd34ef2
Showing
4 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"profile": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{ | ||
"$comment": "Source: https://www.djlint.com/docs/configuration", | ||
"$id": "https://json.schemastore.org/djlint.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"default": { | ||
"format_attribute_template_tags": false, | ||
"profile": "html" | ||
}, | ||
"definitions": { | ||
"css-beautify": { | ||
"type": "object" | ||
}, | ||
"js-beautify": { | ||
"type": "object" | ||
} | ||
}, | ||
"properties": { | ||
"blank_line_after_tag": { | ||
"type": "string" | ||
}, | ||
"blank_line_before_tag": { | ||
"type": "string" | ||
}, | ||
"close_void_tags": { | ||
"type": "boolean" | ||
}, | ||
"css": { | ||
"$ref": "#/definitions/css-beautify" | ||
}, | ||
"custom_blocks": { | ||
"type": "string" | ||
}, | ||
"custom_html": { | ||
"type": "string" | ||
}, | ||
"exclude": { | ||
"type": "string" | ||
}, | ||
"extend_exclude": { | ||
"type": "string" | ||
}, | ||
"extension": { | ||
"type": "string" | ||
}, | ||
"files": { | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
}, | ||
"format_attribute_template_tags": { | ||
"type": "boolean" | ||
}, | ||
"format_css": { | ||
"type": "boolean" | ||
}, | ||
"format_js": { | ||
"type": "boolean" | ||
}, | ||
"ignore": { | ||
"type": "string" | ||
}, | ||
"ignore_blocks": { | ||
"type": "string" | ||
}, | ||
"ignore_case": { | ||
"type": "boolean" | ||
}, | ||
"include": { | ||
"type": "string" | ||
}, | ||
"indent": { | ||
"type": "number" | ||
}, | ||
"js": { | ||
"$ref": "#/definitions/js-beautify" | ||
}, | ||
"line_break_after_multiline_tag": { | ||
"type": "boolean" | ||
}, | ||
"linter_output_format": { | ||
"examples": ["{filename}:{line}: {code} {message} {match}"], | ||
"type": "string" | ||
}, | ||
"max_attribute_length": { | ||
"type": "number" | ||
}, | ||
"max_blank_lines": { | ||
"type": "number" | ||
}, | ||
"max_line_length": { | ||
"type": "number" | ||
}, | ||
"no_function_formatting": { | ||
"type": "boolean" | ||
}, | ||
"no_line_after_yaml": { | ||
"type": "boolean" | ||
}, | ||
"no_set_formatting": { | ||
"type": "boolean" | ||
}, | ||
"per-file-ignores": { | ||
"type": "object" | ||
}, | ||
"preserve_blank_lines": { | ||
"type": "boolean" | ||
}, | ||
"preserve_leading_space": { | ||
"type": "boolean" | ||
}, | ||
"profile": { | ||
"enum": [ | ||
"html", | ||
"django", | ||
"jinja", | ||
"nunjucks", | ||
"handlebars", | ||
"golang", | ||
"angular" | ||
] | ||
}, | ||
"require_pragma": { | ||
"type": "boolean" | ||
}, | ||
"use_gitignore": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"title": "djlint schema", | ||
"description": "JSON schema for djLint's configuration file", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"blank_line_after_tag": "load,extends,include", | ||
"blank_line_before_tag": "load,extends,include", | ||
"close_void_tags": true, | ||
"css": { | ||
"indent_size": 5 | ||
}, | ||
"custom_blocks": "toc,example", | ||
"custom_html": "mjml,simple-greeting,mj-\\w+", | ||
"exclude": ".venv,venv,.tox,.eggs,...", | ||
"extend_exclude": ".custom", | ||
"extension": "html.dj", | ||
"files": ["index.html"], | ||
"format_attribute_template_tags": true, | ||
"format_css": true, | ||
"format_js": true, | ||
"ignore": "H014,H015", | ||
"ignore_blocks": "raw,example", | ||
"ignore_case": true, | ||
"include": "H014,H015", | ||
"indent": 3, | ||
"js": { | ||
"indent_size": 5 | ||
}, | ||
"line_break_after_multiline_tag": true, | ||
"linter_output_format": "{filename}:{line}: {code} {message} {match}", | ||
"max_attribute_length": 10, | ||
"max_blank_lines": 5, | ||
"max_line_length": 120, | ||
"no_function_formatting": true, | ||
"no_line_after_yaml": true, | ||
"no_set_formatting": true, | ||
"per-file-ignores": { | ||
"file.html": "H026,H025", | ||
"file_two.html": "H001" | ||
}, | ||
"preserve_blank_lines": true, | ||
"preserve_leading_space": true, | ||
"profile": "html", | ||
"require_pragma": true, | ||
"use_gitignore": true | ||
} |