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

natanmoraes created an issue. See original summary.

klausi’s picture

Version: 8.x-2.9 » 8.x-2.x-dev
Category: Bug report » Support request
Status: Active » Fixed

Javascript 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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.