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
- Add "eslint-plugin-unicorn" as devDependencies to core/package.json.
- Add "plugin:unicorn/recommended" to existing ESLint config files.
- Fix JavaScript files in Drupal core.
Remaining tasks
- 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.
Comments