A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-assertions.html below:

Website Navigation


regexp/no-useless-assertions | eslint-plugin-regexp

regexp/no-useless-assertions

💼 This rule is enabled in the following configs: 🟢 flat/recommended, 🔵 recommended.

💡 This rule is manually fixable by editor suggestions.

disallow assertions that are known to always accept (or reject)

📖 Rule Details

Some assertions are unnecessary because the rest of the pattern forces them to always be accept (or reject).

Limitations

Right now, this rule is implemented by only looking a single character ahead and behind. This is enough to determine whether the builtin assertions (\b, \B, ^, $) trivially reject or accept but it is not enough for all lookarounds. The algorithm determining the characters ahead and behind is very conservative which can lead to false negatives.

🔧 Options

Nothing.

❤️ Compatibility

This rule was taken from eslint-plugin-clean-regex.
This rule is compatible with clean-regex/no-unnecessary-assertions rule.

🚀 Version

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

🔍 Implementation

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4