Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Bug: 'Missing whitespace in interpolation end; expecting {{ expr }}' #4048

Closed
robvaneck opened this issue Jul 17, 2018 · 4 comments
Closed

Comments

@robvaneck
Copy link

robvaneck commented Jul 17, 2018

Hi,

im using

"angular-tslint-rules": "^1.4.1",
 "codelyzer": "^4.4.2",
"tslint": "^5.11.0",

(complete list)

  "devDependencies": {
    "@angular/cli": "1.7.2",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~9.4.6",
    "angular-tslint-rules": "^1.4.1",
    "codelyzer": "^4.4.2",
    "cors-anywhere": "^0.4.1",
    "http-proxy": "^1.16.2",
    "jasmine-core": "~3.1.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.3.0",
    "ts-node": "~5.0.1",
    "tslint": "^5.11.0",
    "typescript": "~2.7.2"
  }

when i run ng lint I get around 20 the same errors on different files about whitepace interpolation... but these files are controllers.. I think it is a bug.

ERROR: /Users/username/repos/repo/src/app/somemodule/some.component.ts[43, 1]: Missing whitespace in interpolation end; expecting {{ expr }}

my components are as simple as below... but tslint thinks i should have extra }} at the end.. (as if it is a template?)

import { Component, Input, OnInit } from '@angular/core';
import { Activity } from '../../_types/models/activity';

@Component({
  selector: 'card-activity',
  templateUrl: './card-activity.component.html',
  styleUrls: ['./card-activity.component.css']
})
export class CardActivityComponent implements OnInit {

  @Input() activity: Activity;

  constructor() {
    //
  }

  ngOnInit(): void {
    //
  }
}

Is this tslint related, or angular-tslint-rules related?

@Shinigami92
Copy link
Contributor

It is codelyzer angular-whitespace

@robvaneck
Copy link
Author

Ok, i've also posted it there! thanks @Shinigami92

@Shinigami92
Copy link
Contributor

@borriej can you add a link here and close this issue?

Also this is a bug: the rule think it is in the ts file, but it is in html file

@robvaneck
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants