From a0b771f54dd58a44dbfbdc4139c8c3a32199a2d7 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Mon, 8 Jan 2018 21:43:05 +0100 Subject: [PATCH] build: add lint rule to prevent binding to class attribute directly Adds a lint rule that prevents us from binding to `[class]` directly. Fixes #8340. --- tslint.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tslint.json b/tslint.json index 465b76f0a3ce..9468b04ba3ea 100644 --- a/tslint.json +++ b/tslint.json @@ -99,7 +99,11 @@ "moduleId": "^module\\.id$", "preserveWhitespaces": "false$", "changeDetection": "\\.OnPush$", - "!styles": ".*" + "!styles": ".*", + "!host": "\\[class\\]" + }, + "Directive": { + "!host": "\\[class\\]" } }, "src/+(lib|cdk|material-experimental|cdk-experimental)/**/!(*.spec).ts"], "require-license-banner": [