I'd be happy to contribute to these if you all agree with the following:
With Drupal 8.4, core JS uses the file.es6.js file naming convention... So we can write es6 now!
The Drupal eslint config and plugin flags 'use script' as unnecessary because it gets added during the compiling process.
Taking it one step further, (function($) { could then be used as ($) => {
Using $(document).on('ready') is unnecessary in favour of using Drupal.behaviors.{someRelevantMethodName} = { attach() {} };
Since behaviors get fired onready anyways, using some Drupal core JS.
And I would almost just remove or mark the line about bower_components as deprecated, since Bower is deprecated. You wouldn't want somebody to start a new project with it.
I'd be happy to contribute to these if you all agree with the following:
With Drupal 8.4, core JS uses the file.es6.js file naming convention... So we can write es6 now!
The Drupal eslint config and plugin flags
'use script'as unnecessary because it gets added during the compiling process.Taking it one step further,
(function($) {could then be used as($) => {Using
$(document).on('ready')is unnecessary in favour of usingDrupal.behaviors.{someRelevantMethodName} = { attach() {} };Since behaviors get fired onready anyways, using some Drupal core JS.
And I would almost just remove or mark the line about bower_components as deprecated, since Bower is deprecated. You wouldn't want somebody to start a new project with it.