Skip to content

Commit 7fabea6

Browse files
committed
[add] html eslint
1 parent 180713b commit 7fabea6

File tree

4 files changed

+56
-9
lines changed

4 files changed

+56
-9
lines changed

eslint.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cspellPlugin from '@cspell/eslint-plugin';
22
import eslint from '@eslint/js';
3+
import html from '@html-eslint/eslint-plugin';
34
import stylistic from '@stylistic/eslint-plugin';
45
import eslintConfigPrettier from 'eslint-config-prettier';
56
import react from 'eslint-plugin-react';
@@ -124,5 +125,10 @@ export default tsEslint.config(
124125
]
125126
}
126127
},
128+
{
129+
...html.configs['flat/recommended'],
130+
files: ['**/*.html'],
131+
rules: { '@html-eslint/sort-attrs': 'error' }
132+
},
127133
eslintConfigPrettier
128134
);

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,19 @@
2626
"devDependencies": {
2727
"@cspell/eslint-plugin": "^8.17.5",
2828
"@eslint/js": "^9.22.0",
29+
"@html-eslint/eslint-plugin": "^0.35.2",
30+
"@html-eslint/parser": "^0.35.2",
2931
"@parcel/config-default": "~2.13.3",
3032
"@parcel/packager-raw-url": "~2.13.3",
3133
"@parcel/transformer-typescript-tsc": "~2.13.3",
3234
"@parcel/transformer-webmanifest": "~2.13.3",
35+
"@stylistic/eslint-plugin": "^4.2.0",
36+
"@types/eslint-config-prettier": "^6.11.3",
3337
"@types/node": "^22.13.10",
3438
"eslint": "^9.22.0",
3539
"eslint-config-prettier": "^10.1.1",
36-
"@types/eslint-config-prettier": "^6.11.3",
3740
"eslint-plugin-react": "^7.37.4",
3841
"eslint-plugin-simple-import-sort": "^12.1.1",
39-
"@stylistic/eslint-plugin": "^4.2.0",
4042
"globals": "^16.0.0",
4143
"husky": "^9.1.7",
4244
"jiti": "^2.4.2",

pnpm-lock.yaml

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta
6-
name="viewport"
76
content="width=device-width, initial-scale=1, shrink-to-fit=no"
7+
name="viewport"
88
/>
9-
<link rel="icon" href="image/WebCell-0.png" />
9+
<link href="image/WebCell-0.png" rel="icon" />
1010
<title>WebCell-mobile</title>
11-
<meta name="description" content="Mobile App scaffold of WebCell v3" />
11+
<meta content="Mobile App scaffold of WebCell v3" name="description" />
1212

13-
<link rel="manifest" href="index.webmanifest" />
13+
<link href="index.webmanifest" rel="manifest" />
1414
<script src="https://polyfill.web-cell.dev/feature/PWAManifest.js"></script>
1515

1616
<script src="https://polyfill.web-cell.dev/feature/ECMAScript.js"></script>
1717
<script src="https://polyfill.web-cell.dev/feature/WebComponents.js"></script>
1818
<script src="https://polyfill.web-cell.dev/feature/ElementInternals.js"></script>
1919

20-
<link rel="stylesheet" href="https://unpkg.com/mdui@2/mdui.css" />
21-
<link href="./index.css" type="text/css" rel="stylesheet" />
20+
<link href="https://unpkg.com/mdui@2/mdui.css" rel="stylesheet" />
21+
<link type="text/css" href="./index.css" rel="stylesheet" />
2222

2323
<link
2424
href="https://fonts.googleapis.com/icon?family=Material+Icons"
@@ -33,7 +33,7 @@
3333
rel="stylesheet"
3434
/>
3535

36-
<script src="index.tsx" type="module"></script>
36+
<script type="module" src="index.tsx"></script>
3737
</head>
3838

3939
<body></body>

0 commit comments

Comments
 (0)