{"id":14363252,"url":"https://github.com/ecmel/prettier-plugin-ejs","last_synced_at":"2025-10-29T13:30:23.801Z","repository":{"id":146152261,"uuid":"617887934","full_name":"ecmel/prettier-plugin-ejs","owner":"ecmel","description":"Prettier EJS Plugin","archived":false,"fork":false,"pushed_at":"2024-01-29T08:07:47.000Z","size":46,"stargazers_count":18,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T03:06:12.033Z","etag":null,"topics":["ejs","ejs-templates","html","npm-package","prettier"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/prettier-plugin-ejs","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/ecmel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ecmel","custom":"https://www.buymeacoffee.com/ecmel"}},"created_at":"2023-03-23T10:19:36.000Z","updated_at":"2024-10-22T16:28:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f2c6458-0109-4048-830a-12f44c8bf031","html_url":"https://github.com/ecmel/prettier-plugin-ejs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecmel%2Fprettier-plugin-ejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecmel%2Fprettier-plugin-ejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecmel%2Fprettier-plugin-ejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecmel%2Fprettier-plugin-ejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecmel","download_url":"https://codeload.github.com/ecmel/prettier-plugin-ejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238825801,"owners_count":19537131,"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":["ejs","ejs-templates","html","npm-package","prettier"],"created_at":"2024-08-27T17:01:00.009Z","updated_at":"2025-10-29T13:30:18.489Z","avatar_url":"https://github.com/ecmel.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ecmel","https://www.buymeacoffee.com/ecmel"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Prettier Plugin for EJS\n\nThis plugin formats [EJS](https://ejs.co/) markup in `html` files. It uses the default html parser and just marks EJS specific tags as comments.\n\n## Installation\n\n```sh\nnpm install --save-dev prettier-plugin-ejs\n```\n\nFor Prettier v2, the plugin will be loaded automatically.\n\nFor Prettier v3, you'll need to manually load the plugin:\n\n```sh\nprettier --plugin=prettier-plugin-ejs --write .\n```\n\nPlease check [Prettier Docs](https://prettier.io/docs/en/plugins.html) for other loading methods.\n\n## Example\n\n### Before\n\n```html\n\u003cdiv\u003e\n  \u003c!-- prettier-ignore --\u003e\n  \u003cdiv\u003e\n    \u003c% if (condition) { %\u003e \u003c% } else if (condition) { %\u003e \u003c% } %\u003e\n  \u003c/div\u003e\n\n  \u003cdiv class=\"\u003c%= red %\u003e\"\u003e\u003c%= 1 \u003e 0 %\u003e\u003c/div\u003e\n\n  \u003ctextarea\u003e\u003c%= text %\u003e\u003c/textarea\u003e\n  \u003ccode\u003e\u003c%= text %\u003e\u003c/code\u003e\n  \u003cpre\u003e\u003c%= text %\u003e\u003c/pre\u003e\n\u003c/div\u003e\n```\n\n### After\n\n```html\n\u003cdiv\u003e\n  \u003cdiv\u003e\n    \u003c% if (condition) { %\u003e\n    \u003c% } else if (condition) { %\u003e\n    \u003c% } %\u003e\n  \u003c/div\u003e\n\n  \u003cdiv class=\"\u003c%= red %\u003e\"\u003e\u003c%= 1 \u003e 0 %\u003e\u003c/div\u003e\n\n  \u003ctextarea\u003e\u003c%= text %\u003e\u003c/textarea\u003e\n  \u003ccode\u003e\u003c%= text %\u003e\u003c/code\u003e\n  \u003cpre\u003e\u003c%= text %\u003e\u003c/pre\u003e\n\u003c/div\u003e\n```\n\n## Nested Tag\n\n```html\n\u003ctd \u003c% if (styleData) { %\u003e\n  style=\"\u003c%= styleData %\u003e\" \u003c% } %\u003e\u003e\n  \u003c%= data %\u003e\n  \u003c%= data %\u003e\n\u003c/td\u003e\n```\n\n## Note\n\nTags which contains the greater then symbol `\u003e` are ignored.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecmel%2Fprettier-plugin-ejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecmel%2Fprettier-plugin-ejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecmel%2Fprettier-plugin-ejs/lists"}