File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ rules:
512512 no-jquery/no-box-model : [2]
513513 no-jquery/no-browser : [2]
514514 no-jquery/no-camel-case : [2]
515- no-jquery/no-class-state : [0 ]
515+ no-jquery/no-class-state : [2 ]
516516 no-jquery/no-class : [0]
517517 no-jquery/no-clone : [2]
518518 no-jquery/no-closest : [0]
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export function initRepoCommentForm() {
125125
126126 $listMenu . find ( '.item:not(.no-select)' ) . on ( 'click' , function ( e ) {
127127 e . preventDefault ( ) ;
128- if ( $ ( this ) . hasClass ( 'ban-change' ) ) {
128+ if ( this . classList . contains ( 'ban-change' ) ) {
129129 return false ;
130130 }
131131
@@ -140,15 +140,15 @@ export function initRepoCommentForm() {
140140 if ( this . getAttribute ( 'data-scope' ) !== scope ) {
141141 return true ;
142142 }
143- if ( this !== clickedItem && ! $ ( this ) . hasClass ( 'checked' ) ) {
143+ if ( this !== clickedItem && ! this . classList . contains ( 'checked' ) ) {
144144 return true ;
145145 }
146146 } else if ( this !== clickedItem ) {
147147 // Toggle for other labels
148148 return true ;
149149 }
150150
151- if ( $ ( this ) . hasClass ( 'checked' ) ) {
151+ if ( this . classList . contains ( 'checked' ) ) {
152152 $ ( this ) . removeClass ( 'checked' ) ;
153153 $ ( this ) . find ( '.octicon-check' ) . addClass ( 'tw-invisible' ) ;
154154 if ( hasUpdateAction ) {
@@ -187,7 +187,7 @@ export function initRepoCommentForm() {
187187
188188 const listIds = [ ] ;
189189 $ ( this ) . parent ( ) . find ( '.item' ) . each ( function ( ) {
190- if ( $ ( this ) . hasClass ( 'checked' ) ) {
190+ if ( this . classList . contains ( 'checked' ) ) {
191191 listIds . push ( $ ( this ) . data ( 'id' ) ) ;
192192 $ ( $ ( this ) . data ( 'id-selector' ) ) . removeClass ( 'tw-hidden' ) ;
193193 } else {
You can’t perform that action at this time.
0 commit comments