{"id":29092414,"url":"https://github.com/parisneo/parisneo-precommit-hooks","last_synced_at":"2025-06-28T07:06:52.972Z","repository":{"id":268867185,"uuid":"905698517","full_name":"ParisNeo/parisneo-precommit-hooks","owner":"ParisNeo","description":"A precommit-hook app for webapps using python as backend and vue.js as front end","archived":false,"fork":false,"pushed_at":"2024-12-19T11:24:37.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-19T11:40:26.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ParisNeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-12-19T10:51:47.000Z","updated_at":"2024-12-19T11:24:05.000Z","dependencies_parsed_at":"2024-12-19T11:50:35.222Z","dependency_job_id":null,"html_url":"https://github.com/ParisNeo/parisneo-precommit-hooks","commit_stats":null,"previous_names":["parisneo/parisneo-precommit-hooks"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ParisNeo/parisneo-precommit-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2Fparisneo-precommit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2Fparisneo-precommit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2Fparisneo-precommit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2Fparisneo-precommit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParisNeo","download_url":"https://codeload.github.com/ParisNeo/parisneo-precommit-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2Fparisneo-precommit-hooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262389494,"owners_count":23303343,"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-06-28T07:06:44.334Z","updated_at":"2025-06-28T07:06:52.964Z","avatar_url":"https://github.com/ParisNeo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ParisNeo Pre-commit Hooks\n\nA collection of pre-commit hooks used across ParisNeo projects.\n\n## Prerequisites\n\nFor JavaScript hooks:\n```bash\nnpm install -g eslint prettier\n```\n\nFor Python hooks:\n```bash\npip install pre-commit\n```\n```\n\n## Installation\n\n1. Install pre-commit:\n```bash\npip install pre-commit\n```\n\n2. Add to your `.pre-commit-config.yaml`:\n```yaml\nrepos:\n-   repo: https://github.com/ParisNeo/parisneo-precommit-hooks\n    rev: v0.1.0\n    hooks:\n    -   id: parisneo-python-check  # For Python projects\n    -   id: parisneo-js-check      # For JavaScript projects\n```\n\n3. Install the pre-commit hooks:\n```bash\npre-commit install\n```\n\n## Available Hooks\n\n### parisneo-python-check\n- Runs black for code formatting\n- Runs isort for import sorting\n- Runs flake8 for style checking\n\n### parisneo-js-check\n- Runs prettier for code formatting\n- Runs eslint for style checking\n\n\n## Configuration (fully automated)\n\nCreate a `setup.cfg` in your project root:\n```ini\n[flake8]\nmax-line-length = 100\nextend-ignore = E203\nexclude = .git,__pycache__,build,dist\n\n[isort]\nprofile = black\nmulti_line_output = 3\nline_length = 100\n```\n\n7. Create GitHub workflow file `.github/workflows/test.yml`:\n```yaml\nname: Tests\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n    \n    - uses: actions/setup-python@v2\n      with:\n        python-version: '3.10'\n        \n    - uses: actions/setup-node@v2\n      with:\n        node-version: '16'\n        \n    - name: Install dependencies\n      run: |\n        python -m pip install --upgrade pip\n        pip install -e .\n        pip install pytest\n        npm install -g eslint prettier\n        \n    - name: Run tests\n      run: pytest\n        \n    - name: Run hooks\n      run: |\n        pip install pre-commit\n        pre-commit run --all-files\n```\n\nTo use in your projects:\n\n1. Add to your project's `.pre-commit-config.yaml`:\n```yaml\nrepos:\n-   repo: https://github.com/ParisNeo/parisneo-precommit-hooks\n    rev: v0.1.0  # Use the latest version\n    hooks:\n    -   id: parisneo-python-check\n    -   id: parisneo-js-check\n```\n\n2. Initialize:\n```bash\npre-commit install\n```\n\n## Configuration (manual)\n\n1. Add to your project's `.pre-commit-config.yaml`:\n```yaml\nrepos:\n-   repo: https://github.com/ParisNeo/parisneo-precommit-hooks\n    rev: v0.1.0  # Use the latest version\n    hooks:\n    -   id: parisneo-python-check\n    -   id: parisneo-js-check\n```\n\n2. make sure pre-commit is installed\n\n\n### Run on all files\n```bash\npre-commit run --all-files\n```\n### Run specific hook\n```bash\npre-commit run parisneo-python-check\n```\n```bash\npre-commit run parisneo-js-check\n```\n\n# Run on specific files\n```bash\npre-commit run --files path/to/file.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisneo%2Fparisneo-precommit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparisneo%2Fparisneo-precommit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisneo%2Fparisneo-precommit-hooks/lists"}