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

Updated JetBrains configuration for prettier #12428

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Updated JetBrains configuration for prettier #12428

merged 2 commits into from
Jan 10, 2025

Conversation

weegeekps
Copy link
Contributor

Description

This updates the IntelliJ/Webstorm/Clion/etc configuration used by JetBrains IDE projects to properly support prettier across the project.

Issue number and link

N/A

Testing plan

N/A

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@weegeekps weegeekps requested a review from ggetz January 10, 2025 17:46
Copy link

github-actions bot commented Jan 10, 2025

Thank you for the pull request, @weegeekps! Welcome to the Cesium community!

In order for us to review your PR, please complete the following steps:

Review Pull Request Guidelines to make sure your PR gets accepted quickly.

@ggetz
Copy link
Contributor

ggetz commented Jan 10, 2025

Thanks @weegeekps! @jjspace could you please review?

@jjspace
Copy link
Contributor

jjspace commented Jan 10, 2025

Does the prettier integration not just respect the .prettierrc and .prettierignore files if they exist?

@weegeekps
Copy link
Contributor Author

Does the prettier integration in Webstorm not just respect the .prettierrc and .prettierignore files if they exist?

Prettier integration will turn on if it sees a dev-dependency for prettier in the root project.json file and if a .prettierrc file exists as well. However, with the default settings, it won't run on .html files.

<project version="4">
<component name="PrettierConfiguration">
<option name="myConfigurationMode" value="AUTOMATIC" />
<option name="myFilesPattern" value="**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts,vue,astro,html,xhtml}" />
Copy link
Contributor

Choose a reason for hiding this comment

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

However, with the default settings, it won't run on .html files.

@weegeekps Can this be **/* or just *?
If not you should add css and md to the extension list.
I would've expected the extension to rely on the .prettierignore file to dictate what it should and shouldn't run against. If it doesn't do this or if it only does the ignore check after this list of files then you need those extensions as well to match every file we normally lint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIRC, it's not advisable to use **/* for performance reasons. I added css and md to the list of extensions in the glob pattern.

@jjspace jjspace added this pull request to the merge queue Jan 10, 2025
Merged via the queue into main with commit 0b40489 Jan 10, 2025
9 checks passed
@jjspace jjspace deleted the webstorm-prettier branch January 10, 2025 19:14
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.

3 participants