Skip to content

Commit 8ca4d31

Browse files
authored
build: Update eslint-config-wikimedia to 0.28.0
1 parent bc508e8 commit 8ca4d31

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+5533
-1353
lines changed

docs/rules/no-ajax-events.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@ Disallows global ajax events handlers: [`.ajaxComplete`](https://api.jquery.com/
1010

1111
❌ Examples of **incorrect** code:
1212
```js
13-
$( document ).on( 'ajaxSend', function ( e ) { } );
14-
$( document ).on( 'ajaxSuccess', function ( e ) { } );
15-
$form.on( 'ajaxError', function ( e ) { } );
16-
$form.on( 'ajaxComplete', function ( e ) { } );
17-
$form.on( 'ajaxStart', function ( e ) { } );
18-
$form.on( 'ajaxStop', function ( e ) { } );
19-
$( document ).ajaxSend( function ( e ) { } );
20-
$( document ).ajaxSuccess( function ( e ) { } );
21-
$form.ajaxError( function ( e ) { } );
22-
$form.ajaxComplete( function ( e ) { } );
23-
$form.ajaxStart( function ( e ) { } );
24-
$form.ajaxStop( function ( e ) { } );
13+
$( document ).on( 'ajaxSend', fn );
14+
$( document ).on( 'ajaxSuccess', fn );
15+
$form.on( 'ajaxError', fn );
16+
$form.on( 'ajaxComplete', fn );
17+
$form.on( 'ajaxStart', fn );
18+
$form.on( 'ajaxStop', fn );
19+
$( document ).ajaxSend( fn );
20+
$( document ).ajaxSuccess( fn );
21+
$form.ajaxError( fn );
22+
$form.ajaxComplete( fn );
23+
$form.ajaxStart( fn );
24+
$form.ajaxStop( fn );
2525
```
2626

2727
✔️ Examples of **correct** code:
2828
```js
29-
$( document ).on( 'click', function ( e ) { } );
30-
$form.on( 'submit', function ( e ) { } );
29+
$( document ).on( 'click', fn );
30+
$form.on( 'submit', fn );
3131
$form.on();
32-
on( 'ajaxSuccess', '.js-select-menu', function ( e ) { } );
32+
on( 'ajaxSuccess', '.js-select-menu', fn );
3333
form.on( 'ajaxSend' );
3434
form.ajaxSend();
3535
$.ajaxSend();

0 commit comments

Comments
 (0)