build: Update eslint-config-wikimedia to 0.11.0
[lhc/web/wiklou.git] / resources / src / mediawiki.searchSuggest / searchSuggest.js
index 044ac3f..df12b2e 100644 (file)
@@ -1,8 +1,8 @@
-/* eslint-disable no-restricted-properties */
 /*!
  * Add search suggestions to the search form.
  */
 ( function () {
+       // eslint-disable-next-line no-jquery/no-map-util
        var searchNS = $.map( mw.config.get( 'wgFormattedNamespaces' ), function ( nsName, nsID ) {
                if ( nsID >= 0 && mw.user.options.get( 'searchNs' + nsID ) ) {
                        // Cast string key to number
                        this.text( text );
 
                        // wrap only as link, if the config doesn't disallow it
-                       if ( textboxConfig.wrapAsLink !== false ) {
+                       if ( textboxConfig.wrapAsLink !== false ) {
                                this.wrap(
                                        $( '<a>' )
                                                .attr( 'href', formData.baseHref + $.param( formData.linkParams ) )
                                                } );
                                        } else {
                                                $input.closest( 'form' )
-                                                       .append( $( '<input type="hidden" name="fulltext" value="1"/>' ) );
+                                                       .append(
+                                                               $( '<input>' )
+                                                                       .prop( {
+                                                                               type: 'hidden',
+                                                                               value: 1
+                                                                       } )
+                                                                       .attr( 'name', 'fulltext' )
+                                                       );
                                        }
                                        return true; // allow the form to be submitted
                                }