We are using a combination of require.js and backbone.js so our module definitions tend to look like this:
define(function(require) { // This function gets flagged by the rule
var $ = require("jquery");
var backbone = require("Backbone");
var Ajax = require("Ajax");
...
return backbone.View.extend({
/* various function definitions */
});
})
We are using Developer Edition Version 8.2 (build 32929)
Indeed when migrating to eslint implementation for this rule we stopped ignoring AMD pattern (you can check comments on this ticket https://github.com/SonarSource/SonarJS/issues/1367). The idea was that if ESLint is not ignoring that, that’s not a problem for community. Also we hoped that AMD is not used that a lot as before as modules are available already.
We will keep your feedback in mind, but we will not jump on making the rule ignoring AMD as that’s something less and less used.