Sonarqube vs eslint rules (named function vs anonymous function)
<p>I've written this code for a mongoose schema:</p>

<pre><code>localeTypesSchema.statics.findAndModify =
    function findAndModify(query, sort, update, options, callback) {
        const promised = q.nbind(this.collection.findAndModify, this.collection);
        return promised(query || {}, sort || [], update || {}, options, callback);
    };
</code></pre>

<p>SonarQube is complaining (major, code smell) about <code>Make this function anonymous by removing its name (cross-browser, user-experience)</code>.</p>

<p>If I remove the name then <code>eslint</code> extending <code>airbnb</code> complains (warning) about <code>[eslint] Missing function expression name. (func-names)</code>.</p>

<p>I can't transform it to an arrow function as it makes use of <code>this</code>, and <code>this</code> should be bind to function caller and not to scope of arrow function.</p>

<p>How should I write the code?</p>