JS codestyle: prefer-regex-literals

Created on 21 February 2022, about 3 years ago
Updated 9 May 2023, almost 2 years ago

Problem/Motivation

ESLint 8 brings with it a new rule that we have skipped for now:

core/modules/views_ui/js/views-admin.es6.js
  47:23  error  Use a regular expression literal instead of the 'RegExp' constructor  prefer-regex-literals

core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js
  10:13  error  Use a regular expression literal instead of the 'RegExp' constructor  prefer-regex-literals

core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js
  10:13  error  Use a regular expression literal instead of the 'RegExp' constructor  prefer-regex-literals

Steps to reproduce

Proposed resolution

Fix the three cases and re-enable prefer-regex-literals.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

10.0

Component
Javascript 

Last updated about 2 hours ago

Created by

🇬🇧United Kingdom longwave UK

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024