Skip to content

Commit 54c56a1

Browse files
Brian Staman Ogilvieljharb
Brian Staman Ogilvie
authored andcommitted
[Fix] no-unknown-property: do not check fbs elements
1 parent c6d082a commit 54c56a1

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
1414
### Fixed
1515
* configs: avoid legacy config system error ([#3461][] @ljharb)
1616
* [`sort-prop-types`]: restore autofixing ([#3452][] @ROSSROSALES)
17+
* [`no-unknown-property`]: do not check `fbs` elements ([#3494][] @brianogilvie)
1718

19+
[#3494]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3494
1820
[#3461]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3461
1921
[#3452]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3452
2022
[#3449]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3449

lib/rules/no-unknown-property.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ module.exports = {
544544

545545
const tagName = getTagName(node);
546546

547-
if (tagName === 'fbt') { return; } // fbt nodes are bonkers, let's not go there
547+
if (tagName === 'fbt' || tagName === 'fbs') { return; } // fbt/fbs nodes are bonkers, let's not go there
548548

549549
if (!isValidHTMLTagInJSX(node)) { return; }
550550

tests/lib/rules/no-unknown-property.js

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ ruleTester.run('no-unknown-property', rule, {
153153

154154
// fbt
155155
{ code: '<fbt desc="foo" doNotExtract />;' },
156+
// fbs
157+
{ code: '<fbs desc="foo" doNotExtract />;' },
156158
]),
157159
invalid: parsers.all([
158160
{

0 commit comments

Comments
 (0)