Skip to content

Fix Angular ESLint v13 #183

Fix Angular ESLint v13

Fix Angular ESLint v13 #183

GitHub Actions / test report (Node.js 14.15.0, ESLint 8, Angular ESLint 13) succeeded Apr 17, 2024 in 0s

81 passed, 0 failed and 0 skipped

Tests passed successfully

✅ coverage/junit.xml

81 tests were completed in 3s with 81 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
tests/rules/eslint-plugin-angular-template-consistent-this/test.ts 81✅ 3s

✅ tests/rules/eslint-plugin-angular-template-consistent-this/test.ts

eslint-plugin-angular-template-consistent-this › valid
  ✅ Only properties should be prefixed, not values. Explicit.
  ✅ Only properties should be prefixed, not values. Implicit.
  ✅ Data-binding. Explicit.
  ✅ Data-binding. Implicit.
  ✅ Data-binding. Other options shouldn't affect result.
  ✅ Data-binding, with extra whitespaces and tabs. Explicit.
  ✅ Data-binding, with extra whitespaces and tabs. Implicit.
  ✅ Data-binding, with extra whitespaces and tabs. Other options shouldn't affect result.
  ✅ Data-binding, with line-breaks. Explicit.
  ✅ Data-binding, with line-breaks. Implicit.
  ✅ Data-binding, with line-breaks. Other options shouldn't affect result.
  ✅ Interpolation. Explicit.
  ✅ Interpolation. Implicit.
  ✅ Interpolation. Other options shouldn't affect result.
  ✅ Interpolation, with extra whitespaces and tabs. Explicit.
  ✅ Interpolation, with extra whitespaces and tabs. Implicit.
  ✅ Interpolation, with extra whitespaces and tabs. Other options shouldn't affect result.
  ✅ Interpolation, with line-breaks. Explicit.
  ✅ Interpolation, with line-breaks. Implicit.
  ✅ Interpolation, with line-breaks. Other options shouldn't affect result.
  ✅ Interpolation, with pipes. Explicit.
  ✅ Interpolation, with pipes. Implicit.
  ✅ Interpolation, with pipes. Other options shouldn't affect result.
  ✅ Data-binding & interpolation with sub-properties. Explicit.
  ✅ Data-binding & interpolation with sub-properties. Implicit.
  ✅ Data-binding & interpolation with sub-properties. Other options shouldn't affect result.
  ✅ NgIf directive `*ngIf`. Explicit property.
  ✅ NgIf directive `*ngIf`. Implicit property.
  ✅ NgIf directive `*ngIf`. Other options shouldn't affect result.
  ✅ NgIf directive `[ngIf]`. Explicit property.
  ✅ NgIf directive `[ngIf]`. Implicit property.
  ✅ NgIf directive `[ngIf]`. Other options shouldn't affect result.
  ✅ NgIf directive `*ngIf` with "as variable". Explicit variable.
  ✅ NgIf directive `*ngIf` with "as variable". Implicit variable.
  ✅ NgIf directive `*ngIf` with "as variable". Other options shouldn't affect result.
  ✅ NgIf directive `*ngIf` with "let variable". Explicit variable.
  ✅ NgIf directive `*ngIf` with "let variable". Implicit variable.
  ✅ NgIf directive `*ngIf` with "let variable". Other options shouldn't affect result.
  ✅ NgIf directive `*ngIf` with then & else references to templates that are defined *after* property reading. Explicit template references.
  ✅ NgIf directive `*ngIf` with then & else references to templates that are defined *after* property reading. Implicit template references.
  ✅ NgIf directive `*ngIf` with then & else references to templates that are defined *after* property reading. Other options shouldn't affect result.
  ✅ NgForOf directive `*ngFor` with exported values and trackBy option. Explicit.
  ✅ NgForOf directive `*ngFor` with exported values and trackBy option. Implicit.
  ✅ NgForOf directive `[ngForOf]` with exported values and trackBy option. Explicit.
  ✅ NgForOf directive `[ngForOf]` with exported values and trackBy option. Implicit.
  ✅ NgTemplateOutlet directive `*ngTemplateOutlet` with context and templates that are defined *after* property reading. Default options.
  ✅ NgTemplateOutlet directive `*ngTemplateOutlet` with context and templates that are defined *after* property reading. Explicit.
  ✅ NgTemplateOutlet directive `*ngTemplateOutlet` with context and templates that are defined *after* property reading. Implicit.
  ✅ Template *reference* variable (`#template`) accessed via data-binding. Default options.
  ✅ Template *reference* variable (`#template`) accessed via data-binding. Explicit.
  ✅ Template *reference* variable (`#template`) accessed via data-binding. Implicit.
  ✅ Template *reference* variable (`#template`) accessed via interpolation. Default options.
  ✅ Template *reference* variable (`#template`) accessed via interpolation. Explicit.
  ✅ Template *reference* variable (`#template`) accessed via interpolation. Implicit.
  ✅ EventEmitter $event.
eslint-plugin-angular-template-consistent-this › invalid
  ✅ <test [bar]="foo">{{this.bar}}</test>
  ✅ <test [bar]="this.foo">{{bar}}</test>
  ✅ <test [bar]="  \u0009\u0009foo  \u0009\u0009">{{this.bar}}</test>
                       \u0009\u0009
  ✅ <test [bar]="  \u0009\u0009this.foo  \u0009\u0009">{{bar}}</test>
                       \u0009\u0009
  ✅ <test [bar]="
          
          foo
          
        ">{{this.bar}}</test>
  ✅ <test [bar]="
          
          this.foo
          
        ">{{bar}}</test>
  ✅ <test bar="{{foo}}">{{this.bar}}</test>
  ✅ <test bar="{{this.foo}}">{{bar}}</test>
  ✅ <test bar="{{  foo  }}">{{\u0009\u0009bar\u0009\u0009}}</test>
                                  \u0009\u0009.
  ✅ <test bar="{{  this.foo  }}">{{\u0009\u0009this.bar\u0009\u0009}}</test>
                                       \u0009\u0009.
  ✅ test {{
          pagination
          
        }}
  ✅ test {{
  this.pagination
  
}}
  ✅ <test bar="{{foo | json}}">{{this.bar | json}}</test>
  ✅ <test bar="{{this.foo | json}}">{{bar | json}}</test>
  ✅ <test2 [bar]="foo.bar.baz">{{ foo.bar.baz }}</test2>
                                      .
  ✅ <test3 [bar]="this.foo.bar.baz">{{ this.foo.bar.baz }}</test3>
                                           .
  ✅ <test-elm-with-id #test_identifier>
          <test-elm-child [prop]="test_identifier.property"></test-elm-child>
                                  
        </test-elm-with-id>
  ✅ <test-elm-with-id #test_identifier>
          <test-elm-child [prop]="this.test_identifier.property"></test-elm-child>
                                  
        </test-elm-with-id>
  ✅ <test-elm-with-id #test_identifier>
          {{ test_identifier.property }}
             
        </test-elm-with-id>
  ✅ <test-elm-with-id #test_identifier>
          {{ this.test_identifier.property }}
             
        </test-elm-with-id>
  ✅ <test4 *ngIf="foo as bar; then thenBlock else elseBlock">{{bar}}</test4>
                                                                   .
        <ng-template #thenBlock>...</ng-template>
        <ng-template #elseBlock>...</ng-template>
  ✅ <test *ngIf="this.foo as bar; then this.thenBlock else this.elseBlock">{{this.bar}}</test>
                                                                                 .
        <ng-template #thenBlock>...</ng-template>
        <ng-template #elseBlock>...</ng-template>
  ✅ <li *ngFor="let item of items; index as i; trackBy: trackByFn">
                                                                     .
          <test>{{i}} {{item}}</test>
                        .
        </li>
  ✅ <li *ngFor="let item of this.items; index as i; trackBy: this.trackByFn">
                                                                               .
          <test-ng-for>{{this.i}} {{this.item}}</test-ng-for>
                                    .
        </li>
  ✅ \u0009\u0009\u0009\u0009\u0009<test
\u0009\u0009\u0009\u0009\u0009\u0009*ngIf="
\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009foo.bar.baz !== null &&
\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009   
\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009foo.bar.baz.length > 0
\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009;
\u0009\u0009\u0009\u0009\u0009\u0009">
\u0009\u0009\u0009\u0009\u0009\u0009</test>
  ✅ \u0009\u0009\u0009\u0009\u0009<test
\u0009\u0009\u0009\u0009\u0009\u0009*ngIf="
\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009foo2.bar2.baz2
\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009;
\u0009\u0009\u0009\u0009\u0009\u0009">
\u0009\u0009\u0009\u0009\u0009\u0009</test>