Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9d8f2de

Browse filesBrowse files
authored
Change anyOf to oneOf in rule schemas to make intent clearer (#2663)
1 parent 9607d8e commit 9d8f2de
Copy full SHA for 9d8f2de
Expand file treeCollapse file tree

13 files changed

+15
-15
lines changed

‎lib/rules/attributes-order.js

Copy file name to clipboardExpand all lines: lib/rules/attributes-order.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ module.exports = {
435435
order: {
436436
type: 'array',
437437
items: {
438-
anyOf: [
438+
oneOf: [
439439
{ enum: Object.values(ATTRS) },
440440
{
441441
type: 'array',

‎lib/rules/block-lang.js

Copy file name to clipboardExpand all lines: lib/rules/block-lang.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ module.exports = {
128128
type: 'object',
129129
properties: {
130130
lang: {
131-
anyOf: [
131+
oneOf: [
132132
{ type: 'string' },
133133
{
134134
type: 'array',

‎lib/rules/block-order.js

Copy file name to clipboardExpand all lines: lib/rules/block-order.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = {
4949
order: {
5050
type: 'array',
5151
items: {
52-
anyOf: [
52+
oneOf: [
5353
{ type: 'string' },
5454
{ type: 'array', items: { type: 'string' }, uniqueItems: true }
5555
]

‎lib/rules/html-comment-content-newline.js

Copy file name to clipboardExpand all lines: lib/rules/html-comment-content-newline.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = {
4141
fixable: 'whitespace',
4242
schema: [
4343
{
44-
anyOf: [
44+
oneOf: [
4545
{
4646
enum: ['always', 'never']
4747
},

‎lib/rules/html-comment-indent.js

Copy file name to clipboardExpand all lines: lib/rules/html-comment-indent.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module.exports = {
6868
fixable: 'whitespace',
6969
schema: [
7070
{
71-
anyOf: [{ type: 'integer', minimum: 0 }, { enum: ['tab'] }]
71+
oneOf: [{ type: 'integer', minimum: 0 }, { enum: ['tab'] }]
7272
}
7373
],
7474
messages: {

‎lib/rules/html-indent.js

Copy file name to clipboardExpand all lines: lib/rules/html-indent.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ module.exports = {
3333
fixable: 'whitespace',
3434
schema: [
3535
{
36-
anyOf: [{ type: 'integer', minimum: 1 }, { enum: ['tab'] }]
36+
oneOf: [{ type: 'integer', minimum: 1 }, { enum: ['tab'] }]
3737
},
3838
{
3939
type: 'object',
4040
properties: {
4141
attribute: { type: 'integer', minimum: 0 },
4242
baseIndent: { type: 'integer', minimum: 0 },
4343
closeBracket: {
44-
anyOf: [
44+
oneOf: [
4545
{ type: 'integer', minimum: 0 },
4646
{
4747
type: 'object',

‎lib/rules/max-attributes-per-line.js

Copy file name to clipboardExpand all lines: lib/rules/max-attributes-per-line.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module.exports = {
7474
type: 'object',
7575
properties: {
7676
singleline: {
77-
anyOf: [
77+
oneOf: [
7878
{
7979
type: 'number',
8080
minimum: 1
@@ -92,7 +92,7 @@ module.exports = {
9292
]
9393
},
9494
multiline: {
95-
anyOf: [
95+
oneOf: [
9696
{
9797
type: 'number',
9898
minimum: 1

‎lib/rules/max-len.js

Copy file name to clipboardExpand all lines: lib/rules/max-len.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const OPTIONS_SCHEMA = {
5757
}
5858

5959
const OPTIONS_OR_INTEGER_SCHEMA = {
60-
anyOf: [
60+
oneOf: [
6161
OPTIONS_SCHEMA,
6262
{
6363
type: 'integer',

‎lib/rules/no-restricted-call-after-await.js

Copy file name to clipboardExpand all lines: lib/rules/no-restricted-call-after-await.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = {
4343
properties: {
4444
module: { type: 'string' },
4545
path: {
46-
anyOf: [
46+
oneOf: [
4747
{ type: 'string' },
4848
{
4949
type: 'array',

‎lib/rules/no-restricted-component-options.js

Copy file name to clipboardExpand all lines: lib/rules/no-restricted-component-options.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ module.exports = {
139139
type: 'object',
140140
properties: {
141141
name: {
142-
anyOf: [
142+
oneOf: [
143143
{ type: 'string' },
144144
{
145145
type: 'array',

‎lib/rules/no-restricted-static-attribute.js

Copy file name to clipboardExpand all lines: lib/rules/no-restricted-static-attribute.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ module.exports = {
115115
type: 'object',
116116
properties: {
117117
key: { type: 'string' },
118-
value: { anyOf: [{ type: 'string' }, { enum: [true] }] },
118+
value: { oneOf: [{ type: 'string' }, { enum: [true] }] },
119119
element: { type: 'string' },
120120
message: { type: 'string', minLength: 1 }
121121
},

‎lib/rules/script-indent.js

Copy file name to clipboardExpand all lines: lib/rules/script-indent.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
fixable: 'whitespace',
2020
schema: [
2121
{
22-
anyOf: [{ type: 'integer', minimum: 1 }, { enum: ['tab'] }]
22+
oneOf: [{ type: 'integer', minimum: 1 }, { enum: ['tab'] }]
2323
},
2424
{
2525
type: 'object',

‎lib/rules/v-slot-style.js

Copy file name to clipboardExpand all lines: lib/rules/v-slot-style.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module.exports = {
9292
fixable: 'code',
9393
schema: [
9494
{
95-
anyOf: [
95+
oneOf: [
9696
{ enum: ['shorthand', 'longform'] },
9797
{
9898
type: 'object',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.