pre-commit-hook-yamlfmt
mdformat
Our great sponsors
pre-commit-hook-yamlfmt | mdformat | |
---|---|---|
1 | 1 | |
55 | 349 | |
- | 8.0% | |
3.4 | 3.7 | |
3 months ago | 14 days ago | |
Python | 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.
pre-commit-hook-yamlfmt
-
Python package to format yaml file
You could use a pre commit hook for yamlfmt - https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
mdformat
-
Formatting on save not working
[[language]] name = "python" roots = ["pyproject.toml"] formatter = { command = "black", args = ["--quiet", "-"] } language-server = { command = "pyright-langserver", args = ["--stdio"] } config = {} auto-format = true [[language]] name = "rust" auto-format = true # [[language]] # name = "typescript" # auto-format = true # formatter = { command = "prettier", args = ["--parser", "typescript"]} # # pass format options according to https://github.com/typescript-language-server/typescript-language-server#workspacedidchangeconfiguration omitting the "[language].format." prefix. # config = { format = { "semicolons" = "insert", "insertSpaceBeforeFunctionParenthesis" = true } } [[language]] name = "tsx" formatter = { command = 'prettier', args = ["--parser", "typescript"] } auto-format = true [[language]] name = "javascript" auto-format = true formatter = { command = 'npx', args = ["prettier", "--config", ".prettierrc", "--parser", "javascript"] } # formatter = { command = "prettier", args = ["--parser", "javascript"]} [[language]] name = "css" formatter = { command = 'prettier', args = ["--parser", "css"] } [[language]] name = "markdown" # https://github.com/executablebooks/mdformat formatter = { command = "mdformat", args = ["-"] } [[language]] name = "json" formatter = { command = "prettier", args = ["--parser", "json"] } [[language]] name = "toml" auto-format = true # https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml formatter = { command = "prettier", args = ["--parser", "toml"] } [[language]] name = "yaml" indent = { tab-width = 2, unit = " " } formatter = { command = "prettier", args = ["--parser", "yaml"] } [[language]] name = "astro" scope = "source.astro" injection-regex = "astro" file-types = ["astro"] roots = ["package.json", "astro.config.mjs"] language-server = { command = "astro-ls", args = ["--stdio"] } config = { "typescript" = { serverPath = "/Users/matteostara/.nvm/versions/node/v18.16.0/bin/typescript-language-server" }, "environment" = "node" }
What are some alternatives?
nbQA - Run ruff, isort, pyupgrade, mypy, pylint, flake8, and more on Jupyter Notebooks
blue - The slightly less uncompromising Python code formatter.
yamllint - A linter for YAML files.
toml-tools - A set of tools for working with the Toml configuration file format.
yamlfixer - Automates the fixing of problems reported by yamllint by parsing its output
check-jsonschema - A CLI and set of pre-commit hooks for jsonschema validation with built-in support for GitHub Workflows, Renovate, Azure Pipelines, and more!
pre-commit - A framework for managing and maintaining multi-language pre-commit hooks.
typescript-language-server - TypeScript & JavaScript Language Server
pre-commit-hooks - Some out-of-the-box hooks for pre-commit
black - The uncompromising Python code formatter [Moved to: https://github.com/psf/black]
pyupgrade - A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
black - The uncompromising Python code formatter [Moved to: https://github.com/psf/black]