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

One (or both) of the following arguments must be 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"]
"angular-whitespace": [true, "check-pipe"]
"angular-whitespace": [true, "check-semicolon"]
"angular-whitespace": [true, "check-interpolation", "check-pipe", "check-semicolon"]
Schema
{
  "items": {
    "enum": [
      "check-interpolation",
      "check-pipe",
      "check-semicolon"
    ],
    "type": "string"
  },
  "maxLength": 3,
  "minLength": 1,
  "type": "array"
}