Skip to content

Commit

Permalink
build: Update eslint-config-wikimedia to 0.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
edg2s authored Jun 4, 2024
1 parent bc508e8 commit 8ca4d31
Show file tree
Hide file tree
Showing 51 changed files with 5,533 additions and 1,353 deletions.
30 changes: 15 additions & 15 deletions docs/rules/no-ajax-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ Disallows global ajax events handlers: [`.ajaxComplete`](https://api.jquery.com/

❌ Examples of **incorrect** code:
```js
$( document ).on( 'ajaxSend', function ( e ) { } );
$( document ).on( 'ajaxSuccess', function ( e ) { } );
$form.on( 'ajaxError', function ( e ) { } );
$form.on( 'ajaxComplete', function ( e ) { } );
$form.on( 'ajaxStart', function ( e ) { } );
$form.on( 'ajaxStop', function ( e ) { } );
$( document ).ajaxSend( function ( e ) { } );
$( document ).ajaxSuccess( function ( e ) { } );
$form.ajaxError( function ( e ) { } );
$form.ajaxComplete( function ( e ) { } );
$form.ajaxStart( function ( e ) { } );
$form.ajaxStop( function ( e ) { } );
$( document ).on( 'ajaxSend', fn );
$( document ).on( 'ajaxSuccess', fn );
$form.on( 'ajaxError', fn );
$form.on( 'ajaxComplete', fn );
$form.on( 'ajaxStart', fn );
$form.on( 'ajaxStop', fn );
$( document ).ajaxSend( fn );
$( document ).ajaxSuccess( fn );
$form.ajaxError( fn );
$form.ajaxComplete( fn );
$form.ajaxStart( fn );
$form.ajaxStop( fn );
```

✔️ Examples of **correct** code:
```js
$( document ).on( 'click', function ( e ) { } );
$form.on( 'submit', function ( e ) { } );
$( document ).on( 'click', fn );
$form.on( 'submit', fn );
$form.on();
on( 'ajaxSuccess', '.js-select-menu', function ( e ) { } );
on( 'ajaxSuccess', '.js-select-menu', fn );
form.on( 'ajaxSend' );
form.ajaxSend();
$.ajaxSend();
Expand Down
Loading

0 comments on commit 8ca4d31

Please sign in to comment.