Skip to content

Commit 7d9f8c8

Browse files
juwainmeritt
authored andcommitted
Новые конфиги для stylelint и HTMLHint
1 parent 24d0b09 commit 7d9f8c8

File tree

6 files changed

+188
-5
lines changed

6 files changed

+188
-5
lines changed

.htmlhintrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"tagname-lowercase": true,
3+
"attr-lowercase": true,
4+
"attr-value-double-quotes": true,
5+
"attr-value-not-empty": false,
6+
"attr-no-duplication": true,
7+
"doctype-first": true,
8+
"tag-pair": true,
9+
"tag-self-close": false,
10+
"spec-char-escape": true,
11+
"id-unique": true,
12+
"src-not-empty": true,
13+
"title-require": true,
14+
"alt-require": true,
15+
"doctype-html5": true,
16+
"id-class-value": "dash",
17+
"style-disabled": false,
18+
"inline-style-disabled": false,
19+
"inline-script-disabled": false,
20+
"space-tab-mixed-disabled": "space",
21+
"id-class-ad-disabled": false,
22+
"href-abs-or-rel": false,
23+
"attr-unsafe-chars": true
24+
}

.stylelintrc

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
{
2+
"rules": {
3+
"color-hex-case": "lower",
4+
"color-hex-length": "long",
5+
"color-named": null,
6+
"color-no-hex": null,
7+
"color-no-invalid-hex": true,
8+
9+
"font-family-name-quotes": "double-unless-keyword",
10+
"font-weight-notation": null,
11+
12+
"function-blacklist": null,
13+
"function-calc-no-unspaced-operator": true,
14+
"function-comma-newline-after": "always-multi-line",
15+
"function-comma-newline-before": "never-multi-line",
16+
"function-comma-space-after": "always",
17+
"function-comma-space-before": "never",
18+
"function-linear-gradient-no-nonstandard-direction": true,
19+
"function-parentheses-newline-inside": null,
20+
"function-parentheses-space-inside": "never",
21+
"function-url-quotes": "double",
22+
"function-whitelist": null,
23+
"function-whitespace-after": "always",
24+
25+
"number-leading-zero": "always",
26+
"number-max-precision": null,
27+
"number-no-trailing-zeros": true,
28+
"number-zero-length-no-unit": true,
29+
30+
"string-no-newline": true,
31+
"string-quotes": "double",
32+
33+
"time-no-imperceptible": null,
34+
35+
"unit-blacklist": null,
36+
"unit-whitelist": null,
37+
38+
"value-no-vendor-prefix": null,
39+
40+
"value-list-comma-newline-after": "always-multi-line",
41+
"value-list-comma-newline-before": "never-multi-line",
42+
"value-list-comma-space-after": "always-single-line",
43+
"value-list-comma-space-before": "never",
44+
45+
"custom-property-no-outside-root": null,
46+
"custom-property-pattern": null,
47+
48+
"property-blacklist": null,
49+
"property-no-vendor-prefix": null,
50+
"property-unit-blacklist": null,
51+
"property-unit-whitelist": null,
52+
"property-value-blacklist": null,
53+
"property-value-whitelist": null,
54+
"property-whitelist": null,
55+
56+
"declaration-bang-space-after": "never",
57+
"declaration-bang-space-before": "always",
58+
"declaration-colon-newline-after": "always-multi-line",
59+
"declaration-colon-space-after": "always-single-line",
60+
"declaration-colon-space-before": "never",
61+
"declaration-no-important": null,
62+
63+
"declaration-block-no-duplicate-properties": true,
64+
"declaration-block-no-shorthand-property-overrides": true,
65+
"declaration-block-properties-order": null,
66+
"declaration-block-semicolon-newline-after": "always",
67+
"declaration-block-semicolon-newline-before": "never-multi-line",
68+
"declaration-block-semicolon-space-after": "always-single-line",
69+
"declaration-block-semicolon-space-before": "never",
70+
"declaration-block-single-line-max-declarations": null,
71+
"declaration-block-trailing-semicolon": "always",
72+
73+
"block-closing-brace-newline-after": "always",
74+
"block-closing-brace-newline-before": "always",
75+
"block-closing-brace-space-after": "always-single-line",
76+
"block-closing-brace-space-before": "always-single-line",
77+
"block-no-empty": true,
78+
"block-no-single-line": true,
79+
"block-opening-brace-newline-after": "always",
80+
"block-opening-brace-newline-before": null,
81+
"block-opening-brace-space-after": "always-single-line",
82+
"block-opening-brace-space-before": "always",
83+
84+
"selector-class-pattern": null,
85+
"selector-combinator-space-after": "always",
86+
"selector-combinator-space-before": "always",
87+
"selector-id-pattern": null,
88+
"selector-max-specificity": null,
89+
"selector-no-attribute": null,
90+
"selector-no-combinator": null,
91+
"selector-no-id": null,
92+
"selector-no-type": null,
93+
"selector-no-universal": null,
94+
"selector-no-vendor-prefix": null,
95+
"selector-pseudo-element-colon-notation": "double",
96+
"selector-root-no-composition": null,
97+
"selector-type-case": "lower",
98+
99+
"selector-list-comma-newline-after": "always",
100+
"selector-list-comma-newline-before": "never-multi-line",
101+
"selector-list-comma-space-after": "always-single-line",
102+
"selector-list-comma-space-before": "never",
103+
104+
"root-no-standard-properties": null,
105+
106+
"rule-nested-empty-line-before": ["always", {
107+
"except": ["first-nested"],
108+
"ignore": ["after-comment"]
109+
}],
110+
"rule-non-nested-empty-line-before": ["always", {
111+
"ignore": ["after-comment"]
112+
}],
113+
114+
"media-feature-colon-space-after": "always",
115+
"media-feature-colon-space-before": "never",
116+
"media-feature-name-no-vendor-prefix": null,
117+
"media-feature-no-missing-punctuation": true,
118+
"media-feature-range-operator-space-after": "always",
119+
"media-feature-range-operator-space-before": "always",
120+
121+
"custom-media-pattern": null,
122+
123+
"media-query-parentheses-space-inside": "never",
124+
"media-query-list-comma-newline-after": "always-multi-line",
125+
"media-query-list-comma-newline-before": "never-multi-line",
126+
"media-query-list-comma-space-after": "always-single-line",
127+
"media-query-list-comma-space-before": "never-single-line",
128+
129+
"at-rule-empty-line-before": ["always", {
130+
"except": [
131+
"first-nested",
132+
"blockless-group"
133+
],
134+
"ignore": ["after-comment"]
135+
}],
136+
"at-rule-no-vendor-prefix": null,
137+
"at-rule-semicolon-newline-after": "always",
138+
139+
"comment-empty-line-before": null,
140+
"comment-whitespace-inside": null,
141+
142+
"indentation": [2, {
143+
"except": ["value"]
144+
}],
145+
146+
"max-empty-lines": 2,
147+
"max-line-length": null,
148+
"max-nesting-depth": 3,
149+
"no-browser-hacks": true,
150+
"no-descending-specificity": null,
151+
"no-duplicate-selectors": true,
152+
"no-eol-whitespace": true,
153+
"no-indistinguishable-colors": null,
154+
"no-invalid-double-slash-comments": true,
155+
"no-missing-eof-newline": true,
156+
"no-unknown-animations": null,
157+
"no-unsupported-browser-features": null
158+
}
159+
}

app/css/header.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ header {
44
text-align: center;
55

66
background-color: var(--brand-color);
7-
background-image:
8-
repeating-linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 1px, transparent 0, transparent 41px),
9-
repeating-linear-gradient(-150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 1px, transparent 0, transparent 41px);
7+
background-image: repeating-linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 1px, transparent 0, transparent 41px), repeating-linear-gradient(-150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 1px, transparent 0, transparent 41px);
108

119
@media (--viewport-medium) {
1210
padding-bottom: 4rem;

app/templates/partials/css/rules/css-syntax.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
</code></pre></li>
1818
<li>Закрывающая фигурная скобка пишется на&nbsp;новой строке и&nbsp;без отступа. Следующее после этого правило отделяется пустой строкой.</li>
1919
<li>Единицы измерения не&nbsp;пишутся, там где в&nbsp;них нет необходимости. Например, <code>border:&nbsp;0</code>.</li>
20+
<li>Для проверки CSS-кода используйте файл конфигурации <a href="https://github.com/htmlacademy/codeguide/blob/master/.stylelintrc" target="_blank">.stylelintrc</a> для настройки валидатора <a href="http://stylelint.io" target="_blank">stylelint</a>.</li>
2021
<li>Для автоматического применения этих правил используйте файл конфигурации <a href="https://github.com/htmlacademy/codeguide/blob/master/csscomb.json" target="_blank">csscomb.json</a> для настройки <a href="http://csscomb.com" target="_blank">CSSComb</a>.</li>
2122
</ul>

app/templates/partials/html/rules/html-syntax.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
<li>Теги и&nbsp;их&nbsp;атрибуты пишутся строчными буквами. Для значений атрибутов всегда используются двойные кавычки.</li>
55
<li>Необязательный закрывающий слеш у&nbsp;одиночных тегов (<code>&lt;img&gt;</code>, <code>&lt;br&gt;</code> и&nbsp;другие) не&nbsp;ставится.</li>
66
<li>Необязательные закрывающие теги (например, <code>&lt;/li&gt;</code> или <code>&lt;/body&gt;</code>) не&nbsp;пропускаются.</li>
7+
<li>Для проверки HTML-кода используйте файл конфигурации <a href="https://github.com/htmlacademy/codeguide/blob/master/.stylelintrc" target="_blank">.htmlhintrc</a> для настройки валидатора <a href="http://htmlhint.com" target="_blank">HTMLHint</a>.</li>
78
</ul>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"normalize.css": "^3.0.3",
7-
"prismjs": "1.3.0",
6+
"normalize.css": "^4.1.1",
7+
"prismjs": "^1.4.1",
88
"prismjs-default-theme": "0.0.1"
99
},
1010
"devDependencies": {

0 commit comments

Comments
 (0)