{"id":2211,"date":"2021-10-11T13:01:14","date_gmt":"2021-10-11T04:01:14","guid":{"rendered":"https:\/\/sirius10.net\/blog\/wordpress\/?p=2211"},"modified":"2021-10-11T18:16:31","modified_gmt":"2021-10-11T09:16:31","slug":"htmlhint","status":"publish","type":"post","link":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/2021\/10\/11\/2211\/","title":{"rendered":"HTMLHint"},"content":{"rendered":"\n<p>\u3000\u666e\u6bb5\u3001HTML \u306e\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u306b\u3001<a href=\"http:\/\/www.htmllint.net\">Another HTMLLINT5<\/a> \u3092\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u30ed\u30fc\u30ab\u30eb\u306b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u306a\u3044\u304b\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002\u3082\u3068\u3082\u3068\u306ehtmllint \u306f HTML5 \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u5341\u5206\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u305b\u3093\u3002HTMLHint \u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308b\u3088\u3046\u306a\u306e\u3067\u3001\u4f7f\u3063\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u3000\u4ee5\u524d\u4f7f\u3063\u305f puppeteer \u3068\u540c\u3058\u69d8\u306b npm \u3067\u30ed\u30fc\u30ab\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u3082\u3057\u3001\u5165\u3063\u3066\u3044\u306a\u3051\u308c\u3070\u3001node \u3068 npm \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ node -v\nv10.24.0\n$ npm -v\n5.8.0\n$ mkdir htmlhint\n$ cd htmlhint\n$ npm install htmlhint\nnpm WARN npm npm does not support Node.js v10.24.0\nnpm WARN npm You should probably upgrade to a newer version of node as we\nnpm WARN npm can't make any promises that npm will work with this version.\nnpm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.\nnpm WARN npm You can find the latest version at https:\/\/nodejs.org\/\nnpm WARN notice [SECURITY] glob-parent has the following vulnerability: 1 moderate. Go here for more details: https:\/\/www.npmjs.com\/advisories?search=glob-parent&amp;version=2.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.\nnpm WARN saveError ENOENT: no such file or directory, open '\/home\/pi\/work\/Web\/htmlhint\/package.json'\nnpm notice created a lockfile as package-lock.json. You should commit this file.\nnpm WARN enoent ENOENT: no such file or directory, open '\/home\/pi\/work\/Web\/htmlhint\/package.json'\nnpm WARN htmlhint No description\nnpm WARN htmlhint No repository field.\nnpm WARN htmlhint No README data\nnpm WARN htmlhint No license field.<\/pre>\n\n\n\n<p>\u3000\u8b66\u544a\u304c\u51fa\u3066\u3044\u307e\u3059\u304c\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3067\u304d\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9f\u884c<\/h2>\n\n\n\n<p>\u3000npx \u3067\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ npx htmlhint https:\/\/sirius10.net\n\n<span style=\"color: #008000\" class=\"text-color\">Scanned 1 files, no errors found (323 ms).<\/span><\/pre>\n\n\n\n<p>\u3000\u304a\u304a\u3001\u30b5\u30a4\u30c8\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u306f\u30a8\u30e9\u30fc\u304c\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u30ed\u30fc\u30ab\u30eb\u306b\u3042\u308b html \u30d5\u30a1\u30a4\u30eb\u3082\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u3059\u3002\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u82f1\u8a9e\u3067\u3059\u304c\u3001HTML \u306e\u6587\u6cd5\u3092\u7406\u89e3\u3057\u3066\u3044\u308c\u3070\u308f\u304b\u308b\u5185\u5bb9\u3067\u3059\u3002\u624b\u66f8\u304d\u306e HTML \u306e\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u306f\u3053\u308c\u3067\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u308c\u3060\u3068 HTMLHint \u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u306a\u3044\u3068\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u305b\u3093\u3002\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u5916\u3067\u5b9f\u884c\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001npx \u304c npm \u30ec\u30b8\u30b9\u30c8\u30ea\u304b\u3089\u74b0\u5883\u3092\u6c5a\u3055\u306a\u3044\u5834\u6240\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9f\u884c\u7528\u306e SHELL \u30b9\u30af\u30ea\u30d7\u30c8<\/h2>\n\n\n\n<p>\u3000\u4f55\u51e6\u3067\u5b9f\u884c\u3057\u3066\u3082\u3044\u3044\u3088\u3046\u306b\u5b9f\u884c\u7528\u306bSHELL \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308a\u307e\u3059\u3002\/usr\/local\/bin \u3042\u305f\u308a\u306b\u7f6e\u3044\u3066\u304a\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002\u307e\u305f\u3001htmlhint \u3092 \/opt \u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ cd ..\n$ sudo cp -r htmlhint \/opt\/.\n$ sudo vi \/usr\/local\/bin\/htmlhint<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted file\">#!\/bin\/bash\n\nINSTALL_DIR=\/opt\/htmlhint\n\nif [ -f \"${PWD}\/$1\" ]; then\n    file=\"${PWD}\/$1\"\nelse\n    file=\"$1\"\nfi\n\ncd ${INSTALL_DIR}\nnpx htmlhint \"${file}\"<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ sudo chmod +x \/usr\/loca\/bin\/htmlhint<\/pre>\n\n\n\n<p>\u3000\u3053\u308c\u3067\u901a\u5e38\u306e\u30b3\u30de\u30f3\u30c9\u306e\u3088\u3046\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted console\">$ htmlhint index.html\n\n<span style=\"color: #008000\" class=\"text-color\">Scanned 1 files, no errors found (111 ms).<\/span><\/pre>\n\n\n\n<p>\u3000\u540c\u69d8\u306a\u30c1\u30a7\u30c3\u30af\u30c4\u30fc\u30eb\u306b\u3001StyleLint \u3084 ESLint \u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002\u3053\u3061\u3089\u3082\u4f7f\u3063\u3066\u898b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u666e\u6bb5\u3001HTML \u306e\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u306b\u3001Another HTMLLINT5 \u3092\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u30ed\u30fc\u30ab\u30eb\u306b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u306a\u3044\u304b\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002\u3082\u3068\u3082\u3068\u306ehtmllint \u306f HTML5 \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u5341\u5206\u30c1\u30a7\u30c3\u30af\u3067\u304d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-2211","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/2211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=2211"}],"version-history":[{"count":17,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/2211\/revisions"}],"predecessor-version":[{"id":2236,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/2211\/revisions\/2236"}],"wp:attachment":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=2211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=2211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=2211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}