Skip to content

Lint em-dash chars - #7899

Merged
robwalch merged 1 commit into
masterfrom
task/lint-em-dashes-and-maybe-other-utf-16-chars-at-some-point
Jun 9, 2026
Merged

Lint em-dash chars#7899
robwalch merged 1 commit into
masterfrom
task/lint-em-dashes-and-maybe-other-utf-16-chars-at-some-point

Conversation

@robwalch

@robwalch robwalch commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

This PR will...

Lint characters that require UTF encoding in the source.

Why is this Pull Request needed?

So that can be replaces with simpler text.

@robwalch robwalch added this to the 1.7.0 milestone Jun 8, 2026
@robwalch
robwalch merged commit 3693b24 into master Jun 9, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this from Top priorities to Done in HLS.js Release Planning and Backlog Jun 9, 2026
@robwalch
robwalch deleted the task/lint-em-dashes-and-maybe-other-utf-16-chars-at-some-point branch June 9, 2026 21:05
Comment thread .eslintrc.js
{
selector:
'Literal[value=/\u2014/], TemplateElement[value.cooked=/\u2014/] ',
message: 'Em-dash (—) is not allowed. Use a hyphen (-) instead.',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just disable all non-ASCII (> U+007F) chars? any non-ASCII will cause v8 to store entire bundle as two-byte (UTF-16) string instead of one-byte (Latin1) doubling its heap footprint per worker

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any non-ASCII will cause v8 to store entire bundle as two-byte (UTF-16) string

I'm not so sure about that. The babel-rollup build is not doubled in size, and I'd expect v8 to operate on a string by string basis. You're welcome to submit a change, to help identify other chars.

@dzianis-dashkevich dzianis-dashkevich Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The babel-rollup build is not doubled in size

I meant v8 will store worker string in UTF-16 instead of Latine1.

Or what did you mean by saying babel-rollup build is not doubled in size

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

Labels

None yet

2 participants