File tree 2 files changed +24
-1
lines changed 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ Declarations (mode `local`, by default):
59
59
In pure mode, all selectors must contain at least one local class or id
60
60
selector
61
61
62
- To ignore this rule for a specific selector, add the following comment in front
62
+ To ignore this rule for a specific selector, add the a ` /* cssmodules-pure-ignore */ ` comment in front
63
63
of the selector:
64
64
65
65
``` css
@@ -69,6 +69,20 @@ of the selector:
69
69
}
70
70
```
71
71
72
+ or by adding a ` /* cssmodules-pure-no-check */ ` comment at the top of a file to disable this check for the whole file:
73
+
74
+ ``` css
75
+ /* cssmodules-pure-no-check */
76
+
77
+ :global(#modal-backdrop ) {
78
+ ...;
79
+ }
80
+
81
+ :global(#my-id ) {
82
+ ...;
83
+ }
84
+ ```
85
+
72
86
## Building
73
87
74
88
``` bash
Original file line number Diff line number Diff line change @@ -1213,6 +1213,15 @@ const tests = [
1213
1213
/* cssmodules-pure-no-check */` ,
1214
1214
error : / i s n o t p u r e / ,
1215
1215
} ,
1216
+ {
1217
+ name : "should ignore no-check comment if not at root level #2" ,
1218
+ options : { mode : "pure" } ,
1219
+ input : `/* Some file description */
1220
+ .class { color: red; }
1221
+ /* cssmodules-pure-no-check */
1222
+ :global(.foo) { color: blue }` ,
1223
+ error : / i s n o t p u r e / ,
1224
+ } ,
1216
1225
{
1217
1226
name : "should allow other comments before no-check comment" ,
1218
1227
options : { mode : "pure" } ,
You can’t perform that action at this time.
0 commit comments