Skip to content

Enable the regexp/no-super-linear-move ESLint rule - #21708

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
calixteman:regexp-no-super-linear-move
Aug 4, 2026
Merged

Enable the regexp/no-super-linear-move ESLint rule#21708
timvandermeij merged 1 commit into
mozilla:masterfrom
calixteman:regexp-no-super-linear-move

Conversation

@calixteman

Copy link
Copy Markdown
Contributor

It flags the regexes whose search is quadratic in the input length, like the autolinker and XFA-path ones fixed recently.

The three existing offenders: \s* matched the CSS indentation but also the line terminators that make ^ match with the m flag (the preprocessed CSS is unchanged), (\d+) made every digit of a number a candidate start position, and /T.*$/ could fail on the $ and backtrack since . doesn't match a line terminator.

It flags the regexes whose search is quadratic in the input length, like
the autolinker and XFA-path ones fixed recently.

The three existing offenders: `\s*` matched the CSS indentation but also
the line terminators that make `^` match with the `m` flag (the
preprocessed CSS is unchanged), `(\d+)` made every digit of a number a
candidate start position, and `/T.*$/` could fail on the `$` and
backtrack since `.` doesn't match a line terminator.
@codecov-commenter

codecov-commenter commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.04%. Comparing base (e57a464) to head (fc01f7d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21708   +/-   ##
=======================================
  Coverage   90.04%   90.04%           
=======================================
  Files         264      264           
  Lines       66894    66894           
=======================================
+ Hits        60232    60233    +1     
+ Misses       6662     6661    -1     
Flag Coverage Δ
browsertest 66.52% <ø> (+0.01%) ⬆️
fonttest 9.03% <ø> (ø)
integrationtest 69.35% <ø> (-0.01%) ⬇️
unittest 57.89% <ø> (+0.01%) ⬆️
unittestcli 56.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timvandermeij
timvandermeij merged commit 724950b into mozilla:master Aug 4, 2026
20 of 21 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Good idea; thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants