Skip to content

regexp/strict โ€‹

๐Ÿ’ผ This rule is enabled in the following configs: ๐ŸŸข flat/recommended, ๐Ÿ”ต recommended.

๐Ÿ”ง๐Ÿ’ก This rule is automatically fixable by the --fix CLI option and manually fixable by editor suggestions.

disallow not strictly valid regular expressions

๐Ÿ“– Rule Details โ€‹

This rule disallows not strictly valid regular expressions.

An invalid pattern in a regular expression literal is a SyntaxError when the code is parsed. However, it is not always strictly checked.

Depending on the syntax defined in Annex B of the ECMAScript specification, some ambiguous pattern syntax may also succeed in parsing as a valid pattern. This rule reports these ambiguous patterns.

Now loading...

๐Ÿ”ง Options โ€‹

Nothing.

๐Ÿ“š Further reading โ€‹

๐Ÿš€ Version โ€‹

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

๐Ÿ” Implementation โ€‹