diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d7e2356a6..c0e9bf59e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ### Fixed * configs: avoid legacy config system error ([#3461][] @ljharb) * [`sort-prop-types`]: restore autofixing ([#3452][] @ROSSROSALES) +* [`no-unknown-property`]: do not check `fbs` elements ([#3494][] @brianogilvie) +[#3494]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3494 [#3461]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3461 [#3452]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3452 [#3449]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3449 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 1ba13a60a5..12e8f5f9f8 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -544,7 +544,7 @@ module.exports = { const tagName = getTagName(node); - if (tagName === 'fbt') { return; } // fbt nodes are bonkers, let's not go there + if (tagName === 'fbt' || tagName === 'fbs') { return; } // fbt/fbs nodes are bonkers, let's not go there if (!isValidHTMLTagInJSX(node)) { return; } diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 3928ffa334..62f2beb16b 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -153,6 +153,8 @@ ruleTester.run('no-unknown-property', rule, { // fbt { code: ';' }, + // fbs + { code: ';' }, ]), invalid: parsers.all([ {