Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] no-unknown-property: do not check fbs elements #3494

Merged
merged 1 commit into from Nov 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-unknown-property.js
Expand Up @@ -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; }

Expand Down
2 changes: 2 additions & 0 deletions tests/lib/rules/no-unknown-property.js
Expand Up @@ -153,6 +153,8 @@ ruleTester.run('no-unknown-property', rule, {

// fbt
{ code: '<fbt desc="foo" doNotExtract />;' },
// fbs
{ code: '<fbs desc="foo" doNotExtract />;' },
]),
invalid: parsers.all([
{
Expand Down