{"id":19990015,"url":"https://github.com/ng-alain/ng-alain-codelyzer","last_synced_at":"2025-04-14T14:41:03.549Z","repository":{"id":66200453,"uuid":"166785369","full_name":"ng-alain/ng-alain-codelyzer","owner":"ng-alain","description":"A set of tslint rules for static code analysis of ng-alain projects.","archived":false,"fork":false,"pushed_at":"2019-01-22T11:30:46.000Z","size":12,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-23T10:02:07.526Z","etag":null,"topics":["angular","codelyzer","delon","lint","ng-alain","style-guide","tslint"],"latest_commit_sha":null,"homepage":"https://ng-alain.com","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/ng-alain.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}},"created_at":"2019-01-21T09:27:22.000Z","updated_at":"2019-07-15T14:59:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2aad933-edf6-40e9-b190-8c4e44f7b376","html_url":"https://github.com/ng-alain/ng-alain-codelyzer","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"a4a3c5570b7b2ff3f55f502048712db4fa6e7a92"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-alain%2Fng-alain-codelyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-alain%2Fng-alain-codelyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-alain%2Fng-alain-codelyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-alain%2Fng-alain-codelyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ng-alain","download_url":"https://codeload.github.com/ng-alain/ng-alain-codelyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248898421,"owners_count":21179773,"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":["angular","codelyzer","delon","lint","ng-alain","style-guide","tslint"],"created_at":"2024-11-13T04:50:54.112Z","updated_at":"2025-04-14T14:41:03.529Z","avatar_url":"https://github.com/ng-alain.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"## ng-alain-codelyzer [![Build Status](https://img.shields.io/travis/ng-alain/ng-alain-codelyzer/master.svg?style=flat-square)](https://travis-ci.org/ng-alain/ng-alain-codelyzer) [![NPM version](https://img.shields.io/npm/v/ng-alain-codelyzer.svg?style=flat-square)](https://www.npmjs.com/package/ng-alain-codelyzer)\n\nA set of tslint rules for static code analysis of [ng-alain](https://ng-alain.com) projects.\n\n## How to use?\n\nInstall ng-alain-codelyzer:\n\n```shell\n# via npm\nnpm i ng-alain-codelyzer --save-dev\n# via yarn\nyarn add -D ng-alain-codelyzer\n```\n\nUsing ng-alain-codelyzer from node_modules directory:\n\n```json\n{\n  \"rulesDirectory\": [\n    \"node_modules/ng-alain-codelyzer\"\n  ],\n  \"rules\": {\n    \"use-path-mapping\": [true, [\"@core\", \"@shared\"]]\n  }\n}\n```\n\nNext you can create a component file in the `src/app/routes` directory with name component.ts and the following content:\n\n```ts\nimport { I18NService } from '../core/i18n/i18n.service';\n```\n\nAs last step you can execute all the rules against your code with tslint:\n\n```shell\n./node_modules/.bin/tslint -c tslint.json src/app/routes/component.ts\n```\n\nYou should see the following output:\n\n```text\nERROR: src/app/routes/component.ts[1, 30]: Should be imported using `@core`\n```\n\n## Subdirectories\n\nIf you want to support subdirectory import styles:\n\n```ts\nimport { I18NService } from '@core/i18n/i18n.service';\n```\n\nConfigured as:\n\n```json\n{\n  \"use-path-mapping\": [true, [\"@core/*\", \"@shared\"]]\n}\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-alain%2Fng-alain-codelyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fng-alain%2Fng-alain-codelyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-alain%2Fng-alain-codelyzer/lists"}