File tree 1 file changed +19
-0
lines changed 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,14 @@ For `propNamePattern` glob string patterns:
75
75
}
76
76
```
77
77
78
+ ``` js
79
+ {
80
+ " propNamePattern" : ' **-**' ,
81
+ " allowedForPatterns" : [" *Component" ],
82
+ " message" : " Avoid using kebab-case except components that match the `*Component` pattern"
83
+ }
84
+ ```
85
+
78
86
Use ` allowedForPatterns ` for glob string patterns:
79
87
80
88
``` js
@@ -95,6 +103,17 @@ Use `disallowedForPatterns` for glob string patterns:
95
103
}
96
104
```
97
105
106
+ Combine several properties to cover more cases:
107
+
108
+ ``` js
109
+ {
110
+ " propName" : " someProp" ,
111
+ " allowedFor" : [' div' ],
112
+ " allowedForPatterns" : [" *Component" ],
113
+ " message" : " Avoid using `someProp` except `div` and components that match the `*Component` pattern"
114
+ }
115
+ ```
116
+
98
117
### Related rules
99
118
100
119
- [ forbid-dom-props] ( ./forbid-dom-props.md )
You can’t perform that action at this time.
0 commit comments