Skip to content

Commit 7b473aa

Browse files
authored
Deprecate no-unsafe-regex rule (#2135)
1 parent b9b8794 commit 7b473aa

File tree

8 files changed

+5
-134
lines changed

8 files changed

+5
-134
lines changed

configs/recommended.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module.exports = {
5656
'unicorn/no-unnecessary-await': 'error',
5757
'unicorn/no-unreadable-array-destructuring': 'error',
5858
'unicorn/no-unreadable-iife': 'error',
59-
'unicorn/no-unsafe-regex': 'off',
6059
'unicorn/no-unused-properties': 'off',
6160
'unicorn/no-useless-fallback-in-spread': 'error',
6261
'unicorn/no-useless-length-check': 'error',

docs/deprecated-rules.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ This rule was renamed to [`no-array-callback-reference`](rules/no-array-callback
1616

1717
This rule was renamed to [`no-array-reduce`](rules/no-array-reduce.md) to be more specific.
1818

19+
## no-unsafe-regex
20+
21+
Removed due to bugs.
22+
1923
## prefer-dataset
2024

2125
This rule was renamed to [`prefer-dom-node-dataset`](rules/prefer-dom-node-dataset.md) to be more specific.

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const deprecatedRules = createDeprecatedRules({
1111
'no-array-instanceof': 'unicorn/no-instanceof-array',
1212
'no-fn-reference-in-iterator': 'unicorn/no-array-callback-reference',
1313
'no-reduce': 'unicorn/no-array-reduce',
14+
'no-unsafe-regex': [],
1415
'prefer-dataset': 'unicorn/prefer-dom-node-dataset',
1516
'prefer-event-key': 'unicorn/prefer-keyboard-event-key',
1617
'prefer-exponentiation-operator': 'prefer-exponentiation-operator',

readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ If you don't use the preset, ensure you use the same `env` and `parserOptions` c
9898
| [no-unnecessary-await](docs/rules/no-unnecessary-await.md) | Disallow awaiting non-promise values. || 🔧 | |
9999
| [no-unreadable-array-destructuring](docs/rules/no-unreadable-array-destructuring.md) | Disallow unreadable array destructuring. || 🔧 | |
100100
| [no-unreadable-iife](docs/rules/no-unreadable-iife.md) | Disallow unreadable IIFEs. || | |
101-
| [no-unsafe-regex](docs/rules/no-unsafe-regex.md) | Disallow unsafe regular expressions. | | | |
102101
| [no-unused-properties](docs/rules/no-unused-properties.md) | Disallow unused object properties. | | | |
103102
| [no-useless-fallback-in-spread](docs/rules/no-useless-fallback-in-spread.md) | Disallow useless fallback when spreading in object literals. || 🔧 | |
104103
| [no-useless-length-check](docs/rules/no-useless-length-check.md) | Disallow useless array length check. || 🔧 | |

rules/no-unsafe-regex.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

test/no-unsafe-regex.mjs

Lines changed: 0 additions & 52 deletions
This file was deleted.

test/snapshots/no-unsafe-regex.mjs.md

Lines changed: 0 additions & 15 deletions
This file was deleted.
-161 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)