File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ rules:
512
512
no-jquery/no-box-model : [2]
513
513
no-jquery/no-browser : [2]
514
514
no-jquery/no-camel-case : [2]
515
- no-jquery/no-class-state : [0 ]
515
+ no-jquery/no-class-state : [2 ]
516
516
no-jquery/no-class : [0]
517
517
no-jquery/no-clone : [2]
518
518
no-jquery/no-closest : [0]
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export function initRepoCommentForm() {
125
125
126
126
$listMenu . find ( '.item:not(.no-select)' ) . on ( 'click' , function ( e ) {
127
127
e . preventDefault ( ) ;
128
- if ( $ ( this ) . hasClass ( 'ban-change' ) ) {
128
+ if ( this . classList . contains ( 'ban-change' ) ) {
129
129
return false ;
130
130
}
131
131
@@ -140,15 +140,15 @@ export function initRepoCommentForm() {
140
140
if ( this . getAttribute ( 'data-scope' ) !== scope ) {
141
141
return true ;
142
142
}
143
- if ( this !== clickedItem && ! $ ( this ) . hasClass ( 'checked' ) ) {
143
+ if ( this !== clickedItem && ! this . classList . contains ( 'checked' ) ) {
144
144
return true ;
145
145
}
146
146
} else if ( this !== clickedItem ) {
147
147
// Toggle for other labels
148
148
return true ;
149
149
}
150
150
151
- if ( $ ( this ) . hasClass ( 'checked' ) ) {
151
+ if ( this . classList . contains ( 'checked' ) ) {
152
152
$ ( this ) . removeClass ( 'checked' ) ;
153
153
$ ( this ) . find ( '.octicon-check' ) . addClass ( 'tw-invisible' ) ;
154
154
if ( hasUpdateAction ) {
@@ -187,7 +187,7 @@ export function initRepoCommentForm() {
187
187
188
188
const listIds = [ ] ;
189
189
$ ( this ) . parent ( ) . find ( '.item' ) . each ( function ( ) {
190
- if ( $ ( this ) . hasClass ( 'checked' ) ) {
190
+ if ( this . classList . contains ( 'checked' ) ) {
191
191
listIds . push ( $ ( this ) . data ( 'id' ) ) ;
192
192
$ ( $ ( this ) . data ( 'id-selector' ) ) . removeClass ( 'tw-hidden' ) ;
193
193
} else {
You can’t perform that action at this time.
0 commit comments