Rule: angular-whitespace

Ensures the proper formatting of Angular expressions.

Rationale

Having whitespace in the right places in an Angular expression makes the template more readable.

Notes:
TS Only Has Fixer

Config

Arguments may be optionally provided:

  • "check-interpolation" checks for whitespace before and after the interpolation characters
  • "check-pipe" checks for whitespace before and after a pipe
  • "check-semicolon" checks for whitespace after semicolon
Examples
"angular-whitespace": [true, "check-interpolation"]
Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
      "check-interpolation",
      "check-pipe",
      "check-semicolon"
    ]
  },
  "minLength": 0,
  "maxLength": 3
}