eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

Add JSDoc type annotations

Open y-hsgw opened this issue 2 years ago • 4 comments

I have added type annotations and fixed associated type errors.

y-hsgw avatar Apr 09 '24 02:04 y-hsgw

I have addressed this in pull request #3732 and will proceed to close this one. I'll handle the areas requiring type changes separately.

y-hsgw avatar Apr 10 '24 05:04 y-hsgw

I would prefer to update this PR with those changes rather than abandoning it.

ljharb avatar Apr 10 '24 06:04 ljharb

Codecov Report

Attention: Patch coverage is 98.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.64%. Comparing base (cef8123) to head (4467e3a). Report is 6 commits behind head on master.

Files Patch % Lines
lib/rules/no-unused-class-component-methods.js 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3731      +/-   ##
==========================================
+ Coverage   97.62%   97.64%   +0.01%     
==========================================
  Files         134      134              
  Lines        9617     9662      +45     
  Branches     3488     3514      +26     
==========================================
+ Hits         9389     9434      +45     
  Misses        228      228              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 11 '24 02:04 codecov[bot]

I have rebased and cleaned up the commits. Please check.

y-hsgw avatar Aug 01 '24 07:08 y-hsgw

I've gone ahead and updated this to remove all the breaking changes. The way to safely resolve TypeScript's inability to understand that an x.foo check is identical to 'foo' in x && x.foo semantically is not to hardcode AST node types (that a custom parser might not match) but to add 'foo' in x and let TS do the narrowing.

ljharb avatar Sep 11 '24 17:09 ljharb