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

feat!: Improved Plugin #130

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

Conversation

denbezrukov
Copy link

This PR adds support for Yarn, PNPM, WSL, and workspaces, improves the plugin’s settings window (now offering auto, manual, and disabled modes), and introduces an option to apply quick fixes on file save.

Screenshot 2025-03-28 at 7 14 17 PM Screenshot 2025-03-28 at 7 14 37 PM

It’s strange that, for some reason, I only got an only ignore quick fix (even in VSCode) for the diagnostic
Screenshot 2025-03-28 at 7 13 27 PM
Screenshot 2025-03-28 at 7 13 45 PM

Handles yarn, pnpm, and WSL settings to support different development setups
@nrayburn-tech
Copy link
Collaborator

Thanks for the PR! I’m hoping to review it sometime this week.

Copy link
Collaborator

@nrayburn-tech nrayburn-tech left a comment

Choose a reason for hiding this comment

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

The only concern I have is that I can't seem to find the sources for classes such as NodePackageDescriptor. I think this is expected, but without documentation I think it might be difficult for contributors outside of JetBrains to maintain code that interacts with these classes.
Are these sources available somewhere?

Aside from that, I left a few comments.

settings.supportedExtensions =
value.split(",").map { it.trim() }.filter { it.isNotBlank() }.toMutableList()
}).validationOnInput { validateExtensions(it) }.applyToComponent {
font = font.deriveFont(font.size2D - 2f) // Reduce font size by 2 points
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like the font is kind of small, but it can probably be left alone for now.

image

Copy link
Author

Choose a reason for hiding this comment

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

I agree, but I don’t have a better idea. We can try another font or control if it doesn’t work for us

key="oxc.name"
/>
<actionOnSaveInfoProvider id="OxcOnSaveInfoProvider"
implementation="com.github.oxc.project.oxcintellijplugin.settings.OxcOnSaveInfoProvider"
order="after FormatOnSaveInfoProvider, after EsLintOnSaveInfoProvider, before FileWatcherOnSaveInfoProvider, before UploadOnSaveInfoProvider"/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The general recommendation for Oxlint CLI usage is to execute Oxlint first and then ESLint. Is there any reason the on save action should be different?

Copy link
Author

@denbezrukov denbezrukov Apr 2, 2025

Choose a reason for hiding this comment

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

actionOnSaveInfoProvider refers to the order in the table on the ‘On Save Action’ tab.
I guess it can be anything, but I wanted to keep them as close as possible to ESLint.

Screenshot 2025-04-02 at 1 13 24 PM

@nrayburn-tech
Copy link
Collaborator

It’s strange that, for some reason, I only got an only ignore quick fix (even in VSCode) for the diagnostic

I'm seeing the same thing with some of the testing I did. Will need to look at it on the language server side.

Refactored `getServer` in `OxcServerService` to simplify type handling, removing a redundant cast. Also, reformatted `plugin.xml` for better readability and consistency. Removed the `gradleJvm` setting from Gradle configuration.
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