mirrors-prettier
mirrors-mypy
mirrors-prettier | mirrors-mypy | |
---|---|---|
5 | 4 | |
124 | 273 | |
- | 3.7% | |
7.2 | 5.3 | |
6 months ago | about 1 month ago | |
Python | ||
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mirrors-prettier
-
Setting Up Pre-Commit Hooks in GitHub: Ensuring Code Quality and Consistency
repos: - repo: https://github.com/pre-commit/mirrors-prettier rev: hooks: - id: prettier files: \.(json|markdown|md|yaml|yml)$
-
Hugo no theme
note, we also need to add prettier itself too because usually JavaScript hooks use additional_dependencies to install libraries that hook uses, here is example
-
Python Code Quality - Improve the quality of your Python code with linters, code formatters, and security vulnerability scanners
yaml repos: - repo: https://github.com/myint/autoflake rev: v1.4 hooks: - id: autoflake args: - --in-place - --remove-all-unused-imports - --expand-star-imports - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/asottile/pyupgrade rev: v2.29.0 hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/PyCQA/isort rev: 5.9.3 hooks: - id: isort - repo: https://github.com/psf/black rev: 21.10b0 hooks: - id: black args: [--safe, --quiet] - repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: - id: flake8 - repo: local hooks: - id: pylint name: pylint entry: pylint language: system types: [python] args: [ "-rn", "-sn", ] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.910-1 hooks: - id: mypy name: mypy entry: mypy language: python types: [python] args: [] require_serial: true - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.4.1 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88]
-
It's too peaceful here, let's start a flame war
Might be a python package, but they've designed it to be language-agnostic, running hooks in their own virtual environments locally. For instance, they have a mirror for Prettier available.
-
Creating vite vue ts template: Setup pre-commit
+- repo: https://github.com/pre-commit/mirrors-prettier + rev: '' # Use the sha / tag you want to point at + hooks: + - id: prettier
mirrors-mypy
-
How I start every new Python backend API project
repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: trailing-whitespace - id: check-merge-conflict - id: check-yaml args: [--unsafe] - id: check-json - id: detect-private-key - id: end-of-file-fixer - repo: https://github.com/timothycrosley/isort rev: 5.10.1 hooks: - id: isort - repo: https://github.com/psf/black rev: 22.8.0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 rev: 3.9.2 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.971 hooks: - id: mypy args: [ --warn-unused-configs, --ignore-missing-imports, --disallow-untyped-defs, --follow-imports=silent, --install-types, --non-interactive ]
-
Should I follow the warnings in Pycharm? Does anyone do this?
repo: https://github.com/pre-commit/mirrors-mypy rev: v0.961 hooks:
-
Error: Cannot find implementation or library stub for module named "pytest" when run from pre-commit
default_language_version: python: python3.10 default_stages: [commit, push] repos: #... Other hooks - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.961 hooks: - args: ["--verbose"] description: Type checking for Python id: mypy
-
Python Code Quality - Improve the quality of your Python code with linters, code formatters, and security vulnerability scanners
yaml repos: - repo: https://github.com/myint/autoflake rev: v1.4 hooks: - id: autoflake args: - --in-place - --remove-all-unused-imports - --expand-star-imports - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/asottile/pyupgrade rev: v2.29.0 hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/PyCQA/isort rev: 5.9.3 hooks: - id: isort - repo: https://github.com/psf/black rev: 21.10b0 hooks: - id: black args: [--safe, --quiet] - repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: - id: flake8 - repo: local hooks: - id: pylint name: pylint entry: pylint language: system types: [python] args: [ "-rn", "-sn", ] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.910-1 hooks: - id: mypy name: mypy entry: mypy language: python types: [python] args: [] require_serial: true - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.4.1 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88]
What are some alternatives?
pre-commit - A framework for managing and maintaining multi-language pre-commit hooks.
autoflake - Removes unused imports and unused variables as reported by pyflakes
editorconfig-vim - EditorConfig plugin for Vim
pyupgrade - A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
Flake8 - flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.
flake8
pylint - It's not just a linter that annoys you! [Moved to: https://github.com/pylint-dev/pylint]
reorder-python-imports - Rewrites source to reorder python imports
blog-v1 - Personal blog
openapi-spec-validator - OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification.
prettier-plugin-go-template - Fixes prettier formatting for go templates 🐹
isort - A Python utility / library to sort imports. [Moved to: https://github.com/PyCQA/isort]