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: adjusts fix for generic type arguments on TSX files #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

renato-bohler
Copy link
Contributor

Description (What)

This PR implements an adjustment on the auto=fixer when transforming generic TSX components with one type argument.

Fixes #27

Justification (Why)

Otherwise, the auto-fix will generate invalid TSX syntax.

How Can This Be Tested?

I added unit tests, but I used a few React + TypeScript codebases to test this on, plus unit tests.

@renato-bohler renato-bohler changed the title Tsx generic fix fix: adjusts fix for generic type arguments on TSX files Mar 3, 2024
@renato-bohler
Copy link
Contributor Author

CI failing because Node is 16, while a dependency requires >=18. Similar to #31 (comment)

https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions/actions/runs/8126337559/job/22209940539?pr=32#step:4:8

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.

Generic on TSX (React Component) gets incorrectly converted
1 participant