{"id":17960433,"url":"https://github.com/flyrell/eslint-plugin-angular-template-spacing","last_synced_at":"2025-04-03T18:25:06.946Z","repository":{"id":58481370,"uuid":"530982336","full_name":"Flyrell/eslint-plugin-angular-template-spacing","owner":"Flyrell","description":"Plugin that offers spacing possibilities in Angular's templates using ESLint","archived":false,"fork":false,"pushed_at":"2022-09-07T13:08:56.000Z","size":461,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T01:03:44.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Flyrell.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}},"created_at":"2022-08-31T07:41:55.000Z","updated_at":"2022-08-31T19:20:52.000Z","dependencies_parsed_at":"2023-01-17T23:01:00.052Z","dependency_job_id":null,"html_url":"https://github.com/Flyrell/eslint-plugin-angular-template-spacing","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flyrell%2Feslint-plugin-angular-template-spacing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flyrell%2Feslint-plugin-angular-template-spacing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flyrell%2Feslint-plugin-angular-template-spacing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flyrell%2Feslint-plugin-angular-template-spacing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flyrell","download_url":"https://codeload.github.com/Flyrell/eslint-plugin-angular-template-spacing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247054236,"owners_count":20875970,"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":[],"created_at":"2024-10-29T11:06:23.760Z","updated_at":"2025-04-03T18:25:06.919Z","avatar_url":"https://github.com/Flyrell.png","language":"TypeScript","readme":"# eslint-plugin-angular-template-spacing\n\nPlugin that offers spacing possibilities in Angular's templates using ESLint.\nYou can set the spacing rules around interpolation and pipes.\n\n### Requirements\nIn order for this plugin to work,\nyou have to have the peer dependencies installed:\n- `@angular-eslint/eslint-plugin-template` `\u003e= v12.0.0`\n- `@angular-eslint/tempalte-parser` `\u003e= 12.0.0`\n- `@angular/complier` `\u003e= 12.0.0`\n- `eslint` `^8.0.0`\n\n### Installation\n\nIn order to install plugin in your repository run:\n```bash\nnpm install --save-dev eslint-plugin-angular-template-spacing\n```\n\n## Usage\n\nAdd plugin to the array of plugins for eslint\n```json\n{\n  \"plugins\": [\n    \"angular-template-spacing\" \n  ]\n}\n```\n\nAdd the rules:\n\n#### Recommended rules\n\nYou can extend the recommended set of rules which ensures spaces in interpolation statements and pipes. \n```json\n{\n    \"extends\": [\n      \"plugin:angular-template-spacing/recommended\"\n    ]\n}\n```\n\nExample of correct usage of recommended rules\n```html\n\u003cdiv\u003e{{ 'My text' }}\u003c/div\u003e\n\u003cdiv\u003e{{ computedText | pipe }}\u003c/div\u003e\n\u003cdiv\u003e{{ numericVariable | pipe1 | pipe2 }}\u003c/div\u003e\n\u003cdiv\u003e{{ numericVariable | pipe:'pipe-arguments' }}\u003c/div\u003e\n\u003cdiv\u003e{{ numericVariable | pipe1:'pipe1-arguments' | pipe2:'pipe2-arguments' }}\u003c/div\u003e\n\u003cmy-component [a-directive]=\"value | pipe\"\u003e\u003c/my-component\u003e\n```\n\n#### Specific rules\n\nOr add the specific rules yourself\n\n```json5\n{\n  \"rules\": {\n    // Checks the spacing before and after the pipe\n    // \"always\" =\u003e \"value | pipe\"\n    // \"never\" =\u003e \"value|pipe\"\n    \"angular-template-spacing/pipes\": [\"off|warn|error\", \"always|never\"],\n\n    // Checks the spacing at the begging and at the end of interpolation\n    // \"always\": \"{{ value }}\"\n    // \"never\": \"{{value}}\"\n    // \"always\" with \"acceptWhitespaces: true\":\n    //    \"{{\n    //        example\n    //     }}\"\n    \"angular-template-spacing/interpolation\": [\"off|warn|error\", \"always|never\", { \"acceptWhitespaces\": true|false }]\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyrell%2Feslint-plugin-angular-template-spacing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyrell%2Feslint-plugin-angular-template-spacing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyrell%2Feslint-plugin-angular-template-spacing/lists"}