{"id":21658784,"url":"https://github.com/rashfael/eslint-plugin-vue-pug","last_synced_at":"2025-08-21T18:33:48.887Z","repository":{"id":37560313,"uuid":"474624931","full_name":"rashfael/eslint-plugin-vue-pug","owner":"rashfael","description":"linting your pug templates in vue single file components","archived":false,"fork":false,"pushed_at":"2024-04-02T12:08:44.000Z","size":226,"stargazers_count":45,"open_issues_count":7,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-09T04:36:19.671Z","etag":null,"topics":["eslint","vue"],"latest_commit_sha":null,"homepage":"","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/rashfael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-27T12:02:38.000Z","updated_at":"2024-10-17T07:45:38.000Z","dependencies_parsed_at":"2024-06-18T16:51:44.116Z","dependency_job_id":"f50deb5f-a5f4-4357-b124-b4afcad0e4c6","html_url":"https://github.com/rashfael/eslint-plugin-vue-pug","commit_stats":{"total_commits":83,"total_committers":1,"mean_commits":83.0,"dds":0.0,"last_synced_commit":"d21be931fa82b3a7c18854fcbb8227e70c3ec1bb"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashfael%2Feslint-plugin-vue-pug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashfael%2Feslint-plugin-vue-pug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashfael%2Feslint-plugin-vue-pug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashfael%2Feslint-plugin-vue-pug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rashfael","download_url":"https://codeload.github.com/rashfael/eslint-plugin-vue-pug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230527875,"owners_count":18240052,"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":["eslint","vue"],"created_at":"2024-11-25T09:29:49.084Z","updated_at":"2024-12-20T03:10:26.291Z","avatar_url":"https://github.com/rashfael.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-vue-pug\n\nExtends [eslint-plugin-vue](https://eslint.vuejs.org/) to support pug templates.\n\n## Installation\n\n```sh\nnpm install --save-dev eslint@8 eslint-plugin-vue eslint-plugin-vue-pug\n```\n\n## Usage\n\nMost [eslint-plugin-vue](https://eslint.vuejs.org/) rules work out of the box with just adding this plugin in your eslint config:\n\n```js\nmodule.exports = {\n  extends: [\n    'plugin:vue/vue3-recommended',\n    'plugin:vue-pug/vue3-recommended'\n  ]\n}\n```\n\n## Limitations\n\n- [pug-lexer](https://github.com/pugjs/pug/blob/master/packages/pug-lexer) seems to convert windows-style CRLF line endings to LF line endings, which may break token position and will give you errors. Make sure to [only use LF line endings](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings).\n\n### Supported Syntax\n\nThis plugin only lints pug syntax that directly corresponds to html syntax.\nPug syntax that is not supported includes mixins, js code, loops, if/else, case, include/extends.\nThe linter will just skip those features, which means that tags inside mixins will **not** be linted.\nThe rule [no-pug-control-flow](docs/rules/no-pug-control-flow.md) will help you to avoid unsupported pug syntax.\n\n## Open Questions\n\n### Comment Directive\n\nDo we want own docs for that? Also, pug has no inline comments.\n\n### #id and .class shorthands\nShorthands get dropped from attributes list to not affect attribute order. We need to add separate linter rules for those.\n- `no-useless-template-attributes` checks for class on `template`, we need to also check shorthands.\n- `no-restricted-class` needs special handling\n\n### brace style\n\nExisting rule fails at fixing and does not replace \" quotes with `.\n\n### parsing commas in dynamic attribute names\n\npug splits up attribute names like `:[[a,b,][1]]`\n\n\n### spaces added by fix\n`first-attribute-linebreak` adds a space between `tag(` and `attr=\"\"` in certain scenarios.\n\n### attribute separators\nThings like `max-attributes-per-line` would need to include the `,` in the attribute range for some fixes to work correctly, but this would break `attribute-order`.\n\n### HTML tokens\nthere are some rules relying on HTML* tokens, like `no-multi-spaces`.\n\n### Splitting low level mustache tokens\n\n### template attributes\n\nhaving both lang and src attributes on template, what does that even do?\n\n### HTML rules\n\nRules for HTML don't apply to pug, but do not seem to interfere with pug templates since they check `HTML*` tokens, which we don't emit. Should we still disable those rules or leave them on?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashfael%2Feslint-plugin-vue-pug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frashfael%2Feslint-plugin-vue-pug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashfael%2Feslint-plugin-vue-pug/lists"}