{"id":21612438,"url":"https://github.com/alo/lint-angular","last_synced_at":"2026-05-17T12:04:07.261Z","repository":{"id":38543682,"uuid":"265478401","full_name":"alo/lint-angular","owner":"alo","description":"Example repo to lint an angular project with tslint + prettier + husky","archived":false,"fork":false,"pushed_at":"2023-07-12T02:56:25.000Z","size":1052,"stargazers_count":1,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T16:30:40.079Z","etag":null,"topics":["angular","lint","prettier","tslint"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-20T06:56:15.000Z","updated_at":"2020-05-25T18:19:54.000Z","dependencies_parsed_at":"2022-08-24T09:20:56.417Z","dependency_job_id":null,"html_url":"https://github.com/alo/lint-angular","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alo/lint-angular","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alo%2Flint-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alo%2Flint-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alo%2Flint-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alo%2Flint-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alo","download_url":"https://codeload.github.com/alo/lint-angular/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alo%2Flint-angular/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33137831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["angular","lint","prettier","tslint"],"created_at":"2024-11-24T21:20:27.806Z","updated_at":"2026-05-17T12:04:07.231Z","avatar_url":"https://github.com/alo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lint Angular project\n\nThis is my Lint config for an angular project step by step.\n\n1. Add **Prettier** and some plugins to avoid problems with tslint\n\n```bash\nnpm install --save-dev tslint-plugin-prettier tslint-config-prettier prettier\n```\n\n2. Add **.prettierrs.json** and **.prettierignore** files (you have both in this repo)\n\n.prettierrc.json\n\n```json\n{\n  \"printWidth\": 120,\n  \"singleQuote\": true,\n  \"useTabs\": false,\n  \"tabWidth\": 2,\n  \"semi\": true,\n  \"bracketSpacing\": true,\n  \"trailingComma\": \"none\",\n  \"arrowParens\": \"avoid\"\n}\n```\n\n3. In tslint.json\n\n```json\n\"extends\": [\"tslint:recommended\", \"tslint-plugin-prettier\", \"tslint-config-prettier\"],\n\"rules\": {\n  \"prettier\": true,\n  ...\n}\n...\n```\n\nWe are installing 2 plugins:\n\n- **tslint-plugin-prettier** to use TSLint to run Prettier\n- **tslint-config-prettier** to disable rules that conflict with Prettier\n- You can read more [here](https://prettier.io/docs/en/integrating-with-linters.html#tslint)\n\n4. In Angular 9+ (tslint 6+) I manually delete this rule from tslint.json\n\n```json\n// DELETE THIS RULE FROM tslint.json\n\"semicolon\": {\n  \"options\": [\"always\"]\n},\n```\n\n5. Now you can `npm run lint` your project\n\n6. Adding **Husky** and **pretty-quick** to run prettier in your staged files\n\n```bash\nnpm install --save-dev husky\n```\n\n7. Create .huckyrc to check if files \n\n```json\n{\n  \"hooks\": {\n    \"pre-commit\": \"npm run lint\"\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falo%2Flint-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falo%2Flint-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falo%2Flint-angular/lists"}