prefer-code-point Prefer Unicode code-point operations over UTF-16 code-unit operations UTF-16 code-unit operations split characters outside the Basic Multilingual Plane into surrogate pairs. Instead, you SHOULD use codePointAt and String.fromCodePoint when processing Unicode characters. - Category: style - Level: warning - Fix: suggestion - Scope: module Reported function inspectFirstCharacter(text: string): void { text.charCodeAt(0); } Accepted function inspectFirstCharacter(text: string): void { text.codePointAt(0); } Prior art - eslint-plugin-unicorn ยท prefer-code-point language/linter/src/rules/style/prefercodepoint.rs:8