Skip to content

Commit c470bd9

Browse files
committed
aa
1 parent 1136c1c commit c470bd9

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

packages/plugin/src/rules/naming-convention/index.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ const schema = {
7171
items: {
7272
type: 'object',
7373
},
74-
description: 'RegEx',
74+
description: 'Should be of instance of RegEx',
7575
},
7676
requiredPattern: {
7777
...ARRAY_DEFAULT_OPTIONS,
7878
items: {
7979
type: 'object',
8080
},
81-
description: 'RegEx',
81+
description: 'Should be of instance of RegEx',
8282
},
8383
forbiddenPrefixes: {
8484
...ARRAY_DEFAULT_OPTIONS,
@@ -101,26 +101,6 @@ const schema = {
101101
description: 'Option to skip validation of some words, e.g. acronyms',
102102
},
103103
},
104-
allOf: ['forbidden', 'required'].flatMap(name => [
105-
{
106-
not: {
107-
properties: {
108-
[`${name}Pattern`]: { type: 'array' },
109-
[`${name}Prefixes`]: { type: 'array' },
110-
},
111-
required: [`${name}Pattern`, `${name}Prefixes`],
112-
},
113-
},
114-
{
115-
not: {
116-
properties: {
117-
[`${name}Pattern`]: { type: 'array' },
118-
[`${name}Suffixes`]: { type: 'array' },
119-
},
120-
required: [`${name}Pattern`, `${name}Suffixes`],
121-
},
122-
},
123-
]),
124104
},
125105
},
126106
type: 'array',

website/content/rules/naming-convention.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ This element must be one of the following enum values:
323323

324324
### `forbiddenPattern` (array)
325325

326-
RegEx
326+
Should be of instance of RegEx
327327

328328
The object is an array with all elements of the type `object`.
329329

@@ -336,7 +336,7 @@ Additional restrictions:
336336

337337
### `requiredPattern` (array)
338338

339-
RegEx
339+
Should be of instance of RegEx
340340

341341
The object is an array with all elements of the type `object`.
342342

0 commit comments

Comments
 (0)