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

Change: Use .js as file suffix for hooks #4073

Merged
merged 3 commits into from
Jun 19, 2024
Merged

Conversation

bjoernricks
Copy link
Contributor

What

Use .js as file suffix for hooks

Why

Hooks usually don't contain JSX and therefore should use .js for the file suffix. Currently this is mixed up between .jsx and .js.

@bjoernricks bjoernricks requested a review from a team as a code owner June 18, 2024 08:50
@bjoernricks bjoernricks marked this pull request as draft June 18, 2024 08:51
Copy link

github-actions bot commented Jun 18, 2024

Conventional Commits Report

Type Number
Changed 2

🚀 Conventional commits found.

Copy link

github-actions bot commented Jun 18, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 6926579.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@bjoernricks bjoernricks marked this pull request as ready for review June 18, 2024 08:57
@bjoernricks bjoernricks enabled auto-merge (rebase) June 18, 2024 08:57
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.45%. Comparing base (f955c28) to head (857f8ff).

Current head 857f8ff differs from pull request most recent head 6926579

Please upload reports for the commit 6926579 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4073      +/-   ##
==========================================
- Coverage   72.46%   72.45%   -0.01%     
==========================================
  Files        1067     1068       +1     
  Lines      122030   121995      -35     
  Branches     6060     6049      -11     
==========================================
- Hits        88425    88392      -33     
+ Misses      33574    33572       -2     
  Partials       31       31              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Hooks usually don't contain JSX and therefore should use `.js` for the
file suffix. Currently this is mixed up between `.jsx` and `.js`.
Hooks should not contain JSX code and should be plain JS only. Therefore
extract the ErrorMarker component from the useFormValidation module and
use `js` file suffix for the module.
Just support the actual prop in use (`isVisible`) and drop passing a
child.
@bjoernricks bjoernricks merged commit 0347710 into main Jun 19, 2024
10 of 11 checks passed
@bjoernricks bjoernricks deleted the hooks-as-js-files branch June 19, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants