{"id":25580474,"url":"https://github.com/jordanopensource/pre-commit-hooks","last_synced_at":"2026-03-30T22:30:19.849Z","repository":{"id":85358660,"uuid":"466748043","full_name":"jordanopensource/pre-commit-hooks","owner":"jordanopensource","description":"Pre-commit hooks used by JOSA","archived":false,"fork":false,"pushed_at":"2025-01-02T11:08:33.000Z","size":33,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-01-02T12:23:56.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"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/jordanopensource.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-06T13:38:11.000Z","updated_at":"2024-12-06T07:26:19.000Z","dependencies_parsed_at":"2023-03-13T04:58:57.847Z","dependency_job_id":"a477922a-0904-491d-a2c1-532fb97ea79d","html_url":"https://github.com/jordanopensource/pre-commit-hooks","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordanopensource%2Fpre-commit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordanopensource%2Fpre-commit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordanopensource%2Fpre-commit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordanopensource%2Fpre-commit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jordanopensource","download_url":"https://codeload.github.com/jordanopensource/pre-commit-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239952634,"owners_count":19723924,"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":"2025-02-21T04:16:19.489Z","updated_at":"2026-03-30T22:30:19.796Z","avatar_url":"https://github.com/jordanopensource.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JOSA Pre-commit Hooks\n\nThis repository contains JOSA's custom pre-commit hooks.\n\n## Available Hooks\n\n- [Validate Flux](#validate-flux) - A script to validate Flux custom resources and Kustomize overlays.\n- [Validate Eslint](#validate-eslint) - A script to validate eslint rules on Javascript and Typescript files.\n\n- [Run Samplr](#run-samplr) - A script to generate sample files.\n\n___\n\n## validate-flux\n\nThis script downloads the Flux OpenAPI schemas, then it validates the\nFlux custom resources and the `kustomize` overlays using `kubeconform`.\nThis script is meant to be run locally and in CI before the changes.\n\n### Prerequisites\n\nYou need the following to be installed on your machine before running this pre-commit script.\n\n- [yq v4.6](https://github.com/mikefarah/yq)\n- [kustomize v4.1](https://github.com/kubernetes-sigs/kustomize)\n- [kubeconform v0.4.12](https://github.com/yannh/kubeconform)\n\n### Usage\n\nAdd this to your .pre-commit-config.yaml:\n\n```yaml\n-   repo: https://github.com/jordanopensource/pre-commit-hooks\n    rev: v0.1.1  # Use the ref you want to point at\n    hooks:\n    -   id: validate-flux\n    # -   id: ...\n```\n\nAfter the configuration is added, you'll need to run\n\n```bash\npre-commit install -t pre-push\n```\n\n___\n\n## validate-eslint\n\nThis script runs eslint rule checks on staged files that have the following extensions:\n\n- ts\n- tsx\n- vue\n- js\n- jsx\n\n### Prerequisites\n\nYou need the following to be installed on your machine before running this pre-commit script.\n\n- [ESLINT v8.11](https://www.npmjs.com/package/eslint)\n\n### Usage\n\nAdd this to your .pre-commit-config.yaml:\n\n```yaml\n-   repo: https://github.com/jordanopensource/pre-commit-hooks\n    rev: v0.2.0  # Use the ref you want to point at\n    hooks:\n    -   id: validate-eslint\n    # -   id: ...\n```\n\nAfter the configuration is added, you'll need to run\n\n```bash\npre-commit install -t pre-commit\n```\n\n___\n\n## run-samplr\n\nThis script runs the command [samplr](https://github.com/unmultimedio/samplr) to generate `.sample` files in your repo. Please refer to the [config](./scripts/samplr/.samplr.yml) in this repo to understand which files are supported.\n\n### Prerequisites\n\nYou need the following to be installed on your machine before running this pre-commit script.\n\n- [samplr v0.2.1](https://github.com/unmultimedio/samplr/releases/tag/v0.2.1)\n\n### Usage\n\nAdd this to your .pre-commit-config.yaml:\n\n```yaml\n-   repo: https://github.com/jordanopensource/pre-commit-hooks\n    rev: v0.1.0  # Use the ref you want to point at\n    hooks:\n    -   id: run-samplr\n    # -   id: ...\n```\n\nAfter the configuration is added, you'll need to run\n\n```bash\npre-commit install -t pre-commit\n```\n\n___\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordanopensource%2Fpre-commit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordanopensource%2Fpre-commit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordanopensource%2Fpre-commit-hooks/lists"}