-
Notifications
You must be signed in to change notification settings - Fork 300
Feature/use local prettier #2360
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2360 +/- ##
==========================================
+ Coverage 37.65% 38.07% +0.42%
==========================================
Files 300 300
Lines 12483 12508 +25
Branches 1643 1645 +2
==========================================
+ Hits 4701 4763 +62
+ Misses 7533 7491 -42
- Partials 249 254 +5
Continue to review full report at Codecov.
|
Awesome! Makes sense to use local prettier if it's available - looks good to me 👍 |
@badosu I basically took the opportunity to just remove the background color prop on the prettier status item and the foreground should just be white I believe so hopefully this solves that |
@CrossR I imagine its just a project without prettier, I haven't seen it before but its likely due to this I'll have a look after work I've used a build with this PR in in a project without prettier and haven't encountered it could you share the package json? probably the function I borrowed throws an error at some point. EDIT: actually all errors seem to be caught in a try catch so not sure where that is coming from, is there a stack trace |
Ahh in which case is prettier specified in the package.json but not available in the node modules? |
Ah! Yep, my dev machine with Oni on and node_modules downloaded this works fine, but for my local machine prettier is specified but not available. |
This PR fixes #2348, rather than always using the default prettier bundled with the plugin it uses the local prettier version and falls back to the bundled one if a local installation isn't present also.
All credit to the
prettier-vscode
plugin I basically fully borrowed their implementation.