I have the following piece of javascript code used to call a function dinamically on js:
var callback = 'return ' + settings.js_callback + '(arguments);';
response = new Function(callback);
If I run "phpcs --standard=Drupal" on the file, I get the following message:
Expected 1 space after FUNCTION keyword; 0 found
When I add the blank space and run the same phpcs command, then I get the following message:
Expected 0 spaces before opening parenthesis; 1 found
With that I can't get my file clear of errors and this will get in my way when implementing automatic analysis
Comments
Comment #2
klausiJavascript support has been dropped from Coder. Please do not use phpcs to check your JS files. Use ESLint instead for that, see https://www.drupal.org/docs/develop/standards/javascript/eslint-settings