Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.33 KB

no-invisible-character.md

File metadata and controls

58 lines (39 loc) · 1.33 KB
pageClass sidebarDepth title description since
rule-details
0
regexp/no-invisible-character
disallow invisible raw character
v0.1.0

regexp/no-invisible-character

💼 This rule is enabled in the ✅ plugin:regexp/recommended config.

🔧 This rule is automatically fixable by the --fix CLI option.

disallow invisible raw character

📖 Rule Details

This rule disallows using invisible characters other than SPACE (U+0020) without using escapes.

/* eslint regexp/no-invisible-character: "error" */

/* ✓ GOOD */
var foo = /\t/;
var foo = /\v/;
var foo = /\f/;
var foo = /\u3000/;
var foo = / /; // SPACE (`U+0020`)

/* ✗ BAD */
var foo = /	/;
var foo = //;
var foo = //;
var foo = / /;

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-regexp v0.1.0

🔍 Implementation