unicorn/no-hex-escape
eslint-plugin-unicorn
No autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-hex-escape": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Replaced by unicorn/prefer-literal-ascii and unicorn/prefer-unicode-code-point-escapes, which cover more cases.
const foo = '\x1B';
const foo = `\x1B${bar}`;const foo = '\u001B';
const foo = `\u001B${bar}`;Examples from the Oxlint documentation.
unicorn/no-hex-escape
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-hex-escape": "error",
},
},
];unicorn/no-hex-escape
unicorn plugin · pedantic
{
"rules": {
"unicorn/no-hex-escape": "error"
}
}Biome does not have this rule.
Enforce correct Error subclassing.
Prefer import.meta.{dirname,filename} over legacy techniques for getting file paths.
Enforce using the targetOrigin argument with window.postMessage().
Forbids the use of Array#forEach in favor of a for loop.
Disallow invalid accept values on file inputs.