Skip to content

Commit 6b933b3

Browse files
authored
ci: add lint (#208)
1 parent 0f20cd9 commit 6b933b3

File tree

9 files changed

+121
-47
lines changed

9 files changed

+121
-47
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
run: yarn install --immutable
2020
- name: Build
2121
run: yarn build
22+
- name: Lint
23+
run: yarn lint
2224
- name: Unit Tests
2325
run: yarn test
2426
- name: Check Spells

packages/website/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dist
22
.turbo
33
src/out
44
node_modules
5+
src/docs

packages/website/src/components/footer.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,23 @@
44
<div class="flex flex-col">
55
<ul>
66
<li>
7-
<a href="https://github.com/yeonjuan/html-eslint/issues" target="_blank noreferrer" class="text-slate-600">Report issue</a>
7+
<a
8+
href="https://github.com/yeonjuan/html-eslint/issues"
9+
target="_blank noreferrer"
10+
class="text-slate-600"
11+
>Report issue</a>
812
</li>
913
</ul>
1014
<span class="text-black-500">Copyright © 2023 html-eslint</span>
1115
</div>
1216
<div class="ml-auto">
1317
<a href="https://github.com/yeonjuan/html-eslint">
14-
<img src="~/src/assets/github.svg" alt="github" width="19px" height="19px">
18+
<img
19+
src="~/src/assets/github.svg"
20+
alt="github"
21+
width="19px"
22+
height="19px"
23+
>
1524
</a>
1625
</div>
1726
</section>

packages/website/src/components/header/header.html

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,28 @@
2323
</style>
2424
<header class="flex fixed top-0 bg-white w-full z-50 flex-row items-center h-[66px] px-[20px] drop-shadow-[0_1px_#E8EBEF]">
2525
<a class="flex flex-row items-center md:py-0 no-underline text-black text-base text-[20px] font-[800]" href="/">
26-
<img src="~/src/assets/logo.svg" alt="" class="inline w-[21px] mr-[11px]" width="21" height="24">html-eslint
26+
<img
27+
src="~/src/assets/logo.svg"
28+
alt=""
29+
class="inline w-[21px] mr-[11px]"
30+
width="21"
31+
height="24"
32+
>html-eslint
2733
</a>
2834
<span class="body8 inline-block bg-gray-200 text-black-500 rounded-[12px] px-[8px] py-[5px] mx-[8px]">
2935
v{{ version }}
3036
</span>
31-
<input id="menu" type="checkbox" class="menuInput peer sr-only hidden" aria-hidden="true">
32-
<label for="menu" aria-label="menu button" class="burger flex flex-col justify-between ml-auto h-[21px] w-[21px] px-[1px] py-[3px] [&>div]:h-[2px] [&>div]:w-[18px] [&>div]:bg-black-900 md:hidden hover:cursor-pointer">
37+
<input
38+
id="menu"
39+
type="checkbox"
40+
class="menuInput peer sr-only hidden"
41+
aria-hidden="true"
42+
>
43+
<label
44+
for="menu"
45+
aria-label="menu button"
46+
class="burger flex flex-col justify-between ml-auto h-[21px] w-[21px] px-[1px] py-[3px] [&>div]:h-[2px] [&>div]:w-[18px] [&>div]:bg-black-900 md:hidden hover:cursor-pointer"
47+
>
3348
<div></div>
3449
<div></div>
3550
<div></div>

packages/website/src/components/header/nav.html

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
<nav class="fixed transition-[max-height] duration-200 overflow-hidden max-h-0 top-[67px] left-[0px] peer-checked:max-h-[200px] bg-white w-full md:ml-auto md:flex md:top-auto md:max-h-max md:relative md:w-auto md:peer-checked:translate-y-0">
22
<ul class="body2 flex flex-col text-black-500 p-[12px] [&>li>a]:px-[16px] [&>li>a]:py-[12px] [&>li]:rounded-[10px] md:[&>li>a]:px-0 md:[&>li>a]:py-0 md:title5 md:gap-[24px] md:flex-row md:p-0">
3-
<li class="hover:text-black-900 hover:bg-gray-200 md:hover:bg-white" data-nav="/docs" data-nav-active="text-black-900">
3+
<li
4+
class="hover:text-black-900 hover:bg-gray-200 md:hover:bg-white"
5+
data-nav="/docs"
6+
data-nav-active="text-black-900"
7+
>
48
<a href="~/src/docs/getting-started.html" class="w-full h-full flex justify-center flex-col">
59
<span>Docs</span>
610
</a>
711
</li>
8-
<li class="hover:text-black-900 hover:bg-gray-200 md:hover:bg-white" data-nav="/playground" data-nav-active="text-black-900">
12+
<li
13+
class="hover:text-black-900 hover:bg-gray-200 md:hover:bg-white"
14+
data-nav="/playground"
15+
data-nav-active="text-black-900"
16+
>
917
<a href="~/src/playground.html" class="w-full h-full flex justify-center flex-col">Playground</a>
1018
</li>
1119
<li class="hover:text-black-900 hover:bg-gray-200 md:hover:bg-white">
1220
<a href="https://github.com/yeonjuan/html-eslint" class="w-full h-full flex justify-center flex-col">
13-
<img src="~/src/assets/github.svg" width="26" height="26" alt="github" class="hidden md:block">
21+
<img
22+
src="~/src/assets/github.svg"
23+
width="26"
24+
height="26"
25+
alt="github"
26+
class="hidden md:block"
27+
>
1428
<span class="md:hidden">Github</span>
1529
</a>
1630
</li>

packages/website/src/components/home.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ <h2>
3434

3535
</li>
3636
</ul>
37-
<img src="~/src/assets/example.png" alt="" class="border-[1px] border-gray-300 rounded-[12px] md:rounded-[28px] p-[4px] md:max-w-[1028px] mt-[36px] md:mt-[60px]" width="1028" height="260">
37+
<img
38+
src="~/src/assets/example.png"
39+
alt=""
40+
class="border-[1px] border-gray-300 rounded-[12px] md:rounded-[28px] p-[4px] md:max-w-[1028px] mt-[36px] md:mt-[60px]"
41+
width="1028"
42+
height="260"
43+
>
3844
<div class="py-4">
3945
<h2 class="py-4 text-[20px]">FAQ</h2>
4046
<ul class="my-2 max-w-[600px] text-left">

packages/website/src/components/layout.html

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,22 @@
1212
</block>
1313
<meta charset="utf-8">
1414
<meta name="viewport" content="width=device-width, initial-scale=1.0">
15-
<meta
16-
name="description"
17-
content="ESLint plugin for linting HTML. Find and fix problems in your HTML code"
18-
>
15+
<meta name="description" content="ESLint plugin for linting HTML. Find and fix problems in your HTML code">
1916
<meta property="og:title" content="ESLint plugin for linting HTML.">
20-
<meta
21-
property="og:description"
22-
content="Find and fix problems in your HTML code"
23-
>
17+
<meta property="og:description" content="Find and fix problems in your HTML code">
2418
<meta property="og:image" content="~/src/assets/logo.png">
2519
<meta name="twitter:title" content="ESLint plugin for linting HTML.">
26-
<meta
27-
name="twitter:description"
28-
content="Find and fix problems in your HTML code"
29-
>
20+
<meta name="twitter:description" content="Find and fix problems in your HTML code">
3021
<link rel="icon" href="~/src/assets/logo.svg">
3122
<link href="~/src/common.css" rel="stylesheet">
3223
<block name="head"></block>
3324
<link rel="stylesheet" href="~/src/highlight.scss">
3425
<link rel="preconnect" href="https://fonts.googleapis.com">
35-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
26+
<link
27+
rel="preconnect"
28+
href="https://fonts.gstatic.com"
29+
crossorigin
30+
>
3631
<link href="https://fonts.googleapis.com/css2?family=DM+Mono:wght@500&family=DM+Sans:opsz,[email protected],600;9..40,700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
3732
</head>
3833
<body class="text-base relative">

packages/website/src/components/nav-list.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22
<div>
33
<label class="nav-list-title flex">
44
<content></content>
5-
<img class="mx-2 hidden" src="~/src/assets/icon-down-arrow.svg" alt="" width="14">
5+
<img
6+
class="mx-2 hidden"
7+
src="~/src/assets/icon-down-arrow.svg"
8+
alt=""
9+
width="14"
10+
>
611
</label>
712
<ul class="pl-1 [&>li]:pl-3 [&>li]:py-[4px] [&>li]:border-l [&>li]:border-slate-300 body4 md:body5">
813
<each loop="item, index in list">
914
<!-- eslint-disable-next-line @html-eslint/require-li-container -->
10-
<li class="hover:border-slate-800 cursor-pointer text-black-500 hover:text-black-900" data-nav="/docs/rules/{{item[0]}}" data-nav-active="!border-slate-800 !text-slate-900">
15+
<li
16+
class="hover:border-slate-800 cursor-pointer text-black-500 hover:text-black-900"
17+
data-nav="/docs/rules/{{item[0]}}"
18+
data-nav-active="!border-slate-800 !text-slate-900"
19+
>
1120
<a href="{{item[1]}}" class="w-full no-underline inline-block">
1221
{{item[0]}}
1322
</a>

packages/website/src/components/nav.html

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,69 +8,92 @@
88
}
99
</script>
1010
<div class="font-black md:pl-[280px] w-full md:w-[200px]">
11-
<button id="nav-button" type="button" class="mt-[17px] flex md:hidden body4 text-black-700 w-full px-[16px] py-[12px] border-gray-300 border rounded-[6px]">
11+
<button
12+
id="nav-button"
13+
type="button"
14+
class="mt-[17px] flex md:hidden body4 text-black-700 w-full px-[16px] py-[12px] border-gray-300 border rounded-[6px]"
15+
>
1216
Menu
13-
<img src="~/src/assets/icon-chevron-right.svg" class="rotate-90 ml-auto" alt="">
17+
<img
18+
src="~/src/assets/icon-chevron-right.svg"
19+
class="rotate-90 ml-auto"
20+
alt=""
21+
>
1422
</button>
15-
<aside
16-
id="nav"
17-
class="hidden w-full border border-gray-300 border-t-0 bg-white md:h-[calc(100vh-66px)] md:overflow-y-auto md:block md:w-[280px] md:top-0 md:mt-[66px] md:fixed md:left-0 md:pb-[60px]"
18-
>
23+
<aside id="nav" class="hidden w-full border border-gray-300 border-t-0 bg-white md:h-[calc(100vh-66px)] md:overflow-y-auto md:block md:w-[280px] md:top-0 md:mt-[66px] md:fixed md:left-0 md:pb-[60px]">
1924
<div class="flex flex-col justify-center pr-4 pt-4 md:hidden">
20-
<button type="button" id="nav-close-btn" class="hidden ml-auto w-[24px] h-[24px]">
25+
<button
26+
type="button"
27+
id="nav-close-btn"
28+
class="hidden ml-auto w-[24px] h-[24px]"
29+
>
2130
<img src="~/src/assets/icon-close.svg" alt="">
2231
</button>
2332
</div>
2433
<ul class="mt-[22px] px-[12px] [&>li]:px-[12px] [&>li]:mb-[12px]">
2534
<li>
2635
<a href="~/src/docs/getting-started.html" class="w-full flex items-center">
2736
<div class="w-[28px] h-[28px] rounded-[6px] p-[6px] border-[1px] border-gray-300 drop-shadow-[4px_0_2px_#E8EBEF] mr-[12px]">
28-
<img src="~/src/assets/icon-flag.svg" alt="" width="14" height="14">
37+
<img
38+
src="~/src/assets/icon-flag.svg"
39+
alt=""
40+
width="14"
41+
height="14"
42+
>
2943
</div>
3044
<span class="title5">Getting Started</span>
31-
<img src="~/src/assets/icon-chevron-right.svg" alt="" class="ml-auto" width="20" height="20">
45+
<img
46+
src="~/src/assets/icon-chevron-right.svg"
47+
alt=""
48+
class="ml-auto"
49+
width="20"
50+
height="20"
51+
>
3252
</a>
3353
</li>
3454
<li>
3555
<a href="~/src/docs/rules.html" class="w-full flex items-center">
3656
<div class="w-[28px] h-[28px] rounded-[6px] p-[6px] border-[1px] border-gray-300 drop-shadow-[4px_0_2px_#E8EBEF] mr-[12px]">
37-
<img src="~/src/assets/icon-docs.svg" alt="" width="14" height="14">
57+
<img
58+
src="~/src/assets/icon-docs.svg"
59+
alt=""
60+
width="14"
61+
height="14"
62+
>
3863
</div>
3964
<span class="title5">Rules</span>
40-
<img src="~/src/assets/icon-chevron-right.svg" alt="" class="ml-auto" width="20" height="20">
65+
<img
66+
src="~/src/assets/icon-chevron-right.svg"
67+
alt=""
68+
class="ml-auto"
69+
width="20"
70+
height="20"
71+
>
4172
</a>
4273
</li>
4374
<li>
44-
<module
45-
href="/components/nav-list.html"
46-
locals='{ "id": "best-practice-nav", "list": {{bestPracticeNavs}} }'>
75+
<module href="/components/nav-list.html" locals='{ "id": "best-practice-nav", "list": {{bestPracticeNavs}} }'>
4776
<span class="title5">
4877
Best Practice
4978
</span>
5079
</module>
5180
</li>
5281
<li>
53-
<module
54-
href="/components/nav-list.html"
55-
locals='{ "id": "seo-nav", "list": {{seoNavs}} }'>
82+
<module href="/components/nav-list.html" locals='{ "id": "seo-nav", "list": {{seoNavs}} }'>
5683
<span class="title5">
5784
SEO
5885
</span>
5986
</module>
6087
</li>
6188
<li>
62-
<module
63-
href="/components/nav-list.html"
64-
locals='{ "id": "accessibility-nav", "list": {{accessibilityNavs}} }'>
89+
<module href="/components/nav-list.html" locals='{ "id": "accessibility-nav", "list": {{accessibilityNavs}} }'>
6590
<span class="title5">
6691
Accessibility
6792
</span>
6893
</module>
6994
</li>
7095
<li>
71-
<module
72-
href="/components/nav-list.html"
73-
locals='{ "id": "style-nav", "list": {{styleNavs}} }'>
96+
<module href="/components/nav-list.html" locals='{ "id": "style-nav", "list": {{styleNavs}} }'>
7497
<span class="title5">
7598
Style
7699
</span>

0 commit comments

Comments
 (0)