mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-04 03:44:43 +00:00
commit
736a03307f
3 changed files with 6 additions and 1 deletions
|
|
@ -107,6 +107,7 @@ Options:
|
|||
- nunjucks
|
||||
- handlebars (for handlebars and mustache)
|
||||
- golang
|
||||
- angular
|
||||
|
||||
Usage:
|
||||
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ class Config:
|
|||
"nunjucks": ["D", "J", "M"],
|
||||
"handlebars": ["D", "J", "N"],
|
||||
"golang": ["D", "J", "N", "M"],
|
||||
"angular": ["D", "J", "H012", "H026", "H028"],
|
||||
}
|
||||
|
||||
self.profile_code: List[str] = profile_dict.get(
|
||||
|
|
@ -220,7 +221,9 @@ class Config:
|
|||
self.linter_rules = list(
|
||||
filter(
|
||||
lambda x: x["rule"]["name"] not in self.ignore.split(",")
|
||||
and x["rule"]["name"][0] not in self.profile_code
|
||||
and not any(
|
||||
x["rule"]["name"].startswith(code) for code in self.profile_code
|
||||
)
|
||||
and self.profile not in x["rule"].get("exclude", []),
|
||||
rule_set,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ def no_pragma(config: Config, this_file: Path) -> bool:
|
|||
"nunjucks": nunjucks_patterns + html_patterns,
|
||||
"handlebars": handlebars_patterns + html_patterns,
|
||||
"golang": golang_patterns + html_patterns,
|
||||
"angular": html_patterns,
|
||||
"all": django_jinja_patterns
|
||||
+ nunjucks_patterns
|
||||
+ handlebars_patterns
|
||||
|
|
|
|||
Loading…
Reference in a new issue