Skip to content

Commit

Permalink
Update eslint-config-wikimedia to 0.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
edg2s committed Jun 4, 2024
1 parent 2166431 commit 7608866
Show file tree
Hide file tree
Showing 43 changed files with 1,961 additions and 1,212 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"eslint-plugin/require-meta-docs-url": "off",
"eslint-plugin/test-case-property-ordering": [ "error",
[ "code", "options", "parserOptions", "settings", "errors", "output" ]
]
],
"prefer-arrow-callback": "error",
"implicit-arrow-linebreak": "error",
"arrow-body-style": "error"
}
}
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 7608866

Please sign in to comment.