Gathering detailed insights and metrics for eslint-plugin-angular-template-consistent-this
Gathering detailed insights and metrics for eslint-plugin-angular-template-consistent-this
Gathering detailed insights and metrics for eslint-plugin-angular-template-consistent-this
Gathering detailed insights and metrics for eslint-plugin-angular-template-consistent-this
ESLint Angular Template consistent this for properties, variables & template references.
npm install eslint-plugin-angular-template-consistent-this
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (98.6%)
JavaScript (1.4%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
237 Commits
1 Forks
3 Watchers
2 Branches
1 Contributors
Updated on Aug 30, 2022
Latest Version
0.7.1
Package Id
eslint-plugin-angular-template-consistent-this@0.7.1
Unpacked Size
32.82 kB
Size
8.76 kB
File Count
21
NPM Version
10.5.2
Node Version
21.6.1
Published on
Apr 17, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
28
eslint-plugin-angular-template-consistent-this
Explicit/implicit prefix properties, variables and template references with this.
in Angular HTML templates.
There is no functional reason to start properties with this
. It is solely aesthetic. But by giving developers the choice to apply it or not, the code will look inconsistent.
Explicit means that properties, variables and template references start with this.
, like: <test *ngIf="this.foo">{{this.bar}}</test>
.
Read more about this rule in the documentation.
You'll need to have an Angular project with the following packages installed:
Install eslint-plugin-angular-template-consistent-this
:
1npm install eslint-plugin-angular-template-consistent-this --save-dev
Add eslint-plugin-angular-template-consistent-this
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
1{ 2 "root": true, 3 "ignorePatterns": ["projects/**/*"], 4 "overrides": [ 5 // ... 6 { 7 "files": ["*.html"], 8 "extends": [ 9 "plugin:@angular-eslint/template/recommended" 10 ], 11+ "plugins": ["angular-template-consistent-this"], 12 "rules": { 13 // ... 14 } 15 } 16 ] 17}
Then configure the rules you want to use under the rules section. The recommended configuration is:
1{ 2 "root": true, 3 "ignorePatterns": ["projects/**/*"], 4 "overrides": [ 5 // ... 6 { 7 "files": ["*.html"], 8 "extends": [ 9 "plugin:@angular-eslint/template/recommended" 10 ], 11 "plugins": ["angular-template-consistent-this"], 12 "rules": { 13+ // Prepend properties with `this`. 14+ "angular-template-consistent-this/eslint-plugin-angular-template-consistent-this": [ 15+ "error", 16+ { 17+ "properties": "explicit", 18+ "variables": "implicit", 19+ "templateReferences": "implicit" 20+ } 21+ ] 22 } 23 } 24 ] 25}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
7 existing vulnerabilities detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More