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

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

merged 1 commit into from
Nov 20, 2022

Conversation

brian-ogilvie
Copy link

Currently <fbs> nodes are tagged with this linter warning:

Unknown property 'desc' foundNuclide-ESLint[react/no-unknown-property](https://www.internalfb.com/intern/bunny?q%3Deslint%2Breact%2Fno-unknown-property)

<fbt> nodes are already exempt from this lint rule, and <fbs> should be treated the same.

Internal WP discussion: https://fb.workplace.com/groups/eslintfeedback/permalink/6064426636924059/

@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Merging #3494 (5506881) into master (c6d082a) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 5506881 differs from pull request most recent head 54c56a1. Consider uploading reports for the commit 54c56a1 to get more accurate results

@@           Coverage Diff           @@
##           master    #3494   +/-   ##
=======================================
  Coverage   97.57%   97.57%           
=======================================
  Files         129      129           
  Lines        9200     9200           
  Branches     3336     3336           
=======================================
  Hits         8977     8977           
  Misses        223      223           
Impacted Files Coverage Δ
lib/rules/no-unknown-property.js 98.82% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof, i had no idea there were two of these. is that an exhaustive list? (i can't view the workplacae discussion, obv)

This is good to go as soon as we can add a test using fbs.

@brian-ogilvie
Copy link
Author

Yeah, fbs has basically the same api as fbt, but it returns the pure string result instead of a node. This is useful for things that really need to be string for a18y purposes like the an aria-label, etc.

I'll add a test

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll try to get another patch out in the next day or three.

@ljharb ljharb changed the title [Fix] do not check fbs nodes for unknown property [Fix] no-unknown-property: do not check fbs elements Nov 20, 2022
@ljharb ljharb merged commit 54c56a1 into jsx-eslint:master Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants