fix: suppress unused regex escaping (#9299)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2025-06-18 22:43:50 +05:00
committed by GitHub
parent dbc5847467
commit 47ff12877c
+1
View File
@@ -662,6 +662,7 @@ export function escape<T> (str: T): T {
if (typeof str === 'string') {
// Remove all characters except a-z, A-Z, 0-9 and _ .
// Add cyrillic for support old custom attributes
// eslint-disable-next-line no-useless-escape
return str.replace(/[^a-zA-ZА-Яа-яЁё0-9_.:\-]/g, '') as T
}
return str