thibaudcolas / curlylint

Experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid
https://www.curlylint.org/
MIT License
237 stars 25 forks source link

Use types_or directive for hook instead of files #76

Closed imomaliev closed 2 years ago

imomaliev commented 3 years ago

For more information https://pre-commit.com/#config-types_or

imomaliev commented 3 years ago

Hi @thibaudcolas! types_or allows for more consistent hooks when run on file types that may have multiple extensions. Also if hook user wants to change files themself they will have to copy current definition and than add personal regex

it seems that there are no predefined types for Nunjucks or Liquid files

This could be easily changed with PR to https://github.com/pre-commit/identify/blob/master/identify/extensions.py

thibaudcolas commented 2 years ago

Thank you @imomaliev, that makes sense to me. I’ve made PRs to add support for Nunjucks and Liquid: https://github.com/pre-commit/identify/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3Athibaudcolas.