Skip to content

Commit 74d906a

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 e5a0f7d commit 74d906a

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
@@ -99,7 +99,11 @@
9999
"moduleId": "^module\\.id$",
100100
"preserveWhitespaces": "false$",
101101
"changeDetection": "\\.OnPush$",
102-
"!styles": ".*"
102+
"!styles": ".*",
103+
"!host": "\\[class\\]"
104+
},
105+
"Directive": {
106+
"!host": "\\[class\\]"
103107
}
104108
}, "src/+(lib|cdk|material-experimental|cdk-experimental)/**/!(*.spec).ts"],
105109
"require-license-banner": [

0 commit comments

Comments
 (0)