Running:

phpcs --standard=Drupal /path/to/drupal/core/themes/claro/js/dropbutton.es6.js

Causes the following exception:

FILE: /path/to/drupal/core/themes/claro/js/dropbutton.es6.js
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | An error occurred during processing; checking has been aborted. The error message was: Undefined index: scope_closer in
   |       | /home/peter/.config/composer/vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/FileCommentSniff.php on line 115
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

It's the ticks characters in the JavaScript code that causes this - usage of template literals.

Comments

peterkokot created an issue. See original summary.

klausi’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)

Please don't check Javascript files with Coder, use ESLint for Javascript instead. See https://www.drupal.org/docs/develop/standards/javascript/javascript-codi...