You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just curious if there's a way of formatting this on save? I am using intelliJ.
I have tried to use the file-watcher plugin, with the following config for my IDE:
When I save my file I get the following error:
//.m2/repository/com/hubspot/maven/plugins/prettier-maven-plugin/0.16/prettier-maven-plugin-0.16-prettier-java-0.7.0/prettier-java/node_modules/prettier/bin-prettier.js --write src/main/java/MyFile.java
[error] No matching files. Patterns tried: src/main/javaMyFile.java !**/node_modules/** !./node_modules/** !**/.{git,svn,hg}/** !./.{git,svn,hg}/**
Process finished with exit code 2
Here's the output of print-args:
printWidth=90
tabWidth=4
useTabs=false
noConfig=true
noEditorconfig=true
inputGlob=src/main/java/**/*.java
inputGlob=src/test/java/**/*.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.273 s
[INFO] Finished at: 2024-06-20T15:15:03+01:00
[INFO] ------------------------------------------------------------------------
Process finished with exit code 0
And if I manually trigger prettier:write that is also fine. Ideally this would be something that runs on every save, so I don't have to think about it!
Any idea or help would be appreciated!
The text was updated successfully, but these errors were encountered:
I managed to get this to work, but there's a few things that don't work exactly as I had hoped.
It seems that running prettier from the file watcher behaves differently than how it's run in the pom.xml file, I think there's a few ways of getting this locked down.
Ideally I'd be able to run mvn prettier:write inside of the file watcher instead of manually providing the prettier location.
If that's not possible, use the .prettierrc in both ways of running prettier: From the file watcher / command line, & the pom / mvn
Just curious if there's a way of formatting this on save? I am using intelliJ.
I have tried to use the file-watcher plugin, with the following config for my IDE:
When I save my file I get the following error:
Here's the output of print-args:
And if I manually trigger prettier:write that is also fine. Ideally this would be something that runs on every save, so I don't have to think about it!
Any idea or help would be appreciated!
The text was updated successfully, but these errors were encountered: