{"id":24983682,"url":"https://github.com/posthtml/posthtml-lint","last_synced_at":"2025-03-29T10:12:37.817Z","repository":{"id":42990539,"uuid":"194467356","full_name":"posthtml/posthtml-lint","owner":"posthtml","description":"PostHTML plugin to lint static markup","archived":false,"fork":false,"pushed_at":"2023-01-04T02:50:14.000Z","size":1476,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T21:06:06.520Z","etag":null,"topics":["lint","posthtml","posthtml-plugin"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/posthtml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-30T02:36:30.000Z","updated_at":"2022-05-30T07:06:56.000Z","dependencies_parsed_at":"2023-02-01T18:00:15.477Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-lint","commit_stats":null,"previous_names":["metonym/posthtml-lint"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245286600,"owners_count":20590640,"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":["lint","posthtml","posthtml-plugin"],"created_at":"2025-02-04T09:20:16.525Z","updated_at":"2025-03-29T10:12:37.788Z","avatar_url":"https://github.com/posthtml.png","language":"TypeScript","readme":"# posthtml-lint \u003cimg align=\"right\" width=\"220\" height=\"200\" title=\"PostHTML logo\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n\n[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Build][build]][build-badge]\n[![Coverage][codecov-shield]][codecov]\n\n## [Changelog](CHANGELOG.md)\n\n`posthtml-lint` is a [PostHTML](https://github.com/posthtml/posthtml) plugin to lint static markup.\n\nCurrently supported rules include `no-duplicate-ids`, `no-duplicate-tags`, `no-empty-tags` and `no-missing-attributes`.\n\n**Before:**\n\n```html\n\u003chead\u003e\n  \u003ctitle\u003eTitle\u003c/title\u003e\n  \u003ctitle\u003eTitle\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003ca\u003eLink\u003c/a\u003e\n\u003c/body\u003e\n```\n\n**After:**\n\n```bash\n# Output printed to the terminal\nThere are ...\n```\n\n## Install\n\n```bash\nyarn add -D posthtml-lint\n# OR\nnpm i posthtml-lint\n```\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst posthtml = require('posthtml');\nconst { lint } = require('posthtml-lint');\n\nconst html = fs.readFileSync('./index.html');\n\nposthtml()\n  .use(lint())\n  .process(html)\n  .then(result =\u003e fs.writeFileSync('./after.html', result.html));\n```\n\n### Options\n\n| Name                  | Kind                       | Description                                                                   |\n| --------------------- | -------------------------- | ----------------------------------------------------------------------------- |\n| `noDuplicateIds`      | `boolean` (default `true`) | Disallow duplicate ids                                                        |\n| `noDuplicateTags`     | `boolean` (default `true`) | Disallow duplicate occurrences of the `html`, `head`, `title` and `body` tags |\n| `noEmptyTags`         | `boolean` (default `true`) | Disallow empty tags for tags that are not self-closing                        |\n| `noMissingAttributes` | `boolean` (default `true`) | Disallow tags with missing required attributes.                               |\n\n### Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).\n\n### License\n\n[MIT](LICENSE)\n\n[npm]: https://img.shields.io/npm/v/posthtml-lint.svg?color=blue\n[npm-url]: https://npmjs.com/package/posthtml-lint\n[deps]: https://david-dm.org/posthtml/posthtml-lint.svg\n[deps-url]: https://david-dm.org/posthtml/posthtml-lint\n[build]: https://travis-ci.com/posthtml/posthtml-lint.svg?branch=master\n[build-badge]: https://travis-ci.com/posthtml/posthtml-lint\n[codecov]: https://codecov.io/gh/posthtml/posthtml-lint\n[codecov-shield]: https://img.shields.io/codecov/c/github/posthtml/posthtml-lint.svg\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-lint/lists"}