Problem/Motivation

ESLint plugin "eslint-plugin-unicorn" has more than 100 rules and it supports recent JavaScript coding such as Array.flat(), BigInt, Array.at() and so on. Many of rules are contained in "plugin:unicorn/recommended", if imports recommended rules it will enable automatically.
This rule-set is worth for using Drupal core JavaScript coding for us.

Proposed resolution

  1. Add "eslint-plugin-unicorn" as devDependencies to core/package.json.
  2. Add "plugin:unicorn/recommended" to existing ESLint config files.
  3. Fix JavaScript files in Drupal core.

Remaining tasks

  1. Disscuss about which rules to be enabled for the Drupal core project in plugin:unicorn/recommended rules.

User interface changes

No.

API changes

No.

Data model changes

No.

Release notes snippet

Comments

tom konda created an issue. See original summary.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.