Skip to content

Commit 1262e68

Browse files
committed
Add new rule checkboxes to RulePanel
Introduced additional rule options in RulePanel.astro for tag name, attribute formatting, sorting, duplication, whitespace, obsolete tags, and script tag usage. Also removed a reference from .astro/types.d.ts.
1 parent 5e68351 commit 1262e68

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.astro/types.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/// <reference types="astro/client" />
2-
/// <reference path="content.d.ts" />

src/components/RulePanel.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@
88
<h3>Standard</h3>
99
<ul>
1010
<li><label class="checkbox" title="Tagname must be lowercase."><input type="checkbox" class="form-check-input" id="tagname-lowercase"> tagname-lowercase</label></li>
11+
<li><label class="checkbox" title="Tag names should not contain special characters."><input type="checkbox" class="form-check-input" id="tagname-specialchars"> tagname-specialchars</label></li>
1112
<li><label class="checkbox" title="Attribute name must be lowercase."><input type="checkbox" class="form-check-input" id="attr-lowercase"> attr-lowercase</label></li>
1213
<li><label class="checkbox" title="Attribute value must closed by double quotes."><input type="checkbox" class="form-check-input" id="attr-value-double-quotes"> attr-value-double-quotes</label></li>
1314
<li><label class="checkbox" title="Attribute must set value."><input type="checkbox" class="form-check-input" id="attr-value-not-empty"> attr-value-not-empty</label></li>
1415
<li><label class="checkbox" title="Attribute name can not occur more than once."><input type="checkbox" class="form-check-input" id="attr-no-duplication"> attr-no-duplication</label></li>
16+
<li><label class="checkbox" title="Attribute should not have unnecessary whitespace."><input type="checkbox" class="form-check-input" id="attr-no-unnecessary-whitespace"> attr-no-unnecessary-whitespace</label></li>
17+
<li><label class="checkbox" title="Attributes should be sorted."><input type="checkbox" class="form-check-input" id="attr-sorted"> attr-sorted</label></li>
18+
<li><label class="checkbox" title="Attribute values should not be duplicated."><input type="checkbox" class="form-check-input" id="attr-value-no-duplication"> attr-value-no-duplication</label></li>
19+
<li><label class="checkbox" title="Attribute whitespace rules."><input type="checkbox" class="form-check-input" id="attr-whitespace"> attr-whitespace</label></li>
1520
<li><label class="checkbox" title="Doctype must be first."><input type="checkbox" class="form-check-input" id="doctype-first"> doctype-first</label></li>
1621
<li><label class="checkbox" title="Tag must be paired."><input type="checkbox" class="form-check-input" id="tag-pair"> tag-pair</label></li>
1722
<li><label class="checkbox" title="The empty tag must closed by self."><input type="checkbox" class="form-check-input" id="tag-self-close"> tag-self-close</label></li>
23+
<li><label class="checkbox" title="Obsolete tags should not be used."><input type="checkbox" class="form-check-input" id="tag-no-obsolete"> tag-no-obsolete</label></li>
1824
<li><label class="checkbox" title="Special characters must be escaped."><input type="checkbox" class="form-check-input" id="spec-char-escape"> spec-char-escape</label></li>
1925
<li><label class="checkbox" title="Id must be unique."><input type="checkbox" class="form-check-input" id="id-unique"> id-unique</label></li>
2026
<li><label class="checkbox" title="Src of img(script,link) must set value."><input type="checkbox" class="form-check-input" id="src-not-empty"> src-not-empty</label></li>
@@ -29,6 +35,7 @@
2935
<h3>Performance</h3>
3036
<ul>
3137
<li><label class="checkbox" title="The script tag can not be used in head."><input type="checkbox" class="form-check-input" id="head-script-disabled"> head-script-disabled</label></li>
38+
<li><label class="checkbox" title="Script tags should be disabled."><input type="checkbox" class="form-check-input" id="script-disabled"> script-disabled</label></li>
3239
</ul>
3340
</div>
3441
<div class="col-12 col-sm-4">

0 commit comments

Comments
 (0)