Skip to content

Commit 56b3ea4

Browse files
committed
[Perf] no-cycle, no-internal-modules, no-restricted-paths: use anyOf instead of oneOf
See eslint/eslint#16691
1 parent b96b499 commit 56b3ea4

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
5353
- [Docs] automate docs with eslint-doc-generator ([#2582], thanks [@bmish])
5454
- [readme] Increase clarity around typescript configuration ([#2588], thanks [@Nfinished])
5555
- [Docs] update `eslint-doc-generator` to v1.0.0 ([#2605], thanks [@bmish])
56+
- [Perf] `no-cycle`, `no-internal-modules`, `no-restricted-paths`: use `anyOf` instead of `oneOf` (thanks [@ljharb], [@remcohaszing])
5657

5758
## [2.26.0] - 2022-04-05
5859

src/rules/no-cycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
},
2222
schema: [makeOptionsSchema({
2323
maxDepth: {
24-
oneOf: [
24+
anyOf: [
2525
{
2626
description: 'maximum dependency depth to traverse',
2727
type: 'integer',

src/rules/no-internal-modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = {
1616

1717
schema: [
1818
{
19-
oneOf: [
19+
anyOf: [
2020
{
2121
type: 'object',
2222
properties: {

src/rules/no-restricted-paths.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
type: 'object',
3333
properties: {
3434
target: {
35-
oneOf: [
35+
anyOf: [
3636
{ type: 'string' },
3737
{
3838
type: 'array',
@@ -43,7 +43,7 @@ module.exports = {
4343
],
4444
},
4545
from: {
46-
oneOf: [
46+
anyOf: [
4747
{ type: 'string' },
4848
{
4949
type: 'array',

0 commit comments

Comments
 (0)