A pre-commit hook for https://pre-commit.com, using https://www.npmjs.com/package/yml-sorter
Simply add this to your .pre-commit-config.yml
:
repos: - repo: https://github.com/deviceinsight/yml-sorter-pre-commit-hook rev: v1.1.0 hooks: - id: yml-sorter files: 'some-yml-file.yml'