{"id":21182088,"url":"https://github.com/dkunin/twiglint","last_synced_at":"2025-07-10T00:32:03.100Z","repository":{"id":57382700,"uuid":"100634002","full_name":"DKunin/twiglint","owner":"DKunin","description":"Twig templates linter","archived":false,"fork":false,"pushed_at":"2017-08-31T10:32:21.000Z","size":71,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-13T12:44:10.361Z","etag":null,"topics":["cli","lint","nodejs","twig"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DKunin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-17T18:35:01.000Z","updated_at":"2023-07-31T19:33:15.000Z","dependencies_parsed_at":"2022-09-01T04:41:21.799Z","dependency_job_id":null,"html_url":"https://github.com/DKunin/twiglint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKunin%2Ftwiglint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKunin%2Ftwiglint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKunin%2Ftwiglint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DKunin%2Ftwiglint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DKunin","download_url":"https://codeload.github.com/DKunin/twiglint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225508311,"owners_count":17483515,"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":["cli","lint","nodejs","twig"],"created_at":"2024-11-20T17:55:42.133Z","updated_at":"2024-11-20T17:55:42.997Z","avatar_url":"https://github.com/DKunin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TwigLint [WIP][ALPHA]\n\nTwig templates linter\n\n# Install\n\n```bash\n\n    npm install twiglint -g\n\n```\n\n# Usage\n\n```bash\n    Usage\n      $ twiglint \u003cfilename\u003e\n\n    Options\n      -s, --silent Show only errors\n      -f, --format Use a specific output format - default: stylish [compact]\n      -d, --debug Write debug file, and prepend every check with filename\n      -h, --help  This help\n```\n\n# Rules to be included\n\nFor now rules are hardwired, there will be configurable config, and external plugins in the future\n\n- [x] Warn if there is no only in include function (no-only)\n- [x] Variables declared, but not used (no-unused-vars)\n- [x] Variables used without declaration, or docblock (no-undeclared)\n- [x] Do not use closing bracket on selfclosing tags (`\\/\u003e`  =\u003e `\u003e`) (no-closed-self-closing-tags)\n- [x] Prefer camelcase variable naming (prefer-camel-case-vars)\n- [x] Do not use spaceless tag (no-spaceless)\n- [x] Wrong tab padding on logic brackets (tags-padding)\n- [ ] use staticUrl functions for resources\n- [ ] Spelling\n\n# Roadmap\n\n- [x] Write tests for plugins\n- [x] Maximum usage of the parser\n- [x] Visual reporter with the ability to jump to the needed line (compact)\n- [x] Plugins as seperate modules\n- [x] cli testing\n- [ ] Write pluggable logic for external plugin\n- [ ] Allow to use local config\n- [ ] Sublime/VSCode/PhpStorm extentions\n\n# Docblock formatting\n\n    {# @param {string} imageLink #}\n    {# @param {string} view_change_uri  #}\n    {# @param {int} user_location_id #}\n\nor\n\n    {# \n        @param {string} imageLink\n        @param {string} view_change_uri \n        @param {int} user_location_id \n    #}\n\n# License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkunin%2Ftwiglint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkunin%2Ftwiglint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkunin%2Ftwiglint/lists"}