Skip to content

Commit

Permalink
[Refactor] forbid-component-props: tweak formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 14, 2023
1 parent 1fc7d34 commit 477f36d
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions lib/rules/forbid-component-props.js
Expand Up @@ -39,26 +39,21 @@ module.exports = {
forbid: {
type: 'array',
items: {
anyOf: [{
type: 'string',
}, {
type: 'object',
properties: {
propName: {
type: 'string',
},
allowedFor: {
type: 'array',
uniqueItems: true,
items: {
type: 'string',
anyOf: [
{ type: 'string' },
{
type: 'object',
properties: {
propName: { type: 'string' },
allowedFor: {
type: 'array',
uniqueItems: true,
items: { type: 'string' },
},
},
message: {
type: 'string',
message: { type: 'string' },
},
},
}],
],
},
},
},
Expand Down

0 comments on commit 477f36d

Please sign in to comment.