Skip to content

Commit

Permalink
Deprecate no-unsafe-regex rule (#2135)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 18, 2023
1 parent b9b8794 commit 7b473aa
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 134 deletions.
1 change: 0 additions & 1 deletion configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ module.exports = {
'unicorn/no-unnecessary-await': 'error',
'unicorn/no-unreadable-array-destructuring': 'error',
'unicorn/no-unreadable-iife': 'error',
'unicorn/no-unsafe-regex': 'off',
'unicorn/no-unused-properties': 'off',
'unicorn/no-useless-fallback-in-spread': 'error',
'unicorn/no-useless-length-check': 'error',
Expand Down
4 changes: 4 additions & 0 deletions docs/deprecated-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ This rule was renamed to [`no-array-callback-reference`](rules/no-array-callback

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

## no-unsafe-regex

Removed due to bugs.

## prefer-dataset

This rule was renamed to [`prefer-dom-node-dataset`](rules/prefer-dom-node-dataset.md) to be more specific.
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const deprecatedRules = createDeprecatedRules({
'no-array-instanceof': 'unicorn/no-instanceof-array',
'no-fn-reference-in-iterator': 'unicorn/no-array-callback-reference',
'no-reduce': 'unicorn/no-array-reduce',
'no-unsafe-regex': [],
'prefer-dataset': 'unicorn/prefer-dom-node-dataset',
'prefer-event-key': 'unicorn/prefer-keyboard-event-key',
'prefer-exponentiation-operator': 'prefer-exponentiation-operator',
Expand Down
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ If you don't use the preset, ensure you use the same `env` and `parserOptions` c
| [no-unnecessary-await](docs/rules/no-unnecessary-await.md) | Disallow awaiting non-promise values. || 🔧 | |
| [no-unreadable-array-destructuring](docs/rules/no-unreadable-array-destructuring.md) | Disallow unreadable array destructuring. || 🔧 | |
| [no-unreadable-iife](docs/rules/no-unreadable-iife.md) | Disallow unreadable IIFEs. || | |
| [no-unsafe-regex](docs/rules/no-unsafe-regex.md) | Disallow unsafe regular expressions. | | | |
| [no-unused-properties](docs/rules/no-unused-properties.md) | Disallow unused object properties. | | | |
| [no-useless-fallback-in-spread](docs/rules/no-useless-fallback-in-spread.md) | Disallow useless fallback when spreading in object literals. || 🔧 | |
| [no-useless-length-check](docs/rules/no-useless-length-check.md) | Disallow useless array length check. || 🔧 | |
Expand Down
65 changes: 0 additions & 65 deletions rules/no-unsafe-regex.js

This file was deleted.

52 changes: 0 additions & 52 deletions test/no-unsafe-regex.mjs

This file was deleted.

15 changes: 0 additions & 15 deletions test/snapshots/no-unsafe-regex.mjs.md

This file was deleted.

Binary file removed test/snapshots/no-unsafe-regex.mjs.snap
Binary file not shown.

0 comments on commit 7b473aa

Please sign in to comment.