{"id":23695694,"url":"https://github.com/rx-ts/ng-tslint","last_synced_at":"2025-09-03T00:31:35.038Z","repository":{"id":39255839,"uuid":"280822772","full_name":"rx-ts/ng-tslint","owner":"rx-ts","description":"Useful TSLint rules extracted from `angular/components` for Angular libraries.","archived":false,"fork":false,"pushed_at":"2024-10-29T19:05:27.000Z","size":194,"stargazers_count":2,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-29T21:05:27.072Z","etag":null,"topics":["angular","angular-tslint-rules","tslint","tslint-rules"],"latest_commit_sha":null,"homepage":"https://rx-ts.github.io/ng-tslint/","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/rx-ts.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["JounQin","1stG","rx-ts","un-ts"],"patreon":"1stG","open_collective":"rxts","custom":["https://opencollective.com/1stG","https://opencollective.com/unts","https://afdian.net/@JounQin"]}},"created_at":"2020-07-19T08:21:08.000Z","updated_at":"2024-10-01T03:58:17.000Z","dependencies_parsed_at":"2023-02-17T03:30:37.011Z","dependency_job_id":"59d7f3d4-4f5e-43f4-899c-dd99d7dd1871","html_url":"https://github.com/rx-ts/ng-tslint","commit_stats":{"total_commits":83,"total_committers":4,"mean_commits":20.75,"dds":0.4457831325301205,"last_synced_commit":"e9e09bd8a01523b4402dbf333532c295c74a72cf"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rx-ts%2Fng-tslint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rx-ts%2Fng-tslint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rx-ts%2Fng-tslint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rx-ts%2Fng-tslint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rx-ts","download_url":"https://codeload.github.com/rx-ts/ng-tslint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231742850,"owners_count":18419859,"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","angular-tslint-rules","tslint","tslint-rules"],"created_at":"2024-12-30T05:56:15.785Z","updated_at":"2024-12-30T05:56:16.425Z","avatar_url":"https://github.com/rx-ts.png","language":"TypeScript","funding_links":["https://github.com/sponsors/JounQin","https://github.com/sponsors/1stG","https://github.com/sponsors/rx-ts","https://github.com/sponsors/un-ts","https://patreon.com/1stG","https://opencollective.com/rxts","https://opencollective.com/1stG","https://opencollective.com/unts","https://afdian.net/@JounQin"],"categories":[],"sub_categories":[],"readme":"[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/rx-ts/ng-tslint)\n\n# ng-tslint\n\nUseful TSLint rules extracted from [`angular/components`](https://github.com/angular/components/tree/master/tools/tslint-rules) for Angular libraries.\n\n## Install\n\n```sh\n# npm\nnpm i -D ng-tslint\n\n# yarn\nyarn add -D ng-tslint\n```\n\n## Rules\n\n\u003c!-- Rules start --\u003e\n\n### class-list-signatures\n\nRule that catches cases where `classList` is used in a way\nthat won't work in all browsers that we support.\n\n### coercion-types\n\nTSLint rule that verifies that classes declare corresponding `ngAcceptInputType_*`\nstatic fields for inputs that use coercion inside of their setters. Also handles\ninherited class members and members that come from an interface.\n\n### lightweight-tokens\n\nRule that warns if a DI constructor is discovered for which parameters optionally\ninject classes without using the lightweight token pattern. The rule intends to help\nwith optimized source code that works well for tree shakers. Read more about this here:\nhttps://angular.io/guide/lightweight-injection-tokens.\n\n### member-naming\n\nLint rule that checks the names of class members against a pattern. Configured per modifier, e.g.\n\n```jsonc\n{\n  \"member-naming\": [\n    true,\n    {\n      \"private\": \"^_\" // All private properties should start with `_`.\n    }\n  ]\n}\n```\n\n### ng-on-changes-property-access\n\nRule that catches cases where a property of a `SimpleChanges` object is accessed directly,\nrather than through a literal. Accessing properties of `SimpleChanges` directly can break\nwhen using Closure's property renaming.\n\n### no-cross-entry-point-relative-imports\n\nRule that enforces that imports or exports with relative paths do not resolve to\nsource files outside of the current Bazel package. This enforcement is necessary\nbecause relative cross entry-point imports/exports can cause code being inlined\nunintentionally and could break module resolution since the folder structure\nchanges in the Angular Package release output.\n\n### no-exposed-todo\n\nRule that walks through all comments inside of the library and adds failures when it\ndetects TODO's inside of multi-line comments. TODOs need to be placed inside of single-line\ncomments.\n\n### no-import-export-spacing\n\nRule that ensures that there are no spaces before/after the braces in import and export clauses.\n\n### no-private-getters\n\nRule that doesn't allow private getters.\n\n### no-undecorated-base-class-di\n\nRule that doesn't allow inheriting a constructor using dependency injection from an\nundecorated base class. With Ivy, undecorated base classes cannot use dependency\ninjection. Classes that inherit the constructor from the base class can specify\nan explicit pass-through constructor to make DI work.\n\n### no-undecorated-class-with-angular-features\n\nRule that doesn't allow undecorated class declarations using Angular features.\n\n### no-unescaped-html-tag\n\nRule that walks through all comments inside of the library and adds failures when it\ndetects unescaped HTML tags inside of multi-line comments.\n\n### prefer-const-enum\n\nRule that enforces that we use `const enum` rather than a plain `enum`.\n\n### require-breaking-change-version\n\nRule that ensures that comments, indicating a deprecation\nor a breaking change, have a valid version.\n\n### require-license-banner\n\nRule that walks through all TypeScript files of public packages and shows failures if a\nfile does not have the license banner at the top of the file.\n\n### setters-after-getters\n\nRule that enforces that property setters are declared after getters.\n\n### validate-decorators\n\nRule that enforces certain decorator properties to be defined and to match a pattern.\nProperties can be forbidden by prefixing their name with a `!`. Supports specifying a matcher for\nfiltering valid files via the third argument, as well as validating all the arguments by passing\nin a regex. E.g.\n\n```jsonc\n{\n  \"validate-decorators\": [\n    true,\n    {\n      \"Component\": {\n        \"argument\": 0,\n        \"properties\": {\n          \"encapsulation\": \"\\\\.None$\",\n          \"!styles\": \".*\"\n        }\n      },\n      \"NgModule\": {\n        \"argument\": 0,\n        \"properties\": \"^(?!\\\\s*$).+\"\n      }\n    },\n    \"src/material\"\n  ]\n}\n```\n\n\u003c!-- Rules end --\u003e\n\n## License\n\n[MIT][] © [JounQin][]@[1stG.me][]\n\n[1stg.me]: https://www.1stg.me\n[jounqin]: https://GitHub.com/JounQin\n[mit]: http://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frx-ts%2Fng-tslint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frx-ts%2Fng-tslint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frx-ts%2Fng-tslint/lists"}