Consider to use some of plugin:unicorn/recommended ESLint rules for Drupal core

Created on 28 October 2024, 6 months ago

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

📌 Task
Status

Active

Version

11.0 🔥

Component

javascript

Created by

🇯🇵Japan tom konda Kanagawa, Japan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024