Skip to content

Commit 73f89bd

Browse files
crisbetoandrewseguin
authored andcommitted
build: add lint rule to prevent binding to class attribute directly (#9289)
Adds a lint rule that prevents us from binding to `[class]` directly. Fixes #8340.
1 parent 69ba32d commit 73f89bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tslint.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@
9898
"encapsulation": "\\.None$",
9999
"moduleId": "^module\\.id$",
100100
"preserveWhitespaces": "false$",
101-
"changeDetection": "\\.OnPush$"
101+
"changeDetection": "\\.OnPush$",
102+
"!host": "\\[class\\]"
103+
},
104+
"Directive": {
105+
"!host": "\\[class\\]"
102106
}
103107
}, "src/+(lib|cdk|material-experimental|cdk-experimental)/**/!(*.spec).ts"],
104108
"require-license-banner": [

0 commit comments

Comments
 (0)