{"id":16934137,"url":"https://github.com/lucas-c/pre-commit-hooks-nodejs","last_synced_at":"2025-04-11T18:51:44.868Z","repository":{"id":141887216,"uuid":"98629031","full_name":"Lucas-C/pre-commit-hooks-nodejs","owner":"Lucas-C","description":"Useful pre-commit hooks based on NodeJS scripts","archived":false,"fork":false,"pushed_at":"2022-03-19T08:52:48.000Z","size":18,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T14:44:44.270Z","etag":null,"topics":["dockerfile","git-hooks","markdown","nodejs","pre-commit","table-of-contents"],"latest_commit_sha":null,"homepage":"","language":"Roff","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/Lucas-C.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-28T08:43:06.000Z","updated_at":"2024-02-12T02:17:28.000Z","dependencies_parsed_at":"2024-05-19T19:15:06.801Z","dependency_job_id":null,"html_url":"https://github.com/Lucas-C/pre-commit-hooks-nodejs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucas-C%2Fpre-commit-hooks-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucas-C%2Fpre-commit-hooks-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucas-C%2Fpre-commit-hooks-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucas-C%2Fpre-commit-hooks-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lucas-C","download_url":"https://codeload.github.com/Lucas-C/pre-commit-hooks-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248464277,"owners_count":21108238,"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":["dockerfile","git-hooks","markdown","nodejs","pre-commit","table-of-contents"],"created_at":"2024-10-13T20:51:24.184Z","updated_at":"2025-04-11T18:51:44.861Z","avatar_url":"https://github.com/Lucas-C.png","language":"Roff","readme":"[![Build Status](https://travis-ci.org/Lucas-C/pre-commit-hooks-nodejs.svg?branch=master)](https://travis-ci.org/Lucas-C/pre-commit-hooks-nodejs)\n[![Known Vulnerabilities](https://snyk.io/test/github/lucas-c/pre-commit-hooks-nodejs/badge.svg)](https://snyk.io/test/github/lucas-c/pre-commit-hooks-nodejs)\n\nUseful [pre-commit](http://pre-commit.com) hooks based on NodeJS scripts.\n\nDoes not require to have NodeJS installed: `pre-commit` will fetch \u0026 install it under the hood.\n\nThe test `Dockerfile` in this repo was taken from [here](https://github.com/docker-library/redis/blob/master/3.2/Dockerfile).\n\n## Table of contents\n\n\u003c!-- toc --\u003e\n\n- [Usage](#usage)\n    * [htmlhint](#htmlhint)\n    * [htmllint](#htmllint)\n    * [markdown-toc](#markdown-toc)\n    * [dockerfile_lint](#dockerfile_lint)\n\n\u003c!-- tocstop --\u003e\n\n## Usage\n\n```\nrepos:\n-   repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs\n    rev: v1.1.2\n    hooks:\n    -   id: htmlhint\n        # optional custom config:\n        args: [--config, .htmlhintrc]\n    -   id: htmllint\n    -   id: markdown-toc\n        # optional custom config:\n        args: [--indent, \"    \", -i]\n    -   id: dockerfile_lint\n        # optional custom config:\n        args: [--json, --verbose, --dockerfile]\n```\n\n### htmlhint\n\nRegex-based linter: https://github.com/yaniswang/HTMLHint\n\n### htmllint\n\nUses [htmlparser2](https://github.com/fb55/htmlparser2)-based linter: [htmllint](https://github.com/htmllint/htmllint/wiki/Options).\n\nRequires you to have a config file like [this default `.htmllintrc`](https://github.com/htmllint/htmllint-cli/blob/master/lib/default_cfg.json).\n\n### markdown-toc\n\nBy default, a table of content will be inserted in your repo root `README.md`,\ninjecting the TOC on lines containing the HTML comment `\u003c!-- toc --\u003e`.\n\nWhen the TOC is added or updated, the hook will fail with `Files were modified by this hook`.\nYou then just have to `git add` your `README.md` and commit again (or `git commit -a`).\n\n### dockerfile_lint\n\nSimply call the latest version of [dockerfile_lint](https://github.com/projectatomic/dockerfile_lint)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucas-c%2Fpre-commit-hooks-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucas-c%2Fpre-commit-hooks-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucas-c%2Fpre-commit-hooks-nodejs/lists"}