Skip to content

Commit

Permalink
[Fix] jsx-no-constructed-context-values, jsx-no-useless-fragment:…
Browse files Browse the repository at this point in the history
… add a rule schema
  • Loading branch information
ljharb committed Jan 18, 2023
1 parent d2194a5 commit 756aaa4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange

### Fixed
* configs: restore `parserOptions` in legacy configs ([#3523][] @ljharb)
* [`jsx-no-constructed-context-values`], [`jsx-no-useless-fragment`]: add a rule schema (@ljharb)

[#3520]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3523

Expand Down
1 change: 1 addition & 0 deletions lib/rules/jsx-no-constructed-context-values.js
Expand Up @@ -138,6 +138,7 @@ module.exports = {
url: docsUrl('jsx-no-constructed-context-values'),
},
messages,
schema: {},
},

// eslint-disable-next-line arrow-body-style
Expand Down
8 changes: 8 additions & 0 deletions lib/rules/jsx-no-useless-fragment.js
Expand Up @@ -94,6 +94,14 @@ module.exports = {
url: docsUrl('jsx-no-useless-fragment'),
},
messages,
schema: [{
type: 'object',
properties: {
allowExpressions: {
type: 'boolean',
},
},
}],
},

create(context) {
Expand Down

0 comments on commit 756aaa4

Please sign in to comment.