{"id":18291309,"url":"https://github.com/debitoor/htmllint-plugin-website","last_synced_at":"2025-04-09T07:50:05.099Z","repository":{"id":56647840,"uuid":"78675410","full_name":"debitoor/htmllint-plugin-website","owner":"debitoor","description":"Provides htmllint rules for website.","archived":false,"fork":false,"pushed_at":"2020-10-27T10:00:14.000Z","size":107,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-02-15T02:15:37.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debitoor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-11T20:09:49.000Z","updated_at":"2019-07-11T11:46:52.000Z","dependencies_parsed_at":"2022-08-15T22:31:41.544Z","dependency_job_id":null,"html_url":"https://github.com/debitoor/htmllint-plugin-website","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debitoor%2Fhtmllint-plugin-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debitoor%2Fhtmllint-plugin-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debitoor%2Fhtmllint-plugin-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debitoor%2Fhtmllint-plugin-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debitoor","download_url":"https://codeload.github.com/debitoor/htmllint-plugin-website/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999840,"owners_count":21031044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T14:13:52.641Z","updated_at":"2025-04-09T07:50:05.081Z","avatar_url":"https://github.com/debitoor.png","language":"JavaScript","readme":"# htmllint-plugin-website\nProvides htmllint rules for website.\n\nThis project has been moved to [website-tools/htmllint-plugin-website](https://github.com/debitoor/website-tools/tree/master/packages/htmllint-plugin-website).\n\n## Install\n``` bash\n$ npm install git+ssh://git@github.com/debitoor/htmllint-plugin-website.git\n```\n\n## Usage\n``` javascript\nimport htmllint from 'htmllint';\nimport htmllintPluginWebsite from 'htmllint-plugin-website';\n\nhtmllint.use(htmllintPluginWebsite());\n\nhtmllint('\u003chtml\u003e\u003cbody\u003e\u003cimg src=\"/foo/bar.JPG\"/\u003e\u003c/body\u003e\u003c/html\u003e', {\n\t'img-src-absolute-path-lowercase': true\n});\n```\n\n## Rules\n\n### a-href-absolute-path\n\n#### #### a-href-absolute-path-is-known\n\nChecks that a href absolute path is known\n\n```javascript\n\thtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'a-href-absolute-path-is-known': () =\u003e true\n});\n```\n\ndefault: `false`;\n\n#### a-href-absolute-path-lowercase\n\nChecks that a href absolute path is lowercase\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'a-href-absolute-path-lowercase': true\n});\n```\n\ndefault: `false`;\n\n#### a-href-absolute-path-no-trailing-slash\n\nChecks that the a href absolute path does not have a trailing slash.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'a-href-absolute-path-no-trailing-slash': true,\n});\n```\n\ndefault: `false`;\n\n#### a-href-absolute-path-starts-with-a-slash\n\nChcecks that a href absolute path starts with a slash.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'a-href-absolute-path-starts-with-a-slash': true\n});\n```\n\ndefault: `false`;\n\n### a-href-should\n\n#### a-href-should-not-contain-whitespaces\n\nChecks that a href does not contain any whitespaces\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'a-href-should-not-contain-whitespaces': true\n});\n```\n\n### head-link-canonical\n\n#### head-link-canonical-absolute\n\nChecks that head link canonical href is an absolute url.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'head-link-canonical-absolute': true\n});\n```\n\ndefault: `false`;\n\n#### head-link-canonical-https\n\nChecks that head link canonical href protocol is https.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'head-link-canonical-https': true\n});\n```\n\ndefault: `false`;\n\n#### head-link-canonical-lowercase\n\nChecks that head link canonical href is lowercase.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'head-link-canonical-lowercase': true\n});\n```\n\ndefault: `false`;\n\n#### head-link-canonical-required\n\nChecks that head link canonical exists.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'head-link-canonical-required': true\n});\n```\n\ndefault: `false`;\n\n### head-meta-description\n\n#### head-meta-description-min-length\n\nChecks that head meta description is at least the provided min length.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'head-meta-description-min-length': 70\n});\n```\n\ndefault: `false`;\n\n#### head-meta-description-max-length\n\nChecks that head meta description is at most the provided max length.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'head-meta-description-max-length': 170\n});\n```\n\ndefault: `false`;\n\n#### head-meta-description-required\n\nChecks that head meta description exists.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'head-meta-description-required': true\n});\n```\n\ndefault: `false`;\n\n### img-src-absolute-path\n\nChecks that img src an absolute path.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'img-src-absolute-path': true\n});\n```\n\ndefault: `false`;\n\n#### img-src-absolute-path-is-known\n\nChecks that img src absolute path is known using the provided function.\n\n``` javascript\nconst knownUrls = new Set(['https://foo.bar/baz/qux']);\n\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'img-src-absolute-path-is-known': (src) =\u003e knownUrls.has(src)\n});\n```\n\ndefault: `false`;\n\n#### img-src-absolute-path-lowercase\n\nChecks that img src absolute path is lowercase.\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'img-src-absolute-path-lowercase': true\n});\n```\n\ndefault: `false`;\n\n### internal-link\n\n#### internal-link-should-be-absolute-path\n\n\n\n``` javascript\nhtmllint('\u003chtml\u003e\u003c/html\u003e', {\n\t'internal-link-should-be-absolute-path': () =\u003e new RegExp().test()\n});\n```\n\ndefault: `false`;\n\n## License\n\nMIT License\n\nCopyright (c) 2017 Debitoor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebitoor%2Fhtmllint-plugin-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebitoor%2Fhtmllint-plugin-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebitoor%2Fhtmllint-plugin-website/lists"}